diff options
author | Jean-Francois Mauguit <jfmauguit@mac.com> | 2024-09-24 09:03:25 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-24 09:03:25 -0400 |
commit | bab614c421ed7ae329d26bf028c4a3b1d2450f5a (patch) | |
tree | 12f17f78986871dd2cfb0a56e5e93b545c1ae0d0 /Src/Wasabi/bfc/std_keyboard.h | |
parent | 4bde6044fddf053f31795b9eaccdd2a5a527d21f (diff) | |
parent | 20d28e80a5c861a9d5f449ea911ab75b4f37ad0d (diff) | |
download | winamp-bab614c421ed7ae329d26bf028c4a3b1d2450f5a.tar.gz |
Merge pull request #5 from WinampDesktop/community
Merge to main
Diffstat (limited to 'Src/Wasabi/bfc/std_keyboard.h')
-rw-r--r-- | Src/Wasabi/bfc/std_keyboard.h | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/Src/Wasabi/bfc/std_keyboard.h b/Src/Wasabi/bfc/std_keyboard.h new file mode 100644 index 00000000..eb21c6f4 --- /dev/null +++ b/Src/Wasabi/bfc/std_keyboard.h @@ -0,0 +1,46 @@ +#ifndef NULLSOFT_WASABI_STD_KEYBOARD_H +#define NULLSOFT_WASABI_STD_KEYBOARD_H + +#ifdef _WIN32 +#include <windows.h> +enum +{ + STDKEY_SHIFT = VK_SHIFT, + STDKEY_ALT = VK_MENU, + STDKEY_CONTROL = VK_CONTROL, + + STDKEY_UP = VK_UP, + STDKEY_DOWN = VK_DOWN, + STDKEY_LEFT = VK_LEFT, + STDKEY_RIGHT = VK_RIGHT, + + STDKEY_HOME = VK_HOME, + STDKEY_END = VK_END, +}; + +#elif defined(__APPLE__) +#include <Carbon/Carbon.h> +enum +{ + STDKEY_SHIFT = shiftKey, + STDKEY_ALT = cmdKey, // yes, I know the option call has "alt" written on it, but Mac programs use Apple key like windows Alt key + STDKEY_CONTROL = controlKey, + + STDKEY_UP = kUpArrowCharCode, + STDKEY_DOWN = kDownArrowCharCode, + STDKEY_LEFT = kLeftArrowCharCode, + STDKEY_RIGHT = kRightArrowCharCode, + + STDKEY_HOME = kHomeCharCode, + STDKEY_END = kEndCharCode, +}; + +#else +#error port me +#endif +namespace Std +{ + int keyDown(int code); + bool keyModifier(int code); +} +#endif
\ No newline at end of file |