Archived
1
0
This repository has been archived on 2024-10-17. You can view files and clone it, but cannot push or open issues or pull requests.
winamp/Src/Wasabi/bfc/std_keyboard.h
2024-09-24 14:54:57 +02:00

46 lines
932 B
C++

#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