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

Web keyCode seem not compatible with imgui IO.KeysDown #21

Closed
Eragon-Brisingr opened this issue May 5, 2022 · 4 comments
Closed

Web keyCode seem not compatible with imgui IO.KeysDown #21

Eragon-Brisingr opened this issue May 5, 2022 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@Eragon-Brisingr
Copy link

Eragon-Brisingr commented May 5, 2022

When i test ctrl event, ctrl event not enable.
I think key id is not compatible.
open demo-null and "Inputs Navigation & Focus" -> "Keyboard, Gamepad & Navigation State"

  1. pressed x, name is right
  2. pressed s, name is wrong, and not high light in virtual keyboard
@Eragon-Brisingr
Copy link
Author

May be New IO keyboard/mouse/gamepad event API (1.87) recap can provide some help.

@ggerganov ggerganov added the bug Something isn't working label May 5, 2022
@ggerganov
Copy link
Owner

Thanks for reporting this. I guess the key mapping code needs some attention:

case ImGuiWS::Event::KeyUp:
{
if (event.clientId == curIdControl) {
if (event.key > 0) {
lastKeysDown[event.key] = false;
}
}
}
break;
case ImGuiWS::Event::KeyDown:
{
if (event.clientId == curIdControl) {
if (event.key > 0) {
lastKeysDown[event.key] = true;
}
}
}
break;

@ggerganov
Copy link
Owner

Should be fixed now on latest master (make sure to update the imgui submodule)

@ggerganov ggerganov self-assigned this May 28, 2022
@Eragon-Brisingr
Copy link
Author

Nice, Good job! Thank you fix it, and do you have some idea to apply ImGui VtxOffset?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants