• You are not logged in.

    Escape does nothing on Linux

    • Started by bharathyes
    • 7 Replies:
    • Reputation: 2
    • Registered: 06-Oct-2020
    • Posts: 14

    I am on Ubuntu 20.10 with an ANSI board. Extend is working great and I am slowly learning to use it better.

    The one basic trouble I am having is with Escape. I couldn't find any mention about escape not working on Linux. Also it works as it should on windows. Though the usual Esc is still within easy reach it still messes with my positioning.

    Here is my `xev` output ( first pressed the normal Escape at top left. Then Ext + Q )

    KeyPress event, serial 34, synthetic NO, window 0x5000001,
        root 0x106, subw 0x0, time 215124963, (-964,169), root:(109,177),
        state 0x0, keycode 9 (keysym 0xff1b, Escape), same_screen YES,
        XLookupString gives 1 bytes: (1b) "
    mbLookupString gives 1 bytes: (1b) "
    FilterEvent returns: False
    
    KeyRelease event, serial 34, synthetic NO, window 0x5000001,
        root 0x106, subw 0x0, time 215125443, (-964,169), root:(109,177),
        state 0x0, keycode 9 (keysym 0xff1b, Escape), same_screen YES,
        XLookupString gives 1 bytes: (1b) "
    FilterEvent returns: False
    
    KeyPress event, serial 34, synthetic NO, window 0x5000001,
        root 0x106, subw 0x0, time 215126715, (-964,169), root:(109,177),
        state 0x0, keycode 66 (keysym 0xfe11, ISO_Level5_Shift), same_screen YES,
        XLookupString gives 0 bytes: 
        XmbLookupString gives 0 bytes: 
        XFilterEvent returns: False
    
    KeyPress event, serial 34, synthetic NO, window 0x5000001,
        root 0x106, subw 0x0, time 215126948, (-964,169), root:(109,177),
        state 0x20, keycode 9 (keysym 0xffe5, Caps_Lock), same_screen YES,
        XLookupString gives 0 bytes: 
        XmbLookupString gives 0 bytes: 
        XFilterEvent returns: False
    
    KeyRelease event, serial 34, synthetic NO, window 0x5000001,
        root 0x106, subw 0x0, time 215127180, (-964,169), root:(109,177),
        state 0x20, keycode 9 (keysym 0xffe5, Caps_Lock), same_screen YES,
        XLookupString gives 0 bytes: 
        XFilterEvent returns: False
    
    KeyRelease event, serial 34, synthetic NO, window 0x5000001,
        root 0x106, subw 0x0, time 215127500, (-964,169), root:(109,177),
        state 0x20, keycode 66 (keysym 0xfe13, ISO_Level5_Lock), same_screen YES,
        XLookupString gives 0 bytes: 
        XFilterEvent returns: False

    This shows that the keypress is considered as Caps Lock ???? But it doesn't actually trigger Caps Lock like `Ext + Esc` does. `Ext + AltGr + b` produces the same as `Ext + q`

    Here is the current option I have active :

    setxkbmap -model 'pc104caw-zqu' -layout 'us(cmk_ed_us)' -option 'misc:extend,lv5:caps_switch_lock,grp:shifts_toggle,compose:menu,misc:cmk_curl_dh'

    I don't have a good understanding of what is going on here or why this is happening but I am guessing since E+Esc is caps lock E+q is interfering with it?


    PS: Though I have tried to customise the mod keys a bit before, the only change I currently have to the repo is in setxkb.sh file for setting my layout.

    Offline
    • 0
    • Reputation: 117
    • From: UK
    • Registered: 14-Apr-2014
    • Posts: 975

    That's odd, I just tried out Extend+Q in xev, and I do get the correct Escape code. I don't see why the CapsLock mapping should be affecting it, although my CapsLock is set to Extend+apostrophe so I have a slight difference there.

    Using Colemak-DH with Seniply.

    Offline
    • 0
    • Reputation: 210
    • From: Viken, Norway
    • Registered: 13-Dec-2006
    • Posts: 5,343

    I think someone has reported that problem, but I haven't been able to reproduce it. Thing is, Ext+Q sends Escape but in some cases that seems to be recaptured as Ext+Esc which is indeed Caps.

    There should be another Esc mapping, on Ext+LeftBracket. What does that do?

    *** Learn Colemak in 2–5 steps with Tarmak! ***
    *** Check out my Big Bag of Keyboard Tricks for Win/Linux/TMK... ***

    Offline
    • 0
    • Reputation: 2
    • Registered: 06-Oct-2020
    • Posts: 14

    The left bracket "[" too is seen as caps lock in xev.

    KeyPress event, serial 34, synthetic NO, window 0x4e00001,
        root 0x106, subw 0x0, time 189887504, (459,409), root:(1264,416),
        state 0x10, keycode 29 (keysym 0x5b, bracketleft), same_screen YES,
        XLookupString gives 1 bytes: (5b) "["
        XmbLookupString gives 1 bytes: (5b) "["
        XFilterEvent returns: False
    
    KeyRelease event, serial 34, synthetic NO, window 0x4e00001,
        root 0x106, subw 0x0, time 189887600, (459,409), root:(1264,416),
        state 0x10, keycode 29 (keysym 0x5b, bracketleft), same_screen YES,
        XLookupString gives 1 bytes: (5b) "["
        XFilterEvent returns: False
    
    KeyPress event, serial 34, synthetic NO, window 0x4e00001,
        root 0x106, subw 0x0, time 189889032, (459,409), root:(1264,416),
        state 0x10, keycode 66 (keysym 0xfe11, ISO_Level5_Shift), same_screen YES,
        XLookupString gives 0 bytes: 
        XmbLookupString gives 0 bytes: 
        XFilterEvent returns: False
    
    KeyPress event, serial 34, synthetic NO, window 0x4e00001,
        root 0x106, subw 0x0, time 189889424, (459,409), root:(1264,416),
        state 0x30, keycode 9 (keysym 0xffe5, Caps_Lock), same_screen YES,
        XLookupString gives 0 bytes: 
        XmbLookupString gives 0 bytes: 
        XFilterEvent returns: False
    
    KeyRelease event, serial 34, synthetic NO, window 0x4e00001,
        root 0x106, subw 0x0, time 189889520, (459,409), root:(1264,416),
        state 0x30, keycode 9 (keysym 0xffe5, Caps_Lock), same_screen YES,
        XLookupString gives 0 bytes: 
        XFilterEvent returns: False
    
    KeyRelease event, serial 34, synthetic NO, window 0x4e00001,
        root 0x106, subw 0x0, time 189889744, (459,409), root:(1264,416),
        state 0x30, keycode 66 (keysym 0xfe13, ISO_Level5_Lock), same_screen YES,
        XLookupString gives 0 bytes: 
        XFilterEvent returns: False

    What is weird is that both these two keybinds, Ext+q and Ext+[ doesn't actually trigger Caps Lock at the system, but Ext+escape does trigger it.

    BTW can I ask what & where to change the CapsLock binding from Ext+escape to a different key, say Ext+Scroll Lock like how stevep99 mentioned? This might clear whatever is conflicting Escape with Caps Lock.

    Offline
    • 0
    • Reputation: 210
    • From: Viken, Norway
    • Registered: 13-Dec-2006
    • Posts: 5,343

    Oh, there you are. I was meaning to get back to you. I changed some code in the latest commit, could you please try updating your install and try this again?

    The problem was that Ext+Q in the XKB code redirects the key press as an Esc press. But it kept the level5 modifier active which would trigger the Extend+Esc mapping – which is CapsLock. Silly bug. Let me know if it works better now, please!

    *** Learn Colemak in 2–5 steps with Tarmak! ***
    *** Check out my Big Bag of Keyboard Tricks for Win/Linux/TMK... ***

    Offline
    • 0
    • Reputation: 2
    • Registered: 06-Oct-2020
    • Posts: 14

    I didn't check back sooner because I thought the conflict was within my setup. Frankly, I have little to no understanding of how this works.

    I pulled this commit from 3 days ago but I am still getting the same behavior. xev shows both escapes on Extend as CapsLock but neither actually triggers it. The Ext+Esc works as intended.

    Just to check, after pulling the latest commit, I changed the XKBmodel in setxkb.sh to my preference and ran both install and setup script. Am I missing any step to properly update to the new code?

    I hope I am not asking too many mundane questions. It seems all my systems are having some kind of quirk to them.

    Offline
    • 0
    • Reputation: 2
    • Registered: 06-Oct-2020
    • Posts: 14

    @DreymaR The Escape mapping works now :D I just added the two lines from this commit and the escape works on both Ext+q and Ext+[ perfectly.

    Great job. Looking forward to using this, thanks.

    Offline
    • 0
    • Reputation: 210
    • From: Viken, Norway
    • Registered: 13-Dec-2006
    • Posts: 5,343

    Oh, that's lovely to hear! Best of luck with your further escapes and encounters, then!  ( ͡~  ͜ʖ ͡°)

    Escape-Ctrl_QWE-2-Cmk.png

    Last edited by DreymaR (07-Feb-2021 15:02:49)

    *** Learn Colemak in 2–5 steps with Tarmak! ***
    *** Check out my Big Bag of Keyboard Tricks for Win/Linux/TMK... ***

    Offline
    • 0