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

Keys don't get released when a window loses focus in X #687

Closed
SDLBugzilla opened this issue Feb 10, 2021 · 0 comments
Closed

Keys don't get released when a window loses focus in X #687

SDLBugzilla opened this issue Feb 10, 2021 · 0 comments

Comments

@SDLBugzilla
Copy link
Collaborator

This bug report was migrated from our old Bugzilla tracker.

Reported in version: HG 2.0
Reported for operating system, platform: Linux, x86_64

Comments on the original bug report:

On 2012-10-22 11:39:53 +0000, Sik wrote:

When a window loses focus in X, it seems like the status of any keys that were pressed is not reset, which results in the program thinking they were never released (I've confirmed this in my program by making it show the status of some keys). Ideally, the program should think all keys are unreleased when the window loses focus.

This bug is really serious with Alt+Tab, since it means the Alt modifier keeps being held down, and any program that relies on modifiers for shortcuts will be unable to detect the shortcuts properly until the user presses the Alt key again (this keeps constantly biting me back as the level editor in my game relies on them, rendering it unusable).

Using Ubuntu 11.04 64-bit.

On 2013-07-11 00:33:28 +0000, Ryan C. Gordon wrote:

This got fixed at some point; getting a FocusOut event in X11 eventually results in an SDL_ResetKeyboard() call, which resets any pressed keys to released.

Confirmed working on a Ubuntu 12.04 install.

--ryan.

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

1 participant