Bug 3958 - Openbox is ignoring remapped keys
Status: RESOLVED FIXED
Alias: None
Product: Openbox
Classification: Unclassified
Component: general
Version: 3.4.7.2
Hardware: PC Linux
: P3 normal
Assignee: Dana Jansens
QA Contact:
URL:
: 4023
Depends on:
Blocks:
 
Reported: 2009-02-06 20:31 EST by skottish
Modified: 2009-12-14 15:42:10 EST
1 user (show)

See Also:



Description skottish 2009-02-06 20:31:37 EST
I have the Caps Lock key on my system remapped to Escape with:

xmodmap -e 'clear Lock' -e 'keycode 0x42 = Escape'

Openbox does not recognize the mapping. GTK2, ncurses, and Vim, all see it correctly.

--> xev output of Escape:

KeyPress event, serial 35, synthetic NO, window 0x1200001,
    root 0x13b, subw 0x0, time 23124448, (89,89), root:(1163,782),
    state 0x10, keycode 9 (keysym 0xff1b, Escape), same_screen YES,
    XLookupString gives 1 bytes: (1b) "
    XmbLookupString gives 1 bytes: (1b) "
    XFilterEvent returns: False

KeyRelease event, serial 35, synthetic NO, window 0x1200001,
    root 0x13b, subw 0x0, time 23124600, (89,89), root:(1163,782),
    state 0x10, keycode 9 (keysym 0xff1b, Escape), same_screen YES,
    XLookupString gives 1 bytes: (1b) "
    XFilterEvent returns: False

--> xev output of the remapped Caps Lock:

KeyPress event, serial 35, synthetic NO, window 0x1200001,
    root 0x13b, subw 0x0, time 23132024, (89,89), root:(1163,782),
    state 0x10, keycode 66 (keysym 0xff1b, Escape), same_screen YES,
    XKeysymToKeycode returns keycode: 9
    XLookupString gives 1 bytes: (1b) "
    XmbLookupString gives 1 bytes: (1b) "
    XFilterEvent returns: False

KeyRelease event, serial 35, synthetic NO, window 0x1200001,
    root 0x13b, subw 0x0, time 23132144, (89,89), root:(1163,782),
    state 0x10, keycode 66 (keysym 0xff1b, Escape), same_screen YES,
    XKeysymToKeycode returns keycode: 9
    XLookupString gives 1 bytes: (1b) "
    XFilterEvent returns: False
Comment 1 Mikachu 2009-02-06 20:40:19 EST
What do you mean when you say "does not recognize the mapping"? Openbox will only bind the first key it finds with a given keysym, so maybe that's why whatever you're trying to do doesn't work?
Comment 2 skottish 2009-02-06 21:30:43 EST
A working example would be if I have client-list-combined-menu open and I hit escape, the menu closes. If I do the same with a remapped caps lock, it doesn't close. Doesn't the output that I posted from xev show the keysym to be equal? Or am I not understanding?
Comment 3 Mikachu 2009-02-06 21:36:13 EST
If you were to make your escape key not have the Escape keysym, then the rebound caps lock would work in openbox. On the one hand, it shouldn't be too hard to make openbox bind all keys with a given keysym, on the other hand it is very unusual to have the same key in two places.
Comment 4 skottish 2009-02-06 21:47:02 EST
Cool. I'll give a shot. Thanks a lot for looking at this.
Comment 5 Mikachu 2009-07-05 16:06:39 EDT
*** Bug 4023 has been marked as a duplicate of this bug. ***
Comment 6 Dana Jansens 2009-12-14 15:42:10 EST
Fixed in commit d55f4b41c6ebf00e36a5e91ddc962a753f6c9ef8