From 72cd8781bbe35009c0a1660de4daf54394ca24fa Mon Sep 17 00:00:00 2001 From: Chris Thrasher Date: Sun, 22 Jan 2023 10:59:48 -0700 Subject: [PATCH] Remove deprecated keycodes --- include/SFML/Window/Keyboard.hpp | 10 ------- src/SFML/Window/Android/WindowImplAndroid.cpp | 2 +- src/SFML/Window/DRM/InputImplUDev.cpp | 2 +- src/SFML/Window/Unix/KeySymToKeyMapping.cpp | 26 +++++++++---------- 4 files changed, 15 insertions(+), 25 deletions(-) diff --git a/include/SFML/Window/Keyboard.hpp b/include/SFML/Window/Keyboard.hpp index f9befc55..217a1cc6 100644 --- a/include/SFML/Window/Keyboard.hpp +++ b/include/SFML/Window/Keyboard.hpp @@ -154,16 +154,6 @@ enum Key Pause, //!< The Pause key KeyCount, //!< Keep last -- the total number of keyboard keys - - // Deprecated values: - - Tilde = Grave, //!< \deprecated Use Grave instead - Dash = Hyphen, //!< \deprecated Use Hyphen instead - BackSpace = Backspace, //!< \deprecated Use Backspace instead - BackSlash = Backslash, //!< \deprecated Use Backslash instead - SemiColon = Semicolon, //!< \deprecated Use Semicolon instead - Return = Enter, //!< \deprecated Use Enter instead - Quote = Apostrophe //!< \deprecated Use Apostrophe instead }; //////////////////////////////////////////////////////////// diff --git a/src/SFML/Window/Android/WindowImplAndroid.cpp b/src/SFML/Window/Android/WindowImplAndroid.cpp index ccba57ab..415bf5a9 100644 --- a/src/SFML/Window/Android/WindowImplAndroid.cpp +++ b/src/SFML/Window/Android/WindowImplAndroid.cpp @@ -647,7 +647,7 @@ Keyboard::Key WindowImplAndroid::androidKeyToSF(std::int32_t key) case AKEYCODE_RIGHT_BRACKET: return Keyboard::RBracket; case AKEYCODE_BACKSLASH: return Keyboard::Backslash; case AKEYCODE_SEMICOLON: return Keyboard::Semicolon; - case AKEYCODE_APOSTROPHE: return Keyboard::Quote; + case AKEYCODE_APOSTROPHE: return Keyboard::Apostrophe; case AKEYCODE_SLASH: return Keyboard::Slash; case AKEYCODE_AT: case AKEYCODE_NUM: diff --git a/src/SFML/Window/DRM/InputImplUDev.cpp b/src/SFML/Window/DRM/InputImplUDev.cpp index bc0382c2..52f1cc20 100644 --- a/src/SFML/Window/DRM/InputImplUDev.cpp +++ b/src/SFML/Window/DRM/InputImplUDev.cpp @@ -227,7 +227,7 @@ sf::Keyboard::Key toKey(int code) case KEY_K: return sf::Keyboard::K; case KEY_L: return sf::Keyboard::L; case KEY_SEMICOLON: return sf::Keyboard::Semicolon; - case KEY_APOSTROPHE: return sf::Keyboard::Quote; + case KEY_APOSTROPHE: return sf::Keyboard::Apostrophe; case KEY_GRAVE: return sf::Keyboard::Grave; case KEY_LEFTSHIFT: return sf::Keyboard::LShift; case KEY_BACKSLASH: return sf::Keyboard::Backslash; diff --git a/src/SFML/Window/Unix/KeySymToKeyMapping.cpp b/src/SFML/Window/Unix/KeySymToKeyMapping.cpp index 3f410775..07f9c617 100644 --- a/src/SFML/Window/Unix/KeySymToKeyMapping.cpp +++ b/src/SFML/Window/Unix/KeySymToKeyMapping.cpp @@ -49,21 +49,21 @@ Keyboard::Key keySymToKey(KeySym symbol) case XK_Super_R: return Keyboard::RSystem; case XK_Menu: return Keyboard::Menu; case XK_Escape: return Keyboard::Escape; - case XK_semicolon: return Keyboard::SemiColon; + case XK_semicolon: return Keyboard::Semicolon; case XK_slash: return Keyboard::Slash; case XK_equal: return Keyboard::Equal; - case XK_minus: return Keyboard::Dash; + case XK_minus: return Keyboard::Hyphen; case XK_bracketleft: return Keyboard::LBracket; case XK_bracketright: return Keyboard::RBracket; case XK_comma: return Keyboard::Comma; case XK_period: return Keyboard::Period; - case XK_apostrophe: return Keyboard::Quote; - case XK_backslash: return Keyboard::BackSlash; + case XK_apostrophe: return Keyboard::Apostrophe; + case XK_backslash: return Keyboard::Backslash; case XK_grave: return Keyboard::Grave; case XK_space: return Keyboard::Space; - case XK_Return: return Keyboard::Return; - case XK_KP_Enter: return Keyboard::Return; - case XK_BackSpace: return Keyboard::BackSpace; + case XK_Return: return Keyboard::Enter; + case XK_KP_Enter: return Keyboard::Enter; + case XK_BackSpace: return Keyboard::Backspace; case XK_Tab: return Keyboard::Tab; case XK_Prior: return Keyboard::PageUp; case XK_Next: return Keyboard::PageDown; @@ -164,20 +164,20 @@ KeySym keyToKeySym(Keyboard::Key key) case Keyboard::RSystem: return XK_Super_R; case Keyboard::Menu: return XK_Menu; case Keyboard::Escape: return XK_Escape; - case Keyboard::SemiColon: return XK_semicolon; + case Keyboard::Semicolon: return XK_semicolon; case Keyboard::Slash: return XK_slash; case Keyboard::Equal: return XK_equal; - case Keyboard::Dash: return XK_minus; + case Keyboard::Hyphen: return XK_minus; case Keyboard::LBracket: return XK_bracketleft; case Keyboard::RBracket: return XK_bracketright; case Keyboard::Comma: return XK_comma; case Keyboard::Period: return XK_period; - case Keyboard::Quote: return XK_apostrophe; - case Keyboard::BackSlash: return XK_backslash; + case Keyboard::Apostrophe: return XK_apostrophe; + case Keyboard::Backslash: return XK_backslash; case Keyboard::Grave: return XK_grave; case Keyboard::Space: return XK_space; - case Keyboard::Return: return XK_Return; - case Keyboard::BackSpace: return XK_BackSpace; + case Keyboard::Enter: return XK_Return; + case Keyboard::Backspace: return XK_BackSpace; case Keyboard::Tab: return XK_Tab; case Keyboard::PageUp: return XK_Prior; case Keyboard::PageDown: return XK_Next;