Fix keypad keys not being detected on Linux

This commit is contained in:
Andrew Mickelson 2015-06-13 08:59:44 -07:00 committed by Lukas Dürrenberger
parent b735777c4a
commit da8a325fa3
2 changed files with 20 additions and 20 deletions

View File

@ -346,16 +346,16 @@ void InputImpl::buildMap()
keycodeMap[sf::Keyboard::X] = getKeycode(XK_x);
keycodeMap[sf::Keyboard::Y] = getKeycode(XK_y);
keycodeMap[sf::Keyboard::Z] = getKeycode(XK_z);
keycodeMap[sf::Keyboard::Num0] = getKeycode(XK_0);
keycodeMap[sf::Keyboard::Num1] = getKeycode(XK_1);
keycodeMap[sf::Keyboard::Num2] = getKeycode(XK_2);
keycodeMap[sf::Keyboard::Num3] = getKeycode(XK_3);
keycodeMap[sf::Keyboard::Num4] = getKeycode(XK_4);
keycodeMap[sf::Keyboard::Num5] = getKeycode(XK_5);
keycodeMap[sf::Keyboard::Num6] = getKeycode(XK_6);
keycodeMap[sf::Keyboard::Num7] = getKeycode(XK_7);
keycodeMap[sf::Keyboard::Num8] = getKeycode(XK_8);
keycodeMap[sf::Keyboard::Num9] = getKeycode(XK_9);
keycodeMap[sf::Keyboard::Num0] = getKeycode(XK_KP_Insert);
keycodeMap[sf::Keyboard::Num1] = getKeycode(XK_KP_End);
keycodeMap[sf::Keyboard::Num2] = getKeycode(XK_KP_Down);
keycodeMap[sf::Keyboard::Num3] = getKeycode(XK_KP_Page_Down);
keycodeMap[sf::Keyboard::Num4] = getKeycode(XK_KP_Left);
keycodeMap[sf::Keyboard::Num5] = getKeycode(XK_KP_Begin);
keycodeMap[sf::Keyboard::Num6] = getKeycode(XK_KP_Right);
keycodeMap[sf::Keyboard::Num7] = getKeycode(XK_KP_Home);
keycodeMap[sf::Keyboard::Num8] = getKeycode(XK_KP_Up);
keycodeMap[sf::Keyboard::Num9] = getKeycode(XK_KP_Page_Up);
keycodeMap[sf::Keyboard::Escape] = getKeycode(XK_Escape);
keycodeMap[sf::Keyboard::LControl] = getKeycode(XK_Control_L);
keycodeMap[sf::Keyboard::LShift] = getKeycode(XK_Shift_L);

View File

@ -423,16 +423,16 @@ namespace
case XK_Right: return sf::Keyboard::Right;
case XK_Up: return sf::Keyboard::Up;
case XK_Down: return sf::Keyboard::Down;
case XK_KP_0: return sf::Keyboard::Numpad0;
case XK_KP_1: return sf::Keyboard::Numpad1;
case XK_KP_2: return sf::Keyboard::Numpad2;
case XK_KP_3: return sf::Keyboard::Numpad3;
case XK_KP_4: return sf::Keyboard::Numpad4;
case XK_KP_5: return sf::Keyboard::Numpad5;
case XK_KP_6: return sf::Keyboard::Numpad6;
case XK_KP_7: return sf::Keyboard::Numpad7;
case XK_KP_8: return sf::Keyboard::Numpad8;
case XK_KP_9: return sf::Keyboard::Numpad9;
case XK_KP_Insert: return sf::Keyboard::Numpad0;
case XK_KP_End: return sf::Keyboard::Numpad1;
case XK_KP_Down: return sf::Keyboard::Numpad2;
case XK_KP_Page_Down: return sf::Keyboard::Numpad3;
case XK_KP_Left: return sf::Keyboard::Numpad4;
case XK_KP_Begin: return sf::Keyboard::Numpad5;
case XK_KP_Right: return sf::Keyboard::Numpad6;
case XK_KP_Home: return sf::Keyboard::Numpad7;
case XK_KP_Up: return sf::Keyboard::Numpad8;
case XK_KP_Page_Up: return sf::Keyboard::Numpad9;
case XK_a: return sf::Keyboard::A;
case XK_b: return sf::Keyboard::B;
case XK_c: return sf::Keyboard::C;