16 #include "input/actions/Action.h" 18 #include "input/actions/ActionIDs.h" 31 #define KEY_BUTTON_A 256 32 #define KEY_BUTTON_B 257 33 #define KEY_BUTTON_X 258 34 #define KEY_BUTTON_Y 259 35 #define KEY_BUTTON_BLACK 260 36 #define KEY_BUTTON_WHITE 261 37 #define KEY_BUTTON_LEFT_TRIGGER 262 38 #define KEY_BUTTON_RIGHT_TRIGGER 263 40 #define KEY_BUTTON_LEFT_THUMB_STICK 264 41 #define KEY_BUTTON_RIGHT_THUMB_STICK 265 43 #define KEY_BUTTON_RIGHT_THUMB_STICK_UP 266 // right thumb stick directions 44 #define KEY_BUTTON_RIGHT_THUMB_STICK_DOWN 267 // for defining different actions per direction 45 #define KEY_BUTTON_RIGHT_THUMB_STICK_LEFT 268 46 #define KEY_BUTTON_RIGHT_THUMB_STICK_RIGHT 269 49 #define KEY_BUTTON_DPAD_UP 270 50 #define KEY_BUTTON_DPAD_DOWN 271 51 #define KEY_BUTTON_DPAD_LEFT 272 52 #define KEY_BUTTON_DPAD_RIGHT 273 54 #define KEY_BUTTON_START 274 55 #define KEY_BUTTON_BACK 275 57 #define KEY_BUTTON_LEFT_THUMB_BUTTON 276 58 #define KEY_BUTTON_RIGHT_THUMB_BUTTON 277 60 #define KEY_BUTTON_LEFT_ANALOG_TRIGGER 278 61 #define KEY_BUTTON_RIGHT_ANALOG_TRIGGER 279 63 #define KEY_BUTTON_LEFT_THUMB_STICK_UP 280 // left thumb stick directions 64 #define KEY_BUTTON_LEFT_THUMB_STICK_DOWN 281 // for defining different actions per direction 65 #define KEY_BUTTON_LEFT_THUMB_STICK_LEFT 282 66 #define KEY_BUTTON_LEFT_THUMB_STICK_RIGHT 283 69 #define KEY_VKEY 0xF000 // a virtual key/functional key e.g. cursor left 71 0xF200 // another printable character whose range is not included in this KEY code 74 #define KEY_VMOUSE 0xEFFF 76 #define KEY_MOUSE_START 0xE000 77 #define KEY_MOUSE_CLICK 0xE000 78 #define KEY_MOUSE_RIGHTCLICK 0xE001 79 #define KEY_MOUSE_MIDDLECLICK 0xE002 80 #define KEY_MOUSE_DOUBLE_CLICK 0xE010 81 #define KEY_MOUSE_LONG_CLICK 0xE020 82 #define KEY_MOUSE_WHEEL_UP 0xE101 83 #define KEY_MOUSE_WHEEL_DOWN 0xE102 84 #define KEY_MOUSE_MOVE 0xE103 85 #define KEY_MOUSE_DRAG 0xE104 86 #define KEY_MOUSE_DRAG_START 0xE105 87 #define KEY_MOUSE_DRAG_END 0xE106 88 #define KEY_MOUSE_RDRAG 0xE107 89 #define KEY_MOUSE_RDRAG_START 0xE108 90 #define KEY_MOUSE_RDRAG_END 0xE109 91 #define KEY_MOUSE_NOOP 0xEFFF 92 #define KEY_MOUSE_END 0xEFFF 95 #define KEY_APPCOMMAND 0xD000 97 #define KEY_INVALID 0xFFFF 99 #define ICON_TYPE_NONE 101 100 #define ICON_TYPE_PROGRAMS 102 101 #define ICON_TYPE_MUSIC 103 102 #define ICON_TYPE_PICTURES 104 103 #define ICON_TYPE_VIDEOS 105 104 #define ICON_TYPE_FILES 106 105 #define ICON_TYPE_WEATHER 107 106 #define ICON_TYPE_SETTINGS 109 117 CMouseEvent(
int actionID,
int state = 0,
float offsetX = 0,
float offsetY = 0)
139 CKey(uint32_t buttonCode,
140 uint8_t leftTrigger = 0,
141 uint8_t rightTrigger = 0,
142 float leftThumbX = 0.0f,
143 float leftThumbY = 0.0f,
144 float rightThumbX = 0.0f,
145 float rightThumbY = 0.0f,
146 float repeat = 0.0f);
147 CKey(uint32_t buttonCode,
unsigned int held);
148 CKey(uint32_t keycode,
153 uint32_t lockingModifiers,
160 uint8_t GetLeftTrigger()
const;
161 uint8_t GetRightTrigger()
const;
162 float GetLeftThumbX()
const;
163 float GetLeftThumbY()
const;
164 float GetRightThumbX()
const;
165 float GetRightThumbY()
const;
166 float GetRepeat()
const;
167 bool FromKeyboard()
const;
168 bool IsAnalogButton()
const;
169 bool IsIRRemote()
const;
170 void SetFromService(
bool fromService);
171 bool GetFromService()
const {
return m_fromService; }
173 inline uint32_t GetButtonCode()
const {
return m_buttonCode; }
174 inline uint32_t GetKeycode()
const {
return m_keycode; }
175 inline uint8_t GetVKey()
const {
return m_vkey; }
176 inline wchar_t GetUnicode()
const {
return m_unicode; }
177 inline char GetAscii()
const {
return m_ascii; }
178 inline uint32_t GetModifiers()
const {
return m_modifiers; }
179 inline uint32_t GetLockingModifiers()
const {
return m_lockingModifiers; }
180 inline unsigned int GetHeld()
const {
return m_held; }
184 MODIFIER_CTRL = 0x00010000,
185 MODIFIER_SHIFT = 0x00020000,
186 MODIFIER_ALT = 0x00040000,
187 MODIFIER_RALT = 0x00080000,
188 MODIFIER_SUPER = 0x00100000,
189 MODIFIER_META = 0X00200000,
190 MODIFIER_LONG = 0X01000000,
191 MODIFIER_NUMLOCK = 0X02000000,
192 MODIFIER_CAPSLOCK = 0X04000000,
193 MODIFIER_SCROLLLOCK = 0X08000000,
197 uint32_t m_buttonCode;
202 uint32_t m_modifiers;
203 uint32_t m_lockingModifiers;
206 uint8_t m_leftTrigger;
207 uint8_t m_rightTrigger;
Simple class for mouse events.
Definition: Key.h:114