Skip to content

Commit

Permalink
(#47) Fix android delete/backspace keycodes
Browse files Browse the repository at this point in the history
Previously SFML used wrong keycodes for backspace/delete keys - was
fixed in SFML 2.5.
  • Loading branch information
Alia5 authored and eliasdaler committed Nov 12, 2021
1 parent 2eaf1fd commit 7444659
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions imgui-SFML.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -278,12 +278,8 @@ void Init(sf::Window& window, const sf::Vector2f& displaySize, bool loadDefaultF
io.KeyMap[ImGuiKey_Home] = sf::Keyboard::Home;
io.KeyMap[ImGuiKey_End] = sf::Keyboard::End;
io.KeyMap[ImGuiKey_Insert] = sf::Keyboard::Insert;
#ifdef ANDROID
io.KeyMap[ImGuiKey_Backspace] = sf::Keyboard::Delete;
#else
io.KeyMap[ImGuiKey_Delete] = sf::Keyboard::Delete;
io.KeyMap[ImGuiKey_Backspace] = sf::Keyboard::BackSpace;
#endif
io.KeyMap[ImGuiKey_Space] = sf::Keyboard::Space;
io.KeyMap[ImGuiKey_Enter] = sf::Keyboard::Return;
io.KeyMap[ImGuiKey_Escape] = sf::Keyboard::Escape;
Expand Down

0 comments on commit 7444659

Please sign in to comment.