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

remmapped keys not converted #126

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

remmapped keys not converted #126

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

Comments on the original bug report:

On 2009-01-04 10:26:40 +0000, Edgar Simo wrote:

It looks like SDL 1.3 isn't remapping some keys. How it works, you for example remap caps lock to escape, and when you press caps lock you'll get caps lock instead of escape when you should be getting escape because you remapped it to escape. This works with SDL 1.2, but not with SDL 1.3.

Here is some stuff from the ML:

Reproduce by remapping Caps lock to Escape:

You can set the behaviour with:

xmodmap -e 'clear lock'
xmodmap -e 'keycode 66 = Escape'

This is my xev output:

KeyPress event, serial 34, synthetic NO, window 0x1800001,
root 0x7b, subw 0x0, time 1868946, (159,-94), root:(1259,712),
state 0x0, keycode 9 (keysym 0xff1b, Escape), same_screen YES,
XLookupString gives 1 bytes: (1b) "ape), same_screen YES,
XLookupString gives 1 bytes: (1b) "es: (61) "a"
XmbLookupString gives 1 bytes: (61) "a"
XFilterEvent returns: False

KeyPress event, serial 34, synthetic NO, window 0x1800001,
root 0x7b, subw 0x0, time 1871690, (159,-94), root:(1259,712),
state 0x0, keycode 66 (keysym 0xff1b, Escape), same_screen YES,
XKeysymToKeycode returns keycode: 9
XLookupString gives 1 bytes: (1b) "cape), same_screen YES,
XKeysymToKeycode returns keycode: 9
XLookupString gives 1 bytes: (1b)

And checkkeys:

Sam Lantinga wrote:

You can set the behaviour with:
xmodmap -e 'clear lock'
xmodmap -e 'keycode 66 = Escape'

This is my xev output:

KeyPress event, serial 34, synthetic NO, window 0x1800001,
root 0x7b, subw 0x0, time 1868946, (159,-94), root:(1259,712),
state 0x0, keycode 9 (keysym 0xff1b, Escape), same_screen YES,
XLookupString gives 1 bytes: (1b) "ape), same_screen YES,
XLookupString gives 1 bytes: (1b) "es: (61) "a"
XmbLookupString gives 1 bytes: (61) "a"
XFilterEvent returns: False

KeyPress event, serial 34, synthetic NO, window 0x1800001,
root 0x7b, subw 0x0, time 1871690, (159,-94), root:(1259,712),
state 0x0, keycode 66 (keysym 0xff1b, Escape), same_screen YES,
XKeysymToKeycode returns keycode: 9
XLookupString gives 1 bytes: (1b) "cape), same_screen YES,
XKeysymToKeycode returns keycode: 9
XLookupString gives 1 bytes: (1b)

What is the output of checkkeys with the latest subversion?
(make clean; make install; cd test; ./configure; make checkkeys)

See ya!
-Sam Lantinga, Founder and President, Galaxy Gameworks LLC

On 2009-01-04 10:28:36 +0000, Edgar Simo wrote:

Err damn, copied the wrong second email, sorry:

Sam Lantinga wrote:

What is the output of checkkeys with the latest subversion?
(make clean; make install; cd test; ./configure; make checkkeys)

[bobbens@ghanima (/src/SDL/test)] $ svn up
At revision 4347.
[bobbens@ghanima (
/src/SDL/test)] $ ./checkkeys
Sending text event
Unknown Key (scancode 41 = Escape) pressed modifiers: (none)
Text:
Unknown Key (scancode 41 = Escape) released modifiers: (none)
Sending text event
Key pressed : scancode 57 = CapsLock, keycode 0x40000039 = CapsLock
modifiers: CAPS
Text:
Key released: scancode 57 = CapsLock, keycode 0x40000039 = CapsLock
modifiers: CAPS

Okay, I see what's happening here. We're not expecting non-alphanumeric
keys to be remapped, so we're using the default mappings on X11. Can you
enter a bug in bugzilla for this?

Thanks!
-Sam Lantinga, Founder and President, Galaxy Gameworks LLC

On 2009-01-04 22:32:46 +0000, Sam Lantinga wrote:

Fixed bug # 669
Generate a full set of SDLKey mappings when setting up the keyboard layout
Committed revision 4357.

Daft-Freak pushed a commit to Daft-Freak/SDL that referenced this issue Jul 8, 2021
This uses the mechanism added in emscripten-core/emscripten#10843
which was applied to SDL1 and OpenAL. This adds the same for SDL2.

This also reverts commit 865eaddffed50dbd13e6564c3f73902472cf74e8
which did something similar, but the new mechanism is more effective.
Daft-Freak pushed a commit to Daft-Freak/SDL that referenced this issue Jul 8, 2021
This uses the mechanism added in emscripten-core/emscripten#10843
which was applied to SDL1 and OpenAL. This adds the same for SDL2.

This also reverts commit 865eaddffed50dbd13e6564c3f73902472cf74e8
which did something similar, but the new mechanism is more effective.
Daft-Freak pushed a commit to Daft-Freak/SDL that referenced this issue Jul 8, 2021
This uses the mechanism added in emscripten-core/emscripten#10843
which was applied to SDL1 and OpenAL. This adds the same for SDL2.

This also reverts commit 865eaddffed50dbd13e6564c3f73902472cf74e8
which did something similar, but the new mechanism is more effective.
Daft-Freak pushed a commit to Daft-Freak/SDL that referenced this issue Jul 8, 2021
This uses the mechanism added in emscripten-core/emscripten#10843
which was applied to SDL1 and OpenAL. This adds the same for SDL2.

This also reverts commit 865eaddffed50dbd13e6564c3f73902472cf74e8
which did something similar, but the new mechanism is more effective.
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