2
0
Daniele Bartolini 10 жил өмнө
parent
commit
06a8085030

+ 6 - 1
docs/lua_api.txt

@@ -793,7 +793,12 @@ Keyboard
 Keyboard Button Names
 ~~~~~~~~~~~~~~~~~~~~~
 
-	``tab``, ``enter``, ``escape``, ``space``, ``backspace``, ``kp_0``, ``kp_1``, ``kp_2``, ``kp_3``, ``kp_4``, ``kp_5``, ``kp_6``, ``kp_7``, ``kp_8``, ``kp_9``, ``f1``, ``f2``, ``f3``, ``f4``, ``f5``, ``f6``, ``f7``, ``f8``, ``f9``, ``f10``, ``f11``, ``f12``, ``home``, ``left``, ``up``, ``right``, ``down``, ``page_up``, ``page_down``, ``lcontrol``, ``rcontrol``, ``lshift``, ``rshift``, ``caps_lock``, ``lalt``, ``ralt``, ``lsuper``, ``rsuper``, ``num_0``, ``num_1``, ``num_2``, ``num_3``, ``num_4``, ``num_5``, ``num_6``, ``num_7``, ``num_8``, ``num_9``, ``a``, ``b``, ``c``, ``d``, ``e``, ``f``, ``g``, ``h``, ``i``, ``j``, ``k``, ``l``, ``m``, ``n``, ``o``, ``p``, ``q``, ``r``, ``s``, ``t``, ``u``, ``v``, ``w``, ``x``, ``y``, ``z``
+	* ``tab``, ``enter``, ``escape``, ``space``, ``backspace``
+	* ``numpad_0``, ``numpad_1``, ``numpad_2``, ``numpad_3``, ``numpad_4``, ``numpad_5``, ``numpad_6``, ``numpad_7``, ``numpad_8``, ``numpad_9``
+	* ``f1``, ``f2``, ``f3``, ``f4``, ``f5``, ``f6``, ``f7``, ``f8``, ``f9``, ``f10``, ``f11``, ``f12``
+	* ``home``, ``left``, ``up``, ``right``, ``down``, ``page_up``, ``page_down``, ``left_ctrl``, ``right_ctrl``, ``left_shift``, ``right_shift``, ``caps_lock``, ``left_alt``, ``right_alt``, ``left_super``, ``right_super``
+	* ``0``, ``1``, ``2``, ``3``, ``4``, ``5``, ``6``, ``7``, ``8``, ``9``
+	* ``a``, ``b``, ``c``, ``d``, ``e``, ``f``, ``g``, ``h``, ``i``, ``j``, ``k``, ``l``, ``m``, ``n``, ``o``, ``p``, ``q``, ``r``, ``s``, ``t``, ``u``, ``v``, ``w``, ``x``, ``y``, ``z``
 
 Mouse
 -----

+ 82 - 82
src/input/input_types.h

@@ -20,102 +20,102 @@ struct KeyboardButton
 {
 	enum Enum
 	{
-		TAB       = 0x09,
-		ENTER     = 0x0d,
-		ESCAPE    = 0x1b,
-		SPACE     = 0x20,
-		BACKSPACE = 0x7f,
-
-		/* KeyPad */
-		KP_0      = 0x80,
-		KP_1      = 0x81,
-		KP_2      = 0x82,
-		KP_3      = 0x83,
-		KP_4      = 0x84,
-		KP_5      = 0x85,
-		KP_6      = 0x86,
-		KP_7      = 0x87,
-		KP_8      = 0x88,
-		KP_9      = 0x89,
+		TAB         = 0x09,
+		ENTER       = 0x0d,
+		ESCAPE      = 0x1b,
+		SPACE       = 0x20,
+		BACKSPACE   = 0x7f,
+
+		/* Numpad */
+		NUMPAD_0    = 0x80,
+		NUMPAD_1    = 0x81,
+		NUMPAD_2    = 0x82,
+		NUMPAD_3    = 0x83,
+		NUMPAD_4    = 0x84,
+		NUMPAD_5    = 0x85,
+		NUMPAD_6    = 0x86,
+		NUMPAD_7    = 0x87,
+		NUMPAD_8    = 0x88,
+		NUMPAD_9    = 0x89,
 
 		/* Function keys */
-		F1        = 0x90,
-		F2        = 0x91,
-		F3        = 0x92,
-		F4        = 0x93,
-		F5        = 0x94,
-		F6        = 0x95,
-		F7        = 0x96,
-		F8        = 0x97,
-		F9        = 0x98,
-		F10       = 0x99,
-		F11       = 0x9a,
-		F12       = 0x9b,
+		F1          = 0x90,
+		F2          = 0x91,
+		F3          = 0x92,
+		F4          = 0x93,
+		F5          = 0x94,
+		F6          = 0x95,
+		F7          = 0x96,
+		F8          = 0x97,
+		F9          = 0x98,
+		F10         = 0x99,
+		F11         = 0x9a,
+		F12         = 0x9b,
 
 		/* Other keys */
-		HOME      = 0xa0,
-		LEFT      = 0xa1,
-		UP        = 0xa2,
-		RIGHT     = 0xa3,
-		DOWN      = 0xa4,
-		PAGE_UP   = 0xa5,
-		PAGE_DOWN = 0xa6,
+		HOME        = 0xa0,
+		LEFT        = 0xa1,
+		UP          = 0xa2,
+		RIGHT       = 0xa3,
+		DOWN        = 0xa4,
+		PAGE_UP     = 0xa5,
+		PAGE_DOWN   = 0xa6,
 
 		/* Modifier keys */
-		LCONTROL  = 0xb0,
-		RCONTROL  = 0xb1,
-		LSHIFT    = 0xb2,
-		RSHIFT    = 0xb3,
-		CAPS_LOCK = 0xb4,
-		LALT      = 0xb5,
-		RALT      = 0xb6,
-		LSUPER    = 0xb7,
-		RSUPER    = 0xb8,
+		LEFT_CTRL   = 0xb0,
+		RIGHT_CTRL  = 0xb1,
+		LEFT_SHIFT  = 0xb2,
+		RIGHT_SHIFT = 0xb3,
+		CAPS_LOCK   = 0xb4,
+		LEFT_ALT    = 0xb5,
+		RIGHT_ALT   = 0xb6,
+		LEFT_SUPER  = 0xb7,
+		RIGHT_SUPER = 0xb8,
 
 		/* [0x30, 0x39] reserved for ASCII digits */
-		NUM_0     = 0x30,
-		NUM_1     = 0x31,
-		NUM_2     = 0x32,
-		NUM_3     = 0x33,
-		NUM_4     = 0x34,
-		NUM_5     = 0x35,
-		NUM_6     = 0x36,
-		NUM_7     = 0x37,
-		NUM_8     = 0x38,
-		NUM_9     = 0x39,
+		NUMBER_0    = 0x30,
+		NUMBER_1    = 0x31,
+		NUMBER_2    = 0x32,
+		NUMBER_3    = 0x33,
+		NUMBER_4    = 0x34,
+		NUMBER_5    = 0x35,
+		NUMBER_6    = 0x36,
+		NUMBER_7    = 0x37,
+		NUMBER_8    = 0x38,
+		NUMBER_9    = 0x39,
 
 		/* [0x41, 0x5a] reserved for ASCII alphabet */
-		A         = 0x41,
-		B         = 0x42,
-		C         = 0x43,
-		D         = 0x44,
-		E         = 0x45,
-		F         = 0x46,
-		G         = 0x47,
-		H         = 0x48,
-		I         = 0x49,
-		J         = 0x4a,
-		K         = 0x4b,
-		L         = 0x4c,
-		M         = 0x4d,
-		N         = 0x4e,
-		O         = 0x4f,
-		P         = 0x50,
-		Q         = 0x51,
-		R         = 0x52,
-		S         = 0x53,
-		T         = 0x54,
-		U         = 0x55,
-		V         = 0x56,
-		W         = 0x57,
-		X         = 0x58,
-		Y         = 0x59,
-		Z         = 0x5a,
+		A           = 0x41,
+		B           = 0x42,
+		C           = 0x43,
+		D           = 0x44,
+		E           = 0x45,
+		F           = 0x46,
+		G           = 0x47,
+		H           = 0x48,
+		I           = 0x49,
+		J           = 0x4a,
+		K           = 0x4b,
+		L           = 0x4c,
+		M           = 0x4d,
+		N           = 0x4e,
+		O           = 0x4f,
+		P           = 0x50,
+		Q           = 0x51,
+		R           = 0x52,
+		S           = 0x53,
+		T           = 0x54,
+		U           = 0x55,
+		V           = 0x56,
+		W           = 0x57,
+		X           = 0x58,
+		Y           = 0x59,
+		Z           = 0x5a,
 
 		/* [0x61, 0x7a] reserved for ASCII alphabet */
 
 		// The last key _must_ be <= 0xff
-		COUNT     = 0xff
+		COUNT      = 0xff
 	};
 };
 

+ 79 - 79
src/lua/lua_input.cpp

@@ -20,85 +20,85 @@ struct KeyboardButtonInfo
 
 static KeyboardButtonInfo s_keyboard_button[] =
 {
-	{ "tab",       KeyboardButton::TAB       },
-	{ "enter",     KeyboardButton::ENTER     },
-	{ "escape",    KeyboardButton::ESCAPE    },
-	{ "space",     KeyboardButton::SPACE     },
-	{ "backspace", KeyboardButton::BACKSPACE },
-	{ "kp_0",      KeyboardButton::KP_0      },
-	{ "kp_1",      KeyboardButton::KP_1      },
-	{ "kp_2",      KeyboardButton::KP_2      },
-	{ "kp_3",      KeyboardButton::KP_3      },
-	{ "kp_4",      KeyboardButton::KP_4      },
-	{ "kp_5",      KeyboardButton::KP_5      },
-	{ "kp_6",      KeyboardButton::KP_6      },
-	{ "kp_7",      KeyboardButton::KP_7      },
-	{ "kp_8",      KeyboardButton::KP_8      },
-	{ "kp_9",      KeyboardButton::KP_9      },
-	{ "f1",        KeyboardButton::F1        },
-	{ "f2",        KeyboardButton::F2        },
-	{ "f3",        KeyboardButton::F3        },
-	{ "f4",        KeyboardButton::F4        },
-	{ "f5",        KeyboardButton::F5        },
-	{ "f6",        KeyboardButton::F6        },
-	{ "f7",        KeyboardButton::F7        },
-	{ "f8",        KeyboardButton::F8        },
-	{ "f9",        KeyboardButton::F9        },
-	{ "f10",       KeyboardButton::F10       },
-	{ "f11",       KeyboardButton::F11       },
-	{ "f12",       KeyboardButton::F12       },
-	{ "home",      KeyboardButton::HOME      },
-	{ "left",      KeyboardButton::LEFT      },
-	{ "up",        KeyboardButton::UP        },
-	{ "right",     KeyboardButton::RIGHT     },
-	{ "down",      KeyboardButton::DOWN      },
-	{ "page_up",   KeyboardButton::PAGE_UP   },
-	{ "page_down", KeyboardButton::PAGE_DOWN },
-	{ "lcontrol",  KeyboardButton::LCONTROL  },
-	{ "rcontrol",  KeyboardButton::RCONTROL  },
-	{ "lshift",    KeyboardButton::LSHIFT    },
-	{ "rshift",    KeyboardButton::RSHIFT    },
-	{ "caps_lock", KeyboardButton::CAPS_LOCK },
-	{ "lalt",      KeyboardButton::LALT      },
-	{ "ralt",      KeyboardButton::RALT      },
-	{ "lsuper",    KeyboardButton::LSUPER    },
-	{ "rsuper",    KeyboardButton::RSUPER    },
-	{ "num_0",     KeyboardButton::NUM_0     },
-	{ "num_1",     KeyboardButton::NUM_1     },
-	{ "num_2",     KeyboardButton::NUM_2     },
-	{ "num_3",     KeyboardButton::NUM_3     },
-	{ "num_4",     KeyboardButton::NUM_4     },
-	{ "num_5",     KeyboardButton::NUM_5     },
-	{ "num_6",     KeyboardButton::NUM_6     },
-	{ "num_7",     KeyboardButton::NUM_7     },
-	{ "num_8",     KeyboardButton::NUM_8     },
-	{ "num_9",     KeyboardButton::NUM_9     },
-	{ "a",         KeyboardButton::A         },
-	{ "b",         KeyboardButton::B         },
-	{ "c",         KeyboardButton::C         },
-	{ "d",         KeyboardButton::D         },
-	{ "e",         KeyboardButton::E         },
-	{ "f",         KeyboardButton::F         },
-	{ "g",         KeyboardButton::G         },
-	{ "h",         KeyboardButton::H         },
-	{ "i",         KeyboardButton::I         },
-	{ "j",         KeyboardButton::J         },
-	{ "k",         KeyboardButton::K         },
-	{ "l",         KeyboardButton::L         },
-	{ "m",         KeyboardButton::M         },
-	{ "n",         KeyboardButton::N         },
-	{ "o",         KeyboardButton::O         },
-	{ "p",         KeyboardButton::P         },
-	{ "q",         KeyboardButton::Q         },
-	{ "r",         KeyboardButton::R         },
-	{ "s",         KeyboardButton::S         },
-	{ "t",         KeyboardButton::T         },
-	{ "u",         KeyboardButton::U         },
-	{ "v",         KeyboardButton::V         },
-	{ "w",         KeyboardButton::W         },
-	{ "x",         KeyboardButton::X         },
-	{ "y",         KeyboardButton::Y         },
-	{ "z",         KeyboardButton::Z         }
+	{ "tab",         KeyboardButton::TAB         },
+	{ "enter",       KeyboardButton::ENTER       },
+	{ "escape",      KeyboardButton::ESCAPE      },
+	{ "space",       KeyboardButton::SPACE       },
+	{ "backspace",   KeyboardButton::BACKSPACE   },
+	{ "numpad_0",    KeyboardButton::NUMPAD_0    },
+	{ "numpad_1",    KeyboardButton::NUMPAD_1    },
+	{ "numpad_2",    KeyboardButton::NUMPAD_2    },
+	{ "numpad_3",    KeyboardButton::NUMPAD_3    },
+	{ "numpad_4",    KeyboardButton::NUMPAD_4    },
+	{ "numpad_5",    KeyboardButton::NUMPAD_5    },
+	{ "numpad_6",    KeyboardButton::NUMPAD_6    },
+	{ "numpad_7",    KeyboardButton::NUMPAD_7    },
+	{ "numpad_8",    KeyboardButton::NUMPAD_8    },
+	{ "numpad_9",    KeyboardButton::NUMPAD_9    },
+	{ "f1",          KeyboardButton::F1          },
+	{ "f2",          KeyboardButton::F2          },
+	{ "f3",          KeyboardButton::F3          },
+	{ "f4",          KeyboardButton::F4          },
+	{ "f5",          KeyboardButton::F5          },
+	{ "f6",          KeyboardButton::F6          },
+	{ "f7",          KeyboardButton::F7          },
+	{ "f8",          KeyboardButton::F8          },
+	{ "f9",          KeyboardButton::F9          },
+	{ "f10",         KeyboardButton::F10         },
+	{ "f11",         KeyboardButton::F11         },
+	{ "f12",         KeyboardButton::F12         },
+	{ "home",        KeyboardButton::HOME        },
+	{ "left",        KeyboardButton::LEFT        },
+	{ "up",          KeyboardButton::UP          },
+	{ "right",       KeyboardButton::RIGHT       },
+	{ "down",        KeyboardButton::DOWN        },
+	{ "page_up",     KeyboardButton::PAGE_UP     },
+	{ "page_down",   KeyboardButton::PAGE_DOWN   },
+	{ "left_ctrl",   KeyboardButton::LEFT_CTRL   },
+	{ "right_ctrl",  KeyboardButton::RIGHT_CTRL  },
+	{ "left_shift",  KeyboardButton::LEFT_SHIFT  },
+	{ "right_shift", KeyboardButton::RIGHT_SHIFT },
+	{ "caps_lock",   KeyboardButton::CAPS_LOCK   },
+	{ "left_alt",    KeyboardButton::LEFT_ALT    },
+	{ "right_alt",   KeyboardButton::RIGHT_ALT   },
+	{ "left_super",  KeyboardButton::LEFT_SUPER  },
+	{ "right_super", KeyboardButton::RIGHT_SUPER },
+	{ "0",           KeyboardButton::NUMBER_0    },
+	{ "1",           KeyboardButton::NUMBER_1    },
+	{ "2",           KeyboardButton::NUMBER_2    },
+	{ "3",           KeyboardButton::NUMBER_3    },
+	{ "4",           KeyboardButton::NUMBER_4    },
+	{ "5",           KeyboardButton::NUMBER_5    },
+	{ "6",           KeyboardButton::NUMBER_6    },
+	{ "7",           KeyboardButton::NUMBER_7    },
+	{ "8",           KeyboardButton::NUMBER_8    },
+	{ "9",           KeyboardButton::NUMBER_9    },
+	{ "a",           KeyboardButton::A           },
+	{ "b",           KeyboardButton::B           },
+	{ "c",           KeyboardButton::C           },
+	{ "d",           KeyboardButton::D           },
+	{ "e",           KeyboardButton::E           },
+	{ "f",           KeyboardButton::F           },
+	{ "g",           KeyboardButton::G           },
+	{ "h",           KeyboardButton::H           },
+	{ "i",           KeyboardButton::I           },
+	{ "j",           KeyboardButton::J           },
+	{ "k",           KeyboardButton::K           },
+	{ "l",           KeyboardButton::L           },
+	{ "m",           KeyboardButton::M           },
+	{ "n",           KeyboardButton::N           },
+	{ "o",           KeyboardButton::O           },
+	{ "p",           KeyboardButton::P           },
+	{ "q",           KeyboardButton::Q           },
+	{ "r",           KeyboardButton::R           },
+	{ "s",           KeyboardButton::S           },
+	{ "t",           KeyboardButton::T           },
+	{ "u",           KeyboardButton::U           },
+	{ "v",           KeyboardButton::V           },
+	{ "w",           KeyboardButton::W           },
+	{ "x",           KeyboardButton::X           },
+	{ "y",           KeyboardButton::Y           },
+	{ "z",           KeyboardButton::Z           }
 };
 
 struct MouseButtonInfo

+ 28 - 28
src/main/main_linux.cpp

@@ -100,35 +100,35 @@ static KeyboardButton::Enum x11_translate_key(KeySym x11_key)
 		case XK_Down:      return KeyboardButton::DOWN;
 		case XK_Page_Up:   return KeyboardButton::PAGE_UP;
 		case XK_Page_Down: return KeyboardButton::PAGE_DOWN;
-		case XK_Shift_L:   return KeyboardButton::LSHIFT;
-		case XK_Shift_R:   return KeyboardButton::RSHIFT;
-		case XK_Control_L: return KeyboardButton::LCONTROL;
-		case XK_Control_R: return KeyboardButton::RCONTROL;
+		case XK_Shift_L:   return KeyboardButton::LEFT_SHIFT;
+		case XK_Shift_R:   return KeyboardButton::RIGHT_SHIFT;
+		case XK_Control_L: return KeyboardButton::LEFT_CTRL;
+		case XK_Control_R: return KeyboardButton::RIGHT_CTRL;
 		case XK_Caps_Lock: return KeyboardButton::CAPS_LOCK;
-		case XK_Alt_L:     return KeyboardButton::LALT;
-		case XK_Alt_R:     return KeyboardButton::RALT;
-		case XK_Super_L:   return KeyboardButton::LSUPER;
-		case XK_Super_R:   return KeyboardButton::RSUPER;
-		case XK_KP_0:      return KeyboardButton::KP_0;
-		case XK_KP_1:      return KeyboardButton::KP_1;
-		case XK_KP_2:      return KeyboardButton::KP_2;
-		case XK_KP_3:      return KeyboardButton::KP_3;
-		case XK_KP_4:      return KeyboardButton::KP_4;
-		case XK_KP_5:      return KeyboardButton::KP_5;
-		case XK_KP_6:      return KeyboardButton::KP_6;
-		case XK_KP_7:      return KeyboardButton::KP_7;
-		case XK_KP_8:      return KeyboardButton::KP_8;
-		case XK_KP_9:      return KeyboardButton::KP_9;
-		case '0':          return KeyboardButton::NUM_0;
-		case '1':          return KeyboardButton::NUM_1;
-		case '2':          return KeyboardButton::NUM_2;
-		case '3':          return KeyboardButton::NUM_3;
-		case '4':          return KeyboardButton::NUM_4;
-		case '5':          return KeyboardButton::NUM_5;
-		case '6':          return KeyboardButton::NUM_6;
-		case '7':          return KeyboardButton::NUM_7;
-		case '8':          return KeyboardButton::NUM_8;
-		case '9':          return KeyboardButton::NUM_9;
+		case XK_Alt_L:     return KeyboardButton::LEFT_ALT;
+		case XK_Alt_R:     return KeyboardButton::RIGHT_ALT;
+		case XK_Super_L:   return KeyboardButton::LEFT_SUPER;
+		case XK_Super_R:   return KeyboardButton::RIGHT_SUPER;
+		case XK_KP_0:      return KeyboardButton::NUMPAD_0;
+		case XK_KP_1:      return KeyboardButton::NUMPAD_1;
+		case XK_KP_2:      return KeyboardButton::NUMPAD_2;
+		case XK_KP_3:      return KeyboardButton::NUMPAD_3;
+		case XK_KP_4:      return KeyboardButton::NUMPAD_4;
+		case XK_KP_5:      return KeyboardButton::NUMPAD_5;
+		case XK_KP_6:      return KeyboardButton::NUMPAD_6;
+		case XK_KP_7:      return KeyboardButton::NUMPAD_7;
+		case XK_KP_8:      return KeyboardButton::NUMPAD_8;
+		case XK_KP_9:      return KeyboardButton::NUMPAD_9;
+		case '0':          return KeyboardButton::NUMBER_0;
+		case '1':          return KeyboardButton::NUMBER_1;
+		case '2':          return KeyboardButton::NUMBER_2;
+		case '3':          return KeyboardButton::NUMBER_3;
+		case '4':          return KeyboardButton::NUMBER_4;
+		case '5':          return KeyboardButton::NUMBER_5;
+		case '6':          return KeyboardButton::NUMBER_6;
+		case '7':          return KeyboardButton::NUMBER_7;
+		case '8':          return KeyboardButton::NUMBER_8;
+		case '9':          return KeyboardButton::NUMBER_9;
 		case 'a':          return KeyboardButton::A;
 		case 'b':          return KeyboardButton::B;
 		case 'c':          return KeyboardButton::C;

+ 28 - 28
src/main/main_windows.cpp

@@ -51,35 +51,35 @@ static KeyboardButton::Enum win_translate_key(int32_t winkey)
 		case VK_DOWN:     return KeyboardButton::DOWN;
 		case VK_PRIOR:    return KeyboardButton::PAGE_UP;
 		case VK_NEXT:     return KeyboardButton::PAGE_DOWN;
-		case VK_LSHIFT:   return KeyboardButton::LSHIFT;
-		case VK_RSHIFT:   return KeyboardButton::RSHIFT;
-		case VK_LCONTROL: return KeyboardButton::LCONTROL;
-		case VK_RCONTROL: return KeyboardButton::RCONTROL;
+		case VK_LSHIFT:   return KeyboardButton::LEFT_SHIFT;
+		case VK_RSHIFT:   return KeyboardButton::RIGHT_SHIFT;
+		case VK_LCONTROL: return KeyboardButton::LEFT_CTRL;
+		case VK_RCONTROL: return KeyboardButton::RIGHT_CTRL;
 		case VK_CAPITAL:  return KeyboardButton::CAPS_LOCK;
-		case VK_LMENU:    return KeyboardButton::LALT;
-		case VK_RMENU:    return KeyboardButton::RALT;
-		case VK_LWIN:     return KeyboardButton::LSUPER;
-		case VK_RWIN:     return KeyboardButton::RSUPER;
-		case VK_NUMPAD0:  return KeyboardButton::KP_0;
-		case VK_NUMPAD1:  return KeyboardButton::KP_1;
-		case VK_NUMPAD2:  return KeyboardButton::KP_2;
-		case VK_NUMPAD3:  return KeyboardButton::KP_3;
-		case VK_NUMPAD4:  return KeyboardButton::KP_4;
-		case VK_NUMPAD5:  return KeyboardButton::KP_5;
-		case VK_NUMPAD6:  return KeyboardButton::KP_6;
-		case VK_NUMPAD7:  return KeyboardButton::KP_7;
-		case VK_NUMPAD8:  return KeyboardButton::KP_8;
-		case VK_NUMPAD9:  return KeyboardButton::KP_9;
-		case '0':         return KeyboardButton::NUM_0;
-		case '1':         return KeyboardButton::NUM_1;
-		case '2':         return KeyboardButton::NUM_2;
-		case '3':         return KeyboardButton::NUM_3;
-		case '4':         return KeyboardButton::NUM_4;
-		case '5':         return KeyboardButton::NUM_5;
-		case '6':         return KeyboardButton::NUM_6;
-		case '7':         return KeyboardButton::NUM_7;
-		case '8':         return KeyboardButton::NUM_8;
-		case '9':         return KeyboardButton::NUM_9;
+		case VK_LMENU:    return KeyboardButton::LEFT_ALT;
+		case VK_RMENU:    return KeyboardButton::RIGHT_ALT;
+		case VK_LWIN:     return KeyboardButton::LEFT_SUPER;
+		case VK_RWIN:     return KeyboardButton::RIGHT_SUPER;
+		case VK_NUMPAD0:  return KeyboardButton::NUMPAD_0;
+		case VK_NUMPAD1:  return KeyboardButton::NUMPAD_1;
+		case VK_NUMPAD2:  return KeyboardButton::NUMPAD_2;
+		case VK_NUMPAD3:  return KeyboardButton::NUMPAD_3;
+		case VK_NUMPAD4:  return KeyboardButton::NUMPAD_4;
+		case VK_NUMPAD5:  return KeyboardButton::NUMPAD_5;
+		case VK_NUMPAD6:  return KeyboardButton::NUMPAD_6;
+		case VK_NUMPAD7:  return KeyboardButton::NUMPAD_7;
+		case VK_NUMPAD8:  return KeyboardButton::NUMPAD_8;
+		case VK_NUMPAD9:  return KeyboardButton::NUMPAD_9;
+		case '0':         return KeyboardButton::NUMBER_0;
+		case '1':         return KeyboardButton::NUMBER_1;
+		case '2':         return KeyboardButton::NUMBER_2;
+		case '3':         return KeyboardButton::NUMBER_3;
+		case '4':         return KeyboardButton::NUMBER_4;
+		case '5':         return KeyboardButton::NUMBER_5;
+		case '6':         return KeyboardButton::NUMBER_6;
+		case '7':         return KeyboardButton::NUMBER_7;
+		case '8':         return KeyboardButton::NUMBER_8;
+		case '9':         return KeyboardButton::NUMBER_9;
 		case 'A':         return KeyboardButton::A;
 		case 'B':         return KeyboardButton::B;
 		case 'C':         return KeyboardButton::C;