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

Spacebar not responding #1979

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

Spacebar not responding #1979

SDLBugzilla opened this issue Feb 11, 2021 · 0 comments

Comments

@SDLBugzilla
Copy link
Collaborator

This bug report was migrated from our old Bugzilla tracker.

These attachments are available in the static archive:

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

Comments on the original bug report:

On 2015-09-26 21:36:04 +0000, kongr45gpen wrote:

The space key does not seem to be responding on the latest changeset (9879:8465a79c9f85 - https://hg.libsdl.org/SDL/changeset/8465a79c9f85) from Mercurial SDL.

After using hg's bisect, I was able to narrow down the issue to 9842:8a89b58895c1 (http://hg.libsdl.org/SDL/rev/8a89b58895c1).

Note that SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM is set to 1 for my build.

On 2015-09-29 20:38:52 +0000, Alex Baines wrote:

I can't personally reproduce this, but it might be that the group obtained from XkbGetState is out of range for the call to XkbKeycodeToKeysym for that particular (space) key.

I think we're supposed to check XkbKeyGroupInfo + XkbKeyNumGroups and manually correct the group before calling XkbKeyCodeToKeysym. Atleast that's what this stackoverflow answer seems to suggest: http://stackoverflow.com/a/10233743

It seems really weird that XkbKeycodeToKeysym wouldn't do that internally though...

On 2015-09-30 14:31:07 +0000, kongr45gpen wrote:

The call to XkbKeycodeToKeysym does return NoSymbol for me, suggesting that the group is out of range for that key.

On 2015-09-30 19:51:09 +0000, Alex Baines wrote:

Created attachment 2280
Experimental patch to correct groups sent to XkbKeycodeToKeysym

Try this patch, hopefully it will fix the problem.

On 2015-09-30 19:56:39 +0000, kongr45gpen wrote:

Yup, the patch has fixed the issue, thanks!

On 2015-10-01 17:19:51 +0000, Alex Baines wrote:

Created attachment 2282
Patch to correct XkbKeycodeToKeysym groups v2

Here's a better version of the patch that only remaps the group if it was actually out of range.

On 2015-10-01 19:18:44 +0000, Alex Baines wrote:

Created attachment 2283
Patch to correct XkbKeycodeToKeysym groups v3

I was using XkbOutOfRangeGroupInfo instead of XkbOutOfRangeGroupNumber in the last patches, this one fixes that.

Hopefully this one does everything as it should, kinda hard to know since the documentation on this stuff is pretty much non-existent.

On 2016-10-01 21:22:49 +0000, Sam Lantinga wrote:

Fixed, thanks!
https://hg.libsdl.org/SDL/rev/0426a82e291d

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