Added several new keys to sf::Keyboard. Separated 'normal' and numpad return.

This commit is contained in:
Stefan Schindler 2016-01-21 10:50:10 +01:00
parent 4a12244aab
commit 50341ac3b4
2 changed files with 12 additions and 1 deletions

View File

@ -133,6 +133,12 @@ public:
Numpad7, ///< The numpad 7 key
Numpad8, ///< The numpad 8 key
Numpad9, ///< The numpad 9 key
NumpadReturn, ///< The numpad Return key.
NumpadComma, ///< The numpad Comma key.
NumLock, ///< The Numlock key.
CapsLock, ///< The Caps Lock key.
ScrollLock, ///< The Scroll Lock key.
PrintScreen, ///< The Print Screen key.
F1, ///< The F1 key
F2, ///< The F2 key
F3, ///< The F3 key

View File

@ -267,7 +267,7 @@ namespace
case XK_grave: return sf::Keyboard::Tilde;
case XK_space: return sf::Keyboard::Space;
case XK_Return: return sf::Keyboard::Return;
case XK_KP_Enter: return sf::Keyboard::Return;
case XK_KP_Enter: return sf::Keyboard::NumpadReturn;
case XK_BackSpace: return sf::Keyboard::BackSpace;
case XK_Tab: return sf::Keyboard::Tab;
case XK_Prior: return sf::Keyboard::PageUp;
@ -346,6 +346,11 @@ namespace
case XK_7: return sf::Keyboard::Num7;
case XK_8: return sf::Keyboard::Num8;
case XK_9: return sf::Keyboard::Num9;
case XK_KP_Separator: return sf::Keyboard::NumpadComma;
case XK_Num_Lock: return sf::Keyboard::NumLock;
case XK_Caps_Lock: return sf::Keyboard::CapsLock;
case XK_Scroll_Lock: return sf::Keyboard::ScrollLock;
case XK_Print: return sf::Keyboard::PrintScreen;
}
return sf::Keyboard::Unknown;