Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SDL numpad enter mapping #3031

Closed
Davido71 opened this issue Feb 18, 2020 · 1 comment
Closed

SDL numpad enter mapping #3031

Davido71 opened this issue Feb 18, 2020 · 1 comment
Labels

Comments

@Davido71
Copy link

I'm using SDL (SDL2 version 2.0.10) with a OpenGL3 backend. When I used the flag ImGuiInputTextFlags_EnterReturnsTrue the 'return' key works but the numpad 'enter' does not.

I fixed it by changing the following code in imgui_impl_sdl.cpp

// From
io.KeyMap[ImGuiKey_KeyPadEnter] = SDL_SCANCODE_RETURN2;

// To
io.KeyMap[ImGuiKey_KeyPadEnter] = SDL_SCANCODE_KP_ENTER;

Thought I'd pass it along. Thanks for your work!

@ocornut
Copy link
Owner

ocornut commented Feb 20, 2020

Fixed, thank you @Davido71 !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants