Skip to content

[rcore][rgfw] No key release on focus loss #4975

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

Open
M374LX opened this issue May 31, 2025 · 4 comments
Open

[rcore][rgfw] No key release on focus loss #4975

M374LX opened this issue May 31, 2025 · 4 comments

Comments

@M374LX
Copy link
Contributor

M374LX commented May 31, 2025

With the RGFW backend, when the window loses focus while a key is still being held, the program behaves as if the key were still being held, even if it is actually released after the focus loss.

The issue is not present in the GLFW and SDL backends.

@raysan5
Copy link
Owner

raysan5 commented Jun 3, 2025

@M374LX could you send a PR to address this issue?

@M374LX
Copy link
Contributor Author

M374LX commented Jun 3, 2025

@ColleagueRiley Apparently, GLFW and SDL automatically generate a key release event for each key being held when the window loses focus, which RGFW does not. Do you think RGFW should do the same?

https://github.com/glfw/glfw/blob/e7ea71be039836da3a98cea55ae5569cb5eb885c/src/window.c#L43

@ColleagueRiley
Copy link
Contributor

Although the solution seems sketchy, I think it's worth implementing. Sadly I don't think there is a better solution.

This issue should probably be moved over to the RGFW repo.

@M374LX
Copy link
Contributor Author

M374LX commented Jun 4, 2025

Here it is: ColleagueRiley/RGFW#171.

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

No branches or pull requests

3 participants