diff --git a/stepmania/src/arch/InputHandler/InputHandler_X11.cpp b/stepmania/src/arch/InputHandler/InputHandler_X11.cpp index 4a5806b765..4291012441 100644 --- a/stepmania/src/arch/InputHandler/InputHandler_X11.cpp +++ b/stepmania/src/arch/InputHandler/InputHandler_X11.cpp @@ -51,55 +51,67 @@ static RageKeySym XSymToKeySym( int key ) switch( key ) { - case XK_KP_Decimal: return KEY_KP_PERIOD; - case XK_KP_Divide: return KEY_KP_SLASH; + /* These are needed because of the way X registers + the keypad. */ + case XK_KP_Insert: return KEY_KP_C0; + case XK_KP_End: return KEY_KP_C1; + case XK_KP_Down: return KEY_KP_C2; + case XK_KP_Page_Down: return KEY_KP_C3; + case XK_KP_Left: return KEY_KP_C4; + case XK_KP_Begin: return KEY_KP_C5; + case XK_KP_Right: return KEY_KP_C6; + case XK_KP_Home: return KEY_KP_C7; + case XK_KP_Up: return KEY_KP_C8; + case XK_KP_Page_Up: return KEY_KP_C9; + case XK_KP_Decimal: return KEY_KP_PERIOD; + case XK_KP_Divide: return KEY_KP_SLASH; case XK_KP_Multiply: return KEY_KP_ASTERISK; case XK_KP_Subtract: return KEY_KP_HYPHEN; - case XK_KP_Add: return KEY_KP_PLUS; - case XK_KP_Equal: return KEY_KP_EQUAL; - case XK_KP_Enter: return KEY_KP_ENTER; - case XK_Up: return KEY_UP; - case XK_Down: return KEY_DOWN; - case XK_Right: return KEY_RIGHT; - case XK_Left: return KEY_LEFT; - case XK_Insert: return KEY_INSERT; - case XK_Home: return KEY_HOME; - case XK_End: return KEY_END; - case XK_Page_Up: return KEY_PGUP; - case XK_Page_Down: return KEY_PGDN; - case XK_F1: return KEY_F1; - case XK_F2: return KEY_F2; - case XK_F3: return KEY_F3; - case XK_F4: return KEY_F4; - case XK_F5: return KEY_F5; - case XK_F6: return KEY_F6; - case XK_F7: return KEY_F7; - case XK_F8: return KEY_F8; - case XK_F9: return KEY_F9; - case XK_F10: return KEY_F10; - case XK_F11: return KEY_F11; - case XK_F12: return KEY_F12; - case XK_F13: return KEY_F13; - case XK_F14: return KEY_F14; - case XK_F15: return KEY_F15; + case XK_KP_Add: return KEY_KP_PLUS; + case XK_KP_Equal: return KEY_KP_EQUAL; + case XK_KP_Enter: return KEY_KP_ENTER; + case XK_Up: return KEY_UP; + case XK_Down: return KEY_DOWN; + case XK_Right: return KEY_RIGHT; + case XK_Left: return KEY_LEFT; + case XK_Insert: return KEY_INSERT; + case XK_Home: return KEY_HOME; + case XK_End: return KEY_END; + case XK_Page_Up: return KEY_PGUP; + case XK_Page_Down: return KEY_PGDN; + case XK_F1: return KEY_F1; + case XK_F2: return KEY_F2; + case XK_F3: return KEY_F3; + case XK_F4: return KEY_F4; + case XK_F5: return KEY_F5; + case XK_F6: return KEY_F6; + case XK_F7: return KEY_F7; + case XK_F8: return KEY_F8; + case XK_F9: return KEY_F9; + case XK_F10: return KEY_F10; + case XK_F11: return KEY_F11; + case XK_F12: return KEY_F12; + case XK_F13: return KEY_F13; + case XK_F14: return KEY_F14; + case XK_F15: return KEY_F15; - case XK_Num_Lock: return KEY_NUMLOCK; - case XK_Caps_Lock: return KEY_CAPSLOCK; + case XK_Num_Lock: return KEY_NUMLOCK; + case XK_Caps_Lock: return KEY_CAPSLOCK; case XK_Scroll_Lock: return KEY_SCRLLOCK; - case XK_Return: return KEY_ENTER; - case XK_Sys_Req: return KEY_PRTSC; - case XK_Print: return KEY_PRTSC; - case XK_Shift_R: return KEY_RSHIFT; - case XK_Shift_L: return KEY_LSHIFT; - case XK_Control_R: return KEY_RCTRL; - case XK_Control_L: return KEY_LCTRL; - case XK_Alt_R: return KEY_RALT; - case XK_Alt_L: return KEY_LALT; - case XK_Meta_R: return KEY_RMETA; - case XK_Meta_L: return KEY_LMETA; - case XK_Super_L: return KEY_LSUPER; - case XK_Super_R: return KEY_RSUPER; - case XK_Menu: return KEY_MENU; + case XK_Return: return KEY_ENTER; + case XK_Sys_Req: return KEY_PRTSC; + case XK_Print: return KEY_PRTSC; + case XK_Shift_R: return KEY_RSHIFT; + case XK_Shift_L: return KEY_LSHIFT; + case XK_Control_R: return KEY_RCTRL; + case XK_Control_L: return KEY_LCTRL; + case XK_Alt_R: return KEY_RALT; + case XK_Alt_L: return KEY_LALT; + case XK_Meta_R: return KEY_RMETA; + case XK_Meta_L: return KEY_LMETA; + case XK_Super_L: return KEY_LSUPER; + case XK_Super_R: return KEY_RSUPER; + case XK_Menu: return KEY_MENU; } /* 0...31: */