Skip to content

Commit

Permalink
Renamed Keyboard::Back to Keyboard::BackSpace
Browse files Browse the repository at this point in the history
  • Loading branch information
LaurentGomila committed Jun 19, 2012
1 parent d7b4e26 commit dd51b3d
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion include/SFML/Window/Keyboard.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/SFML/Window/Linux/InputImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/SFML/Window/Linux/WindowImplX11.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/SFML/Window/OSX/HIDInputManager.mm
Original file line number Diff line number Diff line change
Expand Up @@ -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 §).
Expand Down
2 changes: 1 addition & 1 deletion src/SFML/Window/Win32/InputImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/SFML/Window/Win32/WindowImplWin32.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

3 comments on commit dd51b3d

@bastienleonard
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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, ...).

@bastienleonard
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure.

Please sign in to comment.