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

Very odd behavior with multi-modifier-key binding #125

Open
gandalf3 opened this issue Aug 22, 2018 · 0 comments
Open

Very odd behavior with multi-modifier-key binding #125

gandalf3 opened this issue Aug 22, 2018 · 0 comments

Comments

@gandalf3
Copy link

I am attempting to bind Shift_L + Shift_R to toggle capslock, but the naive rule

Shift_L + Shift_R 
	xdotool key Caps_Lock

Triggers only when Shift_R is pressed, regardless of the state of Shift_L. Even stranger, while attempting to work around this, I found the following rule nearly works:

shift + ~Shift_{L,R} 
	xdotool key Caps_Lock

Except, somehow it is triggered when one presses Shift:p, where Shift is either Shift_L or Shift_R but not both. So far that's the only combination I've discovered which can trigger it besides the intended Left ShiftRight Shift.

Tested each with an empty configuration (no other binds), sxhkd -v 0.5.9.

Xev output when pressing Right Shift:p with the latter binding is as follows (I definitely pressed p and did not press Shift_L, despite what xev seems to indicate):

KeyPress event, serial 33, synthetic NO, window 0x4c00001,
    root 0x6d3, subw 0x0, time 181953461, (473,389), root:(3045,761),
    state 0x0, keycode 62 (keysym 0xffe2, Shift_R), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 33, synthetic NO, window 0x4c00001,
    root 0x6d3, subw 0x0, time 181953621, (473,389), root:(3045,761),
    state 0x1, keycode 47 (keysym 0x3a, colon), same_screen YES,
    XLookupString gives 1 bytes: (3a) ":"
    XmbLookupString gives 1 bytes: (3a) ":"
    XFilterEvent returns: False

FocusOut event, serial 33, synthetic NO, window 0x4c00001,
    mode NotifyGrab, detail NotifyAncestor

FocusOut event, serial 33, synthetic NO, window 0x4c00001,
    mode NotifyUngrab, detail NotifyPointer

FocusIn event, serial 33, synthetic NO, window 0x4c00001,
    mode NotifyUngrab, detail NotifyAncestor

KeymapNotify event, serial 33, synthetic NO, window 0x0,
    keys:  0   0   0   0   0   4294967168 4   64  0   0   0   0   0   0   0   0   
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   

KeyPress event, serial 33, synthetic NO, window 0x4c00001,
    root 0x6d3, subw 0x0, time 181953829, (473,389), root:(3045,761),
    state 0x1, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

MappingNotify event, serial 33, synthetic NO, window 0x0,
    request MappingKeyboard, first_keycode 8, count 1

MappingNotify event, serial 33, synthetic NO, window 0x0,
    request MappingKeyboard, first_keycode 8, count 1

MappingNotify event, serial 33, synthetic NO, window 0x0,
    request MappingKeyboard, first_keycode 8, count 1

MappingNotify event, serial 33, synthetic NO, window 0x0,
    request MappingKeyboard, first_keycode 8, count 1

MappingNotify event, serial 33, synthetic NO, window 0x0,
    request MappingKeyboard, first_keycode 8, count 1

MappingNotify event, serial 33, synthetic NO, window 0x0,
    request MappingKeyboard, first_keycode 8, count 1

MappingNotify event, serial 33, synthetic NO, window 0x0,
    request MappingKeyboard, first_keycode 8, count 1

MappingNotify event, serial 33, synthetic NO, window 0x0,
    request MappingKeyboard, first_keycode 8, count 1

MappingNotify event, serial 33, synthetic NO, window 0x0,
    request MappingKeyboard, first_keycode 8, count 1

MappingNotify event, serial 33, synthetic NO, window 0x0,
    request MappingKeyboard, first_keycode 8, count 1

MappingNotify event, serial 43, synthetic NO, window 0x0,
    request MappingKeyboard, first_keycode 8, count 248

KeyPress event, serial 43, synthetic NO, window 0x4c00001,
    root 0x6d3, subw 0x0, time 181953838, (473,389), root:(3045,761),
    state 0x1, keycode 8 (keysym 0xffe5, Caps_Lock), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

MappingNotify event, serial 44, synthetic NO, window 0x0,
    request MappingKeyboard, first_keycode 8, count 1

MappingNotify event, serial 44, synthetic NO, window 0x0,
    request MappingKeyboard, first_keycode 8, count 1

MappingNotify event, serial 44, synthetic NO, window 0x0,
    request MappingKeyboard, first_keycode 8, count 1

MappingNotify event, serial 44, synthetic NO, window 0x0,
    request MappingKeyboard, first_keycode 8, count 1

MappingNotify event, serial 44, synthetic NO, window 0x0,
    request MappingKeyboard, first_keycode 8, count 1

MappingNotify event, serial 44, synthetic NO, window 0x0,
    request MappingKeyboard, first_keycode 8, count 1

MappingNotify event, serial 44, synthetic NO, window 0x0,
    request MappingKeyboard, first_keycode 8, count 1

MappingNotify event, serial 44, synthetic NO, window 0x0,
    request MappingKeyboard, first_keycode 8, count 1

MappingNotify event, serial 44, synthetic NO, window 0x0,
    request MappingKeyboard, first_keycode 8, count 1

MappingNotify event, serial 44, synthetic NO, window 0x0,
    request MappingKeyboard, first_keycode 8, count 1

MappingNotify event, serial 54, synthetic NO, window 0x0,
    request MappingKeyboard, first_keycode 8, count 1

MappingNotify event, serial 54, synthetic NO, window 0x0,
    request MappingKeyboard, first_keycode 8, count 1

MappingNotify event, serial 54, synthetic NO, window 0x0,
    request MappingKeyboard, first_keycode 8, count 1

MappingNotify event, serial 54, synthetic NO, window 0x0,
    request MappingKeyboard, first_keycode 8, count 1

MappingNotify event, serial 54, synthetic NO, window 0x0,
    request MappingKeyboard, first_keycode 8, count 1

MappingNotify event, serial 54, synthetic NO, window 0x0,
    request MappingKeyboard, first_keycode 8, count 1

MappingNotify event, serial 54, synthetic NO, window 0x0,
    request MappingKeyboard, first_keycode 8, count 1

MappingNotify event, serial 54, synthetic NO, window 0x0,
    request MappingKeyboard, first_keycode 8, count 1

MappingNotify event, serial 54, synthetic NO, window 0x0,
    request MappingKeyboard, first_keycode 8, count 1

MappingNotify event, serial 54, synthetic NO, window 0x0,
    request MappingKeyboard, first_keycode 8, count 1

KeyRelease event, serial 62, synthetic NO, window 0x4c00001,
    root 0x6d3, subw 0x0, time 181953853, (473,389), root:(3045,761),
    state 0x3, keycode 8 (keysym 0xffe5, Caps_Lock), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

MappingNotify event, serial 64, synthetic NO, window 0x0,
    request MappingKeyboard, first_keycode 8, count 1

MappingNotify event, serial 64, synthetic NO, window 0x0,
    request MappingKeyboard, first_keycode 8, count 1

MappingNotify event, serial 64, synthetic NO, window 0x0,
    request MappingKeyboard, first_keycode 8, count 1

MappingNotify event, serial 64, synthetic NO, window 0x0,
    request MappingKeyboard, first_keycode 8, count 1

MappingNotify event, serial 64, synthetic NO, window 0x0,
    request MappingKeyboard, first_keycode 8, count 1

MappingNotify event, serial 64, synthetic NO, window 0x0,
    request MappingKeyboard, first_keycode 8, count 1

MappingNotify event, serial 64, synthetic NO, window 0x0,
    request MappingKeyboard, first_keycode 8, count 1

MappingNotify event, serial 64, synthetic NO, window 0x0,
    request MappingKeyboard, first_keycode 8, count 1

MappingNotify event, serial 64, synthetic NO, window 0x0,
    request MappingKeyboard, first_keycode 8, count 1

MappingNotify event, serial 64, synthetic NO, window 0x0,
    request MappingKeyboard, first_keycode 8, count 1

MappingNotify event, serial 74, synthetic NO, window 0x0,
    request MappingKeyboard, first_keycode 8, count 248

KeyRelease event, serial 74, synthetic NO, window 0x4c00001,
    root 0x6d3, subw 0x0, time 181953893, (473,389), root:(3045,761),
    state 0x3, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 75, synthetic NO, window 0x4c00001,
    root 0x6d3, subw 0x0, time 181954005, (473,389), root:(3045,761),
    state 0x3, keycode 47 (keysym 0x3a, colon), same_screen YES,
    XLookupString gives 1 bytes: (3a) ":"
    XFilterEvent returns: False

KeyRelease event, serial 75, synthetic NO, window 0x4c00001,
    root 0x6d3, subw 0x0, time 181954037, (473,389), root:(3045,761),
    state 0x3, keycode 62 (keysym 0xffe2, Shift_R), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False
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