Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Renamed Keyboard::Back to Keyboard::BackSpace

  • Loading branch information...
commit dd51b3d8ff466159e750b02dafa6f7ad7cb1d4af 1 parent d7b4e26
@LaurentGomila LaurentGomila authored
View
2  include/SFML/Window/Keyboard.hpp
@@ -106,7 +106,7 @@ public :
Dash, ///< The - key
Space, ///< The Space key
Return, ///< The Return key
- Back, ///< The Backspace key
+ BackSpace, ///< The Backspace key
Tab, ///< The Tabulation key
PageUp, ///< The Page up key
PageDown, ///< The Page down key
View
2  src/SFML/Window/Linux/InputImpl.cpp
@@ -125,7 +125,7 @@ bool InputImpl::isKeyPressed(Keyboard::Key key)
case Keyboard::Dash: keysym = XK_minus; break;
case Keyboard::Space: keysym = XK_space; break;
case Keyboard::Return: keysym = XK_Return; break;
- case Keyboard::Back: keysym = XK_BackSpace; break;
+ case Keyboard::BackSpace: keysym = XK_BackSpace; break;
case Keyboard::Tab: keysym = XK_Tab; break;
case Keyboard::PageUp: keysym = XK_Prior; break;
case Keyboard::PageDown: keysym = XK_Next; break;
View
2  src/SFML/Window/Linux/WindowImplX11.cpp
@@ -859,7 +859,7 @@ Keyboard::Key WindowImplX11::keysymToSF(KeySym symbol)
case XK_space : return Keyboard::Space;
case XK_Return : return Keyboard::Return;
case XK_KP_Enter : return Keyboard::Return;
- case XK_BackSpace : return Keyboard::Back;
+ case XK_BackSpace : return Keyboard::BackSpace;
case XK_Tab : return Keyboard::Tab;
case XK_Prior : return Keyboard::PageUp;
case XK_Next : return Keyboard::PageDown;
View
2  src/SFML/Window/OSX/HIDInputManager.mm
@@ -934,7 +934,7 @@
case 0x31: return sf::Keyboard::Space;
// case 0x4c: /* keypad */ return sf::Keyboard::Return;
case 0x24: /* keyboard */ return sf::Keyboard::Return;
- case 0x33: return sf::Keyboard::Back;
+ case 0x33: return sf::Keyboard::BackSpace;
case 0x30: return sf::Keyboard::Tab;
// Duplicates (see next §).
View
2  src/SFML/Window/Win32/InputImpl.cpp
@@ -108,7 +108,7 @@ bool InputImpl::isKeyPressed(Keyboard::Key key)
case Keyboard::Dash: vkey = VK_OEM_MINUS; break;
case Keyboard::Space: vkey = VK_SPACE; break;
case Keyboard::Return: vkey = VK_RETURN; break;
- case Keyboard::Back: vkey = VK_BACK; break;
+ case Keyboard::BackSpace: vkey = VK_BACK; break;
case Keyboard::Tab: vkey = VK_TAB; break;
case Keyboard::PageUp: vkey = VK_PRIOR; break;
case Keyboard::PageDown: vkey = VK_NEXT; break;
View
2  src/SFML/Window/Win32/WindowImplWin32.cpp
@@ -708,7 +708,7 @@ Keyboard::Key WindowImplWin32::virtualKeyCodeToSF(WPARAM key, LPARAM flags)
case VK_ESCAPE : return Keyboard::Escape;
case VK_SPACE : return Keyboard::Space;
case VK_RETURN : return Keyboard::Return;
- case VK_BACK : return Keyboard::Back;
+ case VK_BACK : return Keyboard::BackSpace;
case VK_TAB : return Keyboard::Tab;
case VK_PRIOR : return Keyboard::PageUp;
case VK_NEXT : return Keyboard::PageDown;

3 comments on commit dd51b3d

@bastienleonard

Isn't it a bit inconsistent to have BackSpace (two words) described as “the backspace key“ (one word)? It's especially noticeable in my binding, since it becomes BACK_SPACE.

@LaurentGomila

I can write "the back space" key in the comment if you prefer.

I decided to have two words for consistency with other identifiers (BackSlash, PageUp, SemiColon, ...).

Please sign in to comment.
Something went wrong with that request. Please try again.