We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 2978 - Caps lock (when mapped as control in x.org) still getting reported as caps lock
Summary: Caps lock (when mapped as control in x.org) still getting reported as caps lock
Status: RESOLVED DUPLICATE of bug 2096
Alias: None
Product: SDL
Classification: Unclassified
Component: events (show other bugs)
Version: 2.0.3
Hardware: x86_64 Linux
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-10 00:21 UTC by Adam Flott
Modified: 2015-05-28 20:06 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Flott 2015-05-10 00:21:14 UTC
See https://github.com/yquake2/yquake2/issues/70 for details
Comment 1 Daniel Gibson 2015-05-10 03:18:39 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
Comment 2 Daniel Gibson 2015-05-28 20:06:14 UTC
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 ***