summaryrefslogtreecommitdiffstats
path: root/core/input/keycodes.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/input/keycodes.h')
-rw-r--r--core/input/keycodes.h308
1 files changed, 150 insertions, 158 deletions
diff --git a/core/input/keycodes.h b/core/input/keycodes.h
index c86a4bc138..18ce7ce1cc 100644
--- a/core/input/keycodes.h
+++ b/core/input/keycodes.h
@@ -23,192 +23,184 @@
#define MP_KEY_BASE (1<<21)
-// For appleir.c which includes another header with KEY_ENTER etc defines
-#ifndef AR_DEFINES_ONLY
-
-#define KEY_ENTER 13
-#define KEY_TAB 9
+#define MP_KEY_ENTER 13
+#define MP_KEY_TAB 9
/* Control keys */
-#define KEY_BACKSPACE (MP_KEY_BASE+0)
-#define KEY_DELETE (MP_KEY_BASE+1)
-#define KEY_INSERT (MP_KEY_BASE+2)
-#define KEY_HOME (MP_KEY_BASE+3)
-#define KEY_END (MP_KEY_BASE+4)
-#define KEY_PAGE_UP (MP_KEY_BASE+5)
-#define KEY_PAGE_DOWN (MP_KEY_BASE+6)
-#define KEY_ESC (MP_KEY_BASE+7)
-#define KEY_PRINT (MP_KEY_BASE+8)
+#define MP_KEY_BACKSPACE (MP_KEY_BASE+0)
+#define MP_KEY_DELETE (MP_KEY_BASE+1)
+#define MP_KEY_INSERT (MP_KEY_BASE+2)
+#define MP_KEY_HOME (MP_KEY_BASE+3)
+#define MP_KEY_END (MP_KEY_BASE+4)
+#define MP_KEY_PAGE_UP (MP_KEY_BASE+5)
+#define MP_KEY_PAGE_DOWN (MP_KEY_BASE+6)
+#define MP_KEY_ESC (MP_KEY_BASE+7)
+#define MP_KEY_PRINT (MP_KEY_BASE+8)
/* Control keys short name */
-#define KEY_BS KEY_BACKSPACE
-#define KEY_DEL KEY_DELETE
-#define KEY_INS KEY_INSERT
-#define KEY_PGUP KEY_PAGE_UP
-#define KEY_PGDOWN KEY_PAGE_DOWN
-#define KEY_PGDWN KEY_PAGE_DOWN
+#define MP_KEY_BS MP_KEY_BACKSPACE
+#define MP_KEY_DEL MP_KEY_DELETE
+#define MP_KEY_INS MP_KEY_INSERT
+#define MP_KEY_PGUP MP_KEY_PAGE_UP
+#define MP_KEY_PGDOWN MP_KEY_PAGE_DOWN
+#define MP_KEY_PGDWN MP_KEY_PAGE_DOWN
/* Cursor movement */
-#define KEY_CRSR (MP_KEY_BASE+0x10)
-#define KEY_RIGHT (KEY_CRSR+0)
-#define KEY_LEFT (KEY_CRSR+1)
-#define KEY_DOWN (KEY_CRSR+2)
-#define KEY_UP (KEY_CRSR+3)
+#define MP_KEY_CRSR (MP_KEY_BASE+0x10)
+#define MP_KEY_RIGHT (MP_KEY_CRSR+0)
+#define MP_KEY_LEFT (MP_KEY_CRSR+1)
+#define MP_KEY_DOWN (MP_KEY_CRSR+2)
+#define MP_KEY_UP (MP_KEY_CRSR+3)
/* Multimedia keyboard/remote keys */
-#define KEY_MM_BASE (MP_KEY_BASE+0x20)
-#define KEY_POWER (KEY_MM_BASE+0)
-#define KEY_MENU (KEY_MM_BASE+1)
-#define KEY_PLAY (KEY_MM_BASE+2)
-#define KEY_PAUSE (KEY_MM_BASE+3)
-#define KEY_PLAYPAUSE (KEY_MM_BASE+4)
-#define KEY_STOP (KEY_MM_BASE+5)
-#define KEY_FORWARD (KEY_MM_BASE+6)
-#define KEY_REWIND (KEY_MM_BASE+7)
-#define KEY_NEXT (KEY_MM_BASE+8)
-#define KEY_PREV (KEY_MM_BASE+9)
-#define KEY_VOLUME_UP (KEY_MM_BASE+10)
-#define KEY_VOLUME_DOWN (KEY_MM_BASE+11)
-#define KEY_MUTE (KEY_MM_BASE+12)
+#define MP_KEY_MM_BASE (MP_KEY_BASE+0x20)
+#define MP_KEY_POWER (MP_KEY_MM_BASE+0)
+#define MP_KEY_MENU (MP_KEY_MM_BASE+1)
+#define MP_KEY_PLAY (MP_KEY_MM_BASE+2)
+#define MP_KEY_PAUSE (MP_KEY_MM_BASE+3)
+#define MP_KEY_PLAYPAUSE (MP_KEY_MM_BASE+4)
+#define MP_KEY_STOP (MP_KEY_MM_BASE+5)
+#define MP_KEY_FORWARD (MP_KEY_MM_BASE+6)
+#define MP_KEY_REWIND (MP_KEY_MM_BASE+7)
+#define MP_KEY_NEXT (MP_KEY_MM_BASE+8)
+#define MP_KEY_PREV (MP_KEY_MM_BASE+9)
+#define MP_KEY_VOLUME_UP (MP_KEY_MM_BASE+10)
+#define MP_KEY_VOLUME_DOWN (MP_KEY_MM_BASE+11)
+#define MP_KEY_MUTE (MP_KEY_MM_BASE+12)
/* Function keys */
-#define KEY_F (MP_KEY_BASE+0x40)
+#define MP_KEY_F (MP_KEY_BASE+0x40)
/* Keypad keys */
-#define KEY_KEYPAD (MP_KEY_BASE+0x60)
-#define KEY_KP0 (KEY_KEYPAD+0)
-#define KEY_KP1 (KEY_KEYPAD+1)
-#define KEY_KP2 (KEY_KEYPAD+2)
-#define KEY_KP3 (KEY_KEYPAD+3)
-#define KEY_KP4 (KEY_KEYPAD+4)
-#define KEY_KP5 (KEY_KEYPAD+5)
-#define KEY_KP6 (KEY_KEYPAD+6)
-#define KEY_KP7 (KEY_KEYPAD+7)
-#define KEY_KP8 (KEY_KEYPAD+8)
-#define KEY_KP9 (KEY_KEYPAD+9)
-#define KEY_KPDEC (KEY_KEYPAD+10)
-#define KEY_KPINS (KEY_KEYPAD+11)
-#define KEY_KPDEL (KEY_KEYPAD+12)
-#define KEY_KPENTER (KEY_KEYPAD+13)
+#define MP_KEY_KEYPAD (MP_KEY_BASE+0x60)
+#define MP_KEY_KP0 (MP_KEY_KEYPAD+0)
+#define MP_KEY_KP1 (MP_KEY_KEYPAD+1)
+#define MP_KEY_KP2 (MP_KEY_KEYPAD+2)
+#define MP_KEY_KP3 (MP_KEY_KEYPAD+3)
+#define MP_KEY_KP4 (MP_KEY_KEYPAD+4)
+#define MP_KEY_KP5 (MP_KEY_KEYPAD+5)
+#define MP_KEY_KP6 (MP_KEY_KEYPAD+6)
+#define MP_KEY_KP7 (MP_KEY_KEYPAD+7)
+#define MP_KEY_KP8 (MP_KEY_KEYPAD+8)
+#define MP_KEY_KP9 (MP_KEY_KEYPAD+9)
+#define MP_KEY_KPDEC (MP_KEY_KEYPAD+10)
+#define MP_KEY_KPINS (MP_KEY_KEYPAD+11)
+#define MP_KEY_KPDEL (MP_KEY_KEYPAD+12)
+#define MP_KEY_KPENTER (MP_KEY_KEYPAD+13)
// Joystick input module
-#define JOY_BASE (MP_KEY_BASE+0x70)
-#define JOY_AXIS0_PLUS (JOY_BASE+0)
-#define JOY_AXIS0_MINUS (JOY_BASE+1)
-#define JOY_AXIS1_PLUS (JOY_BASE+2)
-#define JOY_AXIS1_MINUS (JOY_BASE+3)
-#define JOY_AXIS2_PLUS (JOY_BASE+4)
-#define JOY_AXIS2_MINUS (JOY_BASE+5)
-#define JOY_AXIS3_PLUS (JOY_BASE+6)
-#define JOY_AXIS3_MINUS (JOY_BASE+7)
-#define JOY_AXIS4_PLUS (JOY_BASE+8)
-#define JOY_AXIS4_MINUS (JOY_BASE+9)
-#define JOY_AXIS5_PLUS (JOY_BASE+10)
-#define JOY_AXIS5_MINUS (JOY_BASE+11)
-#define JOY_AXIS6_PLUS (JOY_BASE+12)
-#define JOY_AXIS6_MINUS (JOY_BASE+13)
-#define JOY_AXIS7_PLUS (JOY_BASE+14)
-#define JOY_AXIS7_MINUS (JOY_BASE+15)
-#define JOY_AXIS8_PLUS (JOY_BASE+16)
-#define JOY_AXIS8_MINUS (JOY_BASE+17)
-#define JOY_AXIS9_PLUS (JOY_BASE+18)
-#define JOY_AXIS9_MINUS (JOY_BASE+19)
-
-#define JOY_BTN_BASE ((MP_KEY_BASE+0x90)|MP_NO_REPEAT_KEY)
-#define JOY_BTN0 (JOY_BTN_BASE+0)
-#define JOY_BTN1 (JOY_BTN_BASE+1)
-#define JOY_BTN2 (JOY_BTN_BASE+2)
-#define JOY_BTN3 (JOY_BTN_BASE+3)
-#define JOY_BTN4 (JOY_BTN_BASE+4)
-#define JOY_BTN5 (JOY_BTN_BASE+5)
-#define JOY_BTN6 (JOY_BTN_BASE+6)
-#define JOY_BTN7 (JOY_BTN_BASE+7)
-#define JOY_BTN8 (JOY_BTN_BASE+8)
-#define JOY_BTN9 (JOY_BTN_BASE+9)
+#define MP_JOY_BASE (MP_KEY_BASE+0x70)
+#define MP_JOY_AXIS0_PLUS (MP_JOY_BASE+0)
+#define MP_JOY_AXIS0_MINUS (MP_JOY_BASE+1)
+#define MP_JOY_AXIS1_PLUS (MP_JOY_BASE+2)
+#define MP_JOY_AXIS1_MINUS (MP_JOY_BASE+3)
+#define MP_JOY_AXIS2_PLUS (MP_JOY_BASE+4)
+#define MP_JOY_AXIS2_MINUS (MP_JOY_BASE+5)
+#define MP_JOY_AXIS3_PLUS (MP_JOY_BASE+6)
+#define MP_JOY_AXIS3_MINUS (MP_JOY_BASE+7)
+#define MP_JOY_AXIS4_PLUS (MP_JOY_BASE+8)
+#define MP_JOY_AXIS4_MINUS (MP_JOY_BASE+9)
+#define MP_JOY_AXIS5_PLUS (MP_JOY_BASE+10)
+#define MP_JOY_AXIS5_MINUS (MP_JOY_BASE+11)
+#define MP_JOY_AXIS6_PLUS (MP_JOY_BASE+12)
+#define MP_JOY_AXIS6_MINUS (MP_JOY_BASE+13)
+#define MP_JOY_AXIS7_PLUS (MP_JOY_BASE+14)
+#define MP_JOY_AXIS7_MINUS (MP_JOY_BASE+15)
+#define MP_JOY_AXIS8_PLUS (MP_JOY_BASE+16)
+#define MP_JOY_AXIS8_MINUS (MP_JOY_BASE+17)
+#define MP_JOY_AXIS9_PLUS (MP_JOY_BASE+18)
+#define MP_JOY_AXIS9_MINUS (MP_JOY_BASE+19)
+
+#define MP_JOY_BTN_BASE ((MP_KEY_BASE+0x90)|MP_NO_REPEAT_KEY)
+#define MP_JOY_BTN0 (MP_JOY_BTN_BASE+0)
+#define MP_JOY_BTN1 (MP_JOY_BTN_BASE+1)
+#define MP_JOY_BTN2 (MP_JOY_BTN_BASE+2)
+#define MP_JOY_BTN3 (MP_JOY_BTN_BASE+3)
+#define MP_JOY_BTN4 (MP_JOY_BTN_BASE+4)
+#define MP_JOY_BTN5 (MP_JOY_BTN_BASE+5)
+#define MP_JOY_BTN6 (MP_JOY_BTN_BASE+6)
+#define MP_JOY_BTN7 (MP_JOY_BTN_BASE+7)
+#define MP_JOY_BTN8 (MP_JOY_BTN_BASE+8)
+#define MP_JOY_BTN9 (MP_JOY_BTN_BASE+9)
// Mouse events from VOs
-#define MOUSE_BASE ((MP_KEY_BASE+0xA0)|MP_NO_REPEAT_KEY)
-#define MOUSE_BTN0 (MOUSE_BASE+0)
-#define MOUSE_BTN1 (MOUSE_BASE+1)
-#define MOUSE_BTN2 (MOUSE_BASE+2)
-#define MOUSE_BTN3 (MOUSE_BASE+3)
-#define MOUSE_BTN4 (MOUSE_BASE+4)
-#define MOUSE_BTN5 (MOUSE_BASE+5)
-#define MOUSE_BTN6 (MOUSE_BASE+6)
-#define MOUSE_BTN7 (MOUSE_BASE+7)
-#define MOUSE_BTN8 (MOUSE_BASE+8)
-#define MOUSE_BTN9 (MOUSE_BASE+9)
-#define MOUSE_BTN10 (MOUSE_BASE+10)
-#define MOUSE_BTN11 (MOUSE_BASE+11)
-#define MOUSE_BTN12 (MOUSE_BASE+12)
-#define MOUSE_BTN13 (MOUSE_BASE+13)
-#define MOUSE_BTN14 (MOUSE_BASE+14)
-#define MOUSE_BTN15 (MOUSE_BASE+15)
-#define MOUSE_BTN16 (MOUSE_BASE+16)
-#define MOUSE_BTN17 (MOUSE_BASE+17)
-#define MOUSE_BTN18 (MOUSE_BASE+18)
-#define MOUSE_BTN19 (MOUSE_BASE+19)
-#define MOUSE_BTN_END (MOUSE_BASE+20)
-
-#define MOUSE_BASE_DBL ((MP_KEY_BASE+0xC0)|MP_NO_REPEAT_KEY)
-#define MOUSE_BTN0_DBL (MOUSE_BASE_DBL+0)
-#define MOUSE_BTN1_DBL (MOUSE_BASE_DBL+1)
-#define MOUSE_BTN2_DBL (MOUSE_BASE_DBL+2)
-#define MOUSE_BTN3_DBL (MOUSE_BASE_DBL+3)
-#define MOUSE_BTN4_DBL (MOUSE_BASE_DBL+4)
-#define MOUSE_BTN5_DBL (MOUSE_BASE_DBL+5)
-#define MOUSE_BTN6_DBL (MOUSE_BASE_DBL+6)
-#define MOUSE_BTN7_DBL (MOUSE_BASE_DBL+7)
-#define MOUSE_BTN8_DBL (MOUSE_BASE_DBL+8)
-#define MOUSE_BTN9_DBL (MOUSE_BASE_DBL+9)
-#define MOUSE_BTN10_DBL (MOUSE_BASE_DBL+10)
-#define MOUSE_BTN11_DBL (MOUSE_BASE_DBL+11)
-#define MOUSE_BTN12_DBL (MOUSE_BASE_DBL+12)
-#define MOUSE_BTN13_DBL (MOUSE_BASE_DBL+13)
-#define MOUSE_BTN14_DBL (MOUSE_BASE_DBL+14)
-#define MOUSE_BTN15_DBL (MOUSE_BASE_DBL+15)
-#define MOUSE_BTN16_DBL (MOUSE_BASE_DBL+16)
-#define MOUSE_BTN17_DBL (MOUSE_BASE_DBL+17)
-#define MOUSE_BTN18_DBL (MOUSE_BASE_DBL+18)
-#define MOUSE_BTN19_DBL (MOUSE_BASE_DBL+19)
-#define MOUSE_BTN_DBL_END (MOUSE_BASE_DBL+20)
-
-
-#endif // AR_DEFINES_ONLY
+#define MP_MOUSE_BASE ((MP_KEY_BASE+0xA0)|MP_NO_REPEAT_KEY)
+#define MP_MOUSE_BTN0 (MP_MOUSE_BASE+0)
+#define MP_MOUSE_BTN1 (MP_MOUSE_BASE+1)
+#define MP_MOUSE_BTN2 (MP_MOUSE_BASE+2)
+#define MP_MOUSE_BTN3 (MP_MOUSE_BASE+3)
+#define MP_MOUSE_BTN4 (MP_MOUSE_BASE+4)
+#define MP_MOUSE_BTN5 (MP_MOUSE_BASE+5)
+#define MP_MOUSE_BTN6 (MP_MOUSE_BASE+6)
+#define MP_MOUSE_BTN7 (MP_MOUSE_BASE+7)
+#define MP_MOUSE_BTN8 (MP_MOUSE_BASE+8)
+#define MP_MOUSE_BTN9 (MP_MOUSE_BASE+9)
+#define MP_MOUSE_BTN10 (MP_MOUSE_BASE+10)
+#define MP_MOUSE_BTN11 (MP_MOUSE_BASE+11)
+#define MP_MOUSE_BTN12 (MP_MOUSE_BASE+12)
+#define MP_MOUSE_BTN13 (MP_MOUSE_BASE+13)
+#define MP_MOUSE_BTN14 (MP_MOUSE_BASE+14)
+#define MP_MOUSE_BTN15 (MP_MOUSE_BASE+15)
+#define MP_MOUSE_BTN16 (MP_MOUSE_BASE+16)
+#define MP_MOUSE_BTN17 (MP_MOUSE_BASE+17)
+#define MP_MOUSE_BTN18 (MP_MOUSE_BASE+18)
+#define MP_MOUSE_BTN19 (MP_MOUSE_BASE+19)
+#define MP_MOUSE_BTN_END (MP_MOUSE_BASE+20)
+
+#define MP_MOUSE_BASE_DBL ((MP_KEY_BASE+0xC0)|MP_NO_REPEAT_KEY)
+#define MP_MOUSE_BTN0_DBL (MP_MOUSE_BASE_DBL+0)
+#define MP_MOUSE_BTN1_DBL (MP_MOUSE_BASE_DBL+1)
+#define MP_MOUSE_BTN2_DBL (MP_MOUSE_BASE_DBL+2)
+#define MP_MOUSE_BTN3_DBL (MP_MOUSE_BASE_DBL+3)
+#define MP_MOUSE_BTN4_DBL (MP_MOUSE_BASE_DBL+4)
+#define MP_MOUSE_BTN5_DBL (MP_MOUSE_BASE_DBL+5)
+#define MP_MOUSE_BTN6_DBL (MP_MOUSE_BASE_DBL+6)
+#define MP_MOUSE_BTN7_DBL (MP_MOUSE_BASE_DBL+7)
+#define MP_MOUSE_BTN8_DBL (MP_MOUSE_BASE_DBL+8)
+#define MP_MOUSE_BTN9_DBL (MP_MOUSE_BASE_DBL+9)
+#define MP_MOUSE_BTN10_DBL (MP_MOUSE_BASE_DBL+10)
+#define MP_MOUSE_BTN11_DBL (MP_MOUSE_BASE_DBL+11)
+#define MP_MOUSE_BTN12_DBL (MP_MOUSE_BASE_DBL+12)
+#define MP_MOUSE_BTN13_DBL (MP_MOUSE_BASE_DBL+13)
+#define MP_MOUSE_BTN14_DBL (MP_MOUSE_BASE_DBL+14)
+#define MP_MOUSE_BTN15_DBL (MP_MOUSE_BASE_DBL+15)
+#define MP_MOUSE_BTN16_DBL (MP_MOUSE_BASE_DBL+16)
+#define MP_MOUSE_BTN17_DBL (MP_MOUSE_BASE_DBL+17)
+#define MP_MOUSE_BTN18_DBL (MP_MOUSE_BASE_DBL+18)
+#define MP_MOUSE_BTN19_DBL (MP_MOUSE_BASE_DBL+19)
+#define MP_MOUSE_BTN_DBL_END (MP_MOUSE_BASE_DBL+20)
// Apple Remote input module
-#define AR_BASE (MP_KEY_BASE+0xE0)
-#define AR_PLAY (AR_BASE + 0)
-#define AR_PLAY_HOLD (AR_BASE + 1)
-#define AR_NEXT (AR_BASE + 2)
-#define AR_NEXT_HOLD (AR_BASE + 3)
-#define AR_PREV (AR_BASE + 4)
-#define AR_PREV_HOLD (AR_BASE + 5)
-#define AR_MENU (AR_BASE + 6)
-#define AR_MENU_HOLD (AR_BASE + 7)
-#define AR_VUP (AR_BASE + 8)
-#define AR_VDOWN (AR_BASE + 9)
-
-#ifndef AR_DEFINES_ONLY
-
+#define MP_AR_BASE (MP_KEY_BASE+0xE0)
+#define MP_AR_PLAY (MP_AR_BASE + 0)
+#define MP_AR_PLAY_HOLD (MP_AR_BASE + 1)
+#define MP_AR_NEXT (MP_AR_BASE + 2)
+#define MP_AR_NEXT_HOLD (MP_AR_BASE + 3)
+#define MP_AR_PREV (MP_AR_BASE + 4)
+#define MP_AR_PREV_HOLD (MP_AR_BASE + 5)
+#define MP_AR_MENU (MP_AR_BASE + 6)
+#define MP_AR_MENU_HOLD (MP_AR_BASE + 7)
+#define MP_AR_VUP (MP_AR_BASE + 8)
+#define MP_AR_VDOWN (MP_AR_BASE + 9)
/* Special keys */
-#define KEY_INTERN (MP_KEY_BASE+0x1000)
-#define KEY_CLOSE_WIN (KEY_INTERN+0)
+#define MP_KEY_INTERN (MP_KEY_BASE+0x1000)
+#define MP_KEY_CLOSE_WIN (MP_KEY_INTERN+0)
/* Modifiers added to individual keys */
-#define KEY_MODIFIER_SHIFT (1<<22)
-#define KEY_MODIFIER_CTRL (1<<23)
-#define KEY_MODIFIER_ALT (1<<24)
-#define KEY_MODIFIER_META (1<<25)
+#define MP_KEY_MODIFIER_SHIFT (1<<22)
+#define MP_KEY_MODIFIER_CTRL (1<<23)
+#define MP_KEY_MODIFIER_ALT (1<<24)
+#define MP_KEY_MODIFIER_META (1<<25)
-#endif // AR_DEFINES_ONLY
+#define MP_KEY_MODIFIER_MASK (MP_KEY_MODIFIER_SHIFT | MP_KEY_MODIFIER_CTRL | \
+ MP_KEY_MODIFIER_ALT | MP_KEY_MODIFIER_META)
// Use this when the key shouldn't be auto-repeated (like mouse buttons)
#define MP_NO_REPEAT_KEY (1<<28)
-#define MP_KEY_DOWN (1<<29)
+#define MP_KEY_STATE_DOWN (1<<29)
#endif /* MPLAYER_KEYCODES_H */