| Summary: | Caps lock (when mapped as control in x.org) still getting reported as caps lock | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Adam Flott <adam> |
| Component: | events | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED DUPLICATE | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | metalcaedes |
| Version: | 2.0.3 | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
|
Description
Adam Flott
2015-05-10 00:21:14 UTC
Copying relevant information here so you don't have to get it from the yquake2 bugtracker:
He remapped capslock to ctrl with
Section "InputClass"
Identifier "system-keyboard"
MatchIsKeyboard "on"
Option "XkbOptions" "ctrl:nocaps,apple:alupckeys"
EndSection
(Probably in xorg.conf)
X11 seemed to recognize that, probably from xev:
KeyPress event, serial 39, synthetic NO, window 0x1e00001,
root 0x2ce, subw 0x0, time 260084, (1,51), root:(3429,498),
state 0x0, keycode 66 (keysym 0xffe3, Control_L), same_screen YES,
XKeysymToKeycode returns keycode: 37
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 39, synthetic NO, window 0x1e00001,
root 0x2ce, subw 0x0, time 260156, (1,51), root:(3429,498),
state 0x4, keycode 66 (keysym 0xffe3, Control_L), same_screen YES,
XKeysymToKeycode returns keycode: 37
XLookupString gives 0 bytes:
XFilterEvent returns: False
So the X11 keycode is 66 (capslock), but keysym seems to be Control_L, no idea what that "XKeysymToKeycode returns keycode: 37" is about exactly, but 37 is the keycode of left ctrl.
However SDL2 returns keysym SDLK_CAPSLOCK (should be SDLK_LCTRL) and scancode SDL_SCANCODE_CAPSLOCK (this part is ok) according to my little even test program: https://gist.github.com/DanielGibson/12041b57a540cbbfbaf9
ok, this is most probably a duplicate of https://bugzilla.libsdl.org/show_bug.cgi?id=2096 *** This bug has been marked as a duplicate of bug 2096 *** |