• You are not logged in.

    Varied result on ubuntu

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

    Hi. I have been using colemak + extend on win10 and on a ubuntu desktop for 7 months now. I am pretty addicted but now I am feeling the pain of not having them.

    I just installed ubuntu on my laptop. And I just can't figure out what is going on.

    1. cloned `BigBagKbdTrixXKB` repo.
    2. Ran both install script and setxkb with `SetXStr='4caw'` or `XKBmodel=pc104aw-zqu`. I also tried few others to see if that helps.
    3. Under settings> region> add input sources I was only able to find English Colemak[eD] Curl-DH ergo mod.

    I have an ANSI set and need curl angle wide mods. After one whole day of trying to figure out to get setup this is where I am at:

    Most applications have colemak dh without wide mod and z is still near the left shift. I can still mostly type. Does this matches with the keyboard layout I have enabled? Cos the layout image displayed seems the one I want but this isn't.
    But in some apps like vs code, etc something way more weird happens. I have no idea if this is some valid layout I have accidentally triggered.

    ```
    123456=7890-
    qwerb[yuiop'\
    asdfg]mjkl;
    xcdvz/nh,.
    ```

    looks like wide and curl are enabled with a mix of qwerty and colemak mixed?

    But most importantly I can't have Extend working on any layout I try. Caps keep triggering Caps Lock.

    ----

    For the life of me I am unable to figure out how I setup previously. Also, I had first tried with Pop OS on this same laptop but gave up due to setup issues. I am now thinking there is hw specific issue with this one.

    Is this something anyone has encountered before? Because this is definitely my error. I am thinking of reinstalling the entire OS and try fresh or just go to win10.

    Am I doomed to going back to win 10 or using qwerty? I am already dreading having to potenially using mac os without colemak dh eD at a new workplace. Is the USB quickie my only option now?

    Attachments:
    Offline
    • 0
    • Reputation: 171
    • From: Viken, Norway
    • Registered: 13-Dec-2006
    • Posts: 5,145
    bharathyes said:

    1. cloned `BigBagKbdTrixXKB` repo.
    2. Ran both install script and setxkb with `SetXStr='4caw'` or `XKBmodel=pc104aw-zqu`. I also tried few others to see if that helps.
    3. Under settings> region> add input sources I was only able to find English Colemak[eD] Curl-DH ergo mod.

    I have an ANSI set and need curl angle wide mods. After one whole day of trying to figure out to get setup this is where I am at:

    Most applications have colemak dh without wide mod and z is still near the left shift. I can still mostly type. Does this matches with the keyboard layout I have enabled? Cos the layout image displayed seems the one I want but this isn't.
    But in some apps like vs code, etc something way more weird happens. I have no idea if this is some valid layout I have accidentally triggered.

    123456=7890-
    qwerb[yuiop'\
    asdfg]mjkl;
    xcdvz/nh,.

    looks like wide and curl are enabled with a mix of qwerty and colemak mixed?

    But most importantly I can't have Extend working on any layout I try. Caps keep triggering Caps Lock.

    Oh dear. Yes, that mix you got there is a QWERTY layout with the CurlAngleWide mod applied to it. Obviously, the Curl mod doesn't make good sense on QWERTY...

    On the other hand, in your applications it seems you've got it the other way around: The Colemak-DH layout is active but not the keyboard model component (pc104aw-zqu).

    Your setup looks about right. If you run the setxkb.sh script with the "4caw us us" shortstring, what's the result? And have you put the resulting setxkbmap command somewhere that's sourced at your startup/logon, like at the end of a ~/.bashrc file (I suppose Ubuntu still sources bashrc?)?

    My best guess is you may have selected something by setxkbmap command and something by GUI. Those two methods don't always play nicely together. The thing with GUI settings is that Ubuntu stopped letting you set your keyboard model (which is where I put the CAW mod) by GUI; I don't know how that stands today actually.

    Unfortunately, I'm not using Ubuntu right now apart from the Windows Sublayer for Linux which doesn't use the X server to my knowledge. So I'm short on testing possibilities as it stands. I'm looking at installing WSL 2 soon, but so far I haven't.

    I'm hoping we can figure this one out together!  (b ̄◇ ̄)b

    Last edited by DreymaR (25-Jun-2021 08:28:48)

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

    Offline
    • 0
    • Reputation: 108
    • From: UK
    • Registered: 14-Apr-2014
    • Posts: 907

    Just a quick note to second the notion of not trusting the keyboard selection UI in Ubuntu, I never got it to work properly either.

    Instead, I used to configure it so that my setxkb.sh ran on startup, with the appropriate arguments defined in that file, which seemed worked well.

    Using Colemak Mod-DH with some additional ergonomic keyboard mods.

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

    All setxkb.sh really does is produce a setxkbmap command, so you could just source that directly instead of running my script at each startup. Then you wouldn't have to worry about displacing the script or anything.

    *** 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
    DreymaR said:

    On the other hand, in your applications it seems you've got it the other way around: The Colemak-DH layout is active but not the keyboard model component (pc104aw-zqu).

    This is because in the gui there was only three colemak-eD options present under for English. Is there supposed to be one separate for Curl angle wide? But the image I get with currently selected Curl-DH seems to have curl angle wide.

    !! Sorry I can't figure out how to make the below images smaller !!

    r8Ynu51.png
    BFr2GWX.png


    DreymaR said:

    Your setup looks about right. If you run the setxkb.sh script with the "4caw us us" shortstring, what's the result? And have you put the resulting setxkbmap command somewhere that's sourced at your startup/logon, like at the end of a ~/.bashrc file (I suppose Ubuntu still sources bashrc?)?

    I'll post the result after getting onto ubuntu. But I ran it with 4caw us us and -a flag which included the setxkbmap command into .bashrc

    Of interest is this time colemak layout works on the login screen too. Doesn't on my desktop. If only the colemak had wide and curl in the layout.


    stevep99 said:

    Just a quick note to second the notion of not trusting the keyboard selection UI in Ubuntu, I never got it to work properly either.
    Instead, I used to configure it so that my setxkb.sh ran on startup, with the appropriate arguments defined in that file, which seemed worked well.

    For me the colemak layout only started working once I changed in the GUI. I remember doing the same on my desktop setup too but turns out it is still on plain English US.


    DreymaR said:

    My best guess is you may have selected something by setxkbmap command and something by GUI. Those two methods don't always play nicely together. The thing with GUI settings is that Ubuntu stopped letting you set your keyboard model (which is where I put the CAW mod) by GUI; I don't know how that stands today actually.

    I am guessing I should try reinstalling. I am anyways planning on doing regolith on ubuntu. But I can't use anything without the keyboard. Somehow in these months I have forgotten how to type in qwerty. I barely make 15wpm while looking at a spare keyboard.


    DreymaR said:

    Unfortunately, I'm not using Ubuntu right now apart from the Windows Sublayer for Linux which doesn't use the X server to my knowledge. So I'm short on testing possibilities as it stands. I'm looking at installing WSL 2 soon, but so far I haven't.

    I'm hoping we can figure this one out together!  (b ̄◇ ̄)b

    I am not sure if WSL2 requires any additional setup. The EPKL for win works great with WSL2. Unless you meant that to test the xkb version.
    You guys are always helpful and I always do all kinds of weird mistakes and trigger some random behavior I don't understand. Next I'll be asking how to keep the left shift on win working as long as depressed instead as one off.

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

    Running setxkb.sh :

    Welcome to fish, the friendly interactive shell
    Type `help` for instructions on how to use fish
    qwa@dates ~/s/g/BigBagKbdTrixXKB (master)> chmod +x *.sh
    qwa@dates ~/s/g/BigBagKbdTrixXKB (master)> 
    sudo bash ./setxkb.sh -a "4caw us us"
    [sudo] password for qwa: 
    
    @@@ DreymaR's setxkbmap script (by GadOE, 2020-12) @@@
    ¤ Using model/layout 'pc104aw-zqu'/'us(cmk_ed_us)' from ShortStr
    ¤ Changed dir to '/usr/share/X11/xkb'
    ¤ Looking for and removing any old .xkm server files
    ¤ Running setxkbmap:
    
    Setting verbose level to 9
    locale is C
    Warning! Multiple definitions of keyboard model
             Using command line, ignoring X server
    Warning! Multiple definitions of keyboard layout
             Using command line, ignoring X server
    Trying to load rules file ./rules/evdev...
    Success.
    Applied rules from evdev:
    rules:      evdev
    model:      pc104aw-zqu
    layout:     us(cmk_ed_us)
    options:    misc:extend,lv5:caps_switch_lock,grp:shifts_toggle,compose:menu,misc:cmk_curl_dh
    Trying to build keymap using the following components:
    keycodes:   evdev(pc104aw-zqu)+aliases(qwerty)
    types:      complete
    compat:     complete
    symbols:    pc+us(cmk_ed_us)+inet(evdev)+group(shifts_toggle)+compose(menu)+level5(caps_switch_lock)+extend(basic)+colemak(cmk_ed_dh)
    geometry:   pc(pc104aw-zqu)
    
    ¤ Adding setxkbmap cmd to /home/qwa/.bashrc
    
    ¤ Changed dir to '/home/qwa/src/git-clones/BigBagKbdTrixXKB'
    
    @@@ setxkb.sh finished! @@@

    Command written to .bashrc too. Same behaviour.

    ##-> DreymaR's SetXKB.sh: Activate layout
    setxkbmap -model 'pc104aw-zqu' -layout 'us(cmk_ed_us)' -option 'misc:extend,lv5:caps_switch_lock,grp:shifts_toggle,compose:menu,misc:cmk_curl_dh'
    ##<- DreymaR's SetXKB.sh

    Ran this command manually too. No change in behaviour.

    xev on caps lock:

    KeyPress event, serial 34, synthetic NO, window 0x1600001,
        root 0x29f, subw 0x0, time 806292, (216,761), root:(254,863),
        state 0x10, keycode 66 (keysym 0xfe11, ISO_Level5_Shift), same_screen YES,
        XLookupString gives 0 bytes: 
        XmbLookupString gives 0 bytes: 
        XFilterEvent returns: False
    
    KeyRelease event, serial 37, synthetic NO, window 0x1600001,
        root 0x29f, subw 0x0, time 806740, (216,761), root:(254,863),
        state 0x12, keycode 66 (keysym 0xfe11, ISO_Level5_Shift), same_screen YES,
        XLookupString gives 0 bytes: 
        XFilterEvent returns: False

    It does say lvl5 shift and not caps lock. Isn't that what triggers the Extend layer?

    Extend layer is still not enabled by caps lock. Thinking there is a good chance this is issue is specific to my laptop model or just mine.

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

    Can you by any chance change your keyboard model in the GUI now? That'd be very useful. It still looks like a conflict between the GUI setting and the command line one.

    From the looks of it, your Extend should be working from the command line. In the GUI you can at least set the options misc:extend and lv5:caps_switch_lock, I'm pretty sure of that from my Ubuntu days. Make sure you don't have any conflicting CapsLockBehavior options set.

    Last edited by DreymaR (26-Jun-2021 08:03:42)

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

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

    You were right. The problem is mostly fixed and for some odd reason using Wayland seems to be the problem for me.

    DreymaR said:

    Can you by any chance change your keyboard model in the GUI now? That'd be very useful. It still looks like a conflict between the GUI setting and the command line one.

    I tried fixing the keyboard model in file `/etc/default/keyboard` with the following:

    XKBMODEL=pc104aw-zqu
    XKBLAYOUT=us
    XKBVARIANT=cmk_ed_dh
    XKBOPTIONS=misc:extend,lv5:caps_switch_lock,grp:shifts_toggle,compose:menu,misc:cmk_curl_dh
    BACKSPACE=guess

    This kept not working with multiple formats. Finally switched to X server at login and now it works with zero issues. This inspite of many forums saying xkb is compatible with Wayland. Might be this file is not used in latest versions? But this was the only way I found to force a keyboard model though isn't applicable in Wayland.

    DreymaR said:

    From the looks of it, your Extend should be working from the command line. In the GUI you can at least set the options misc:extend and lv5:caps_switch_lock, I'm pretty sure of that from my Ubuntu days. Make sure you don't have any conflicting CapsLockBehavior options set.

    Like you said, I enabled two options relating to lvl5 extend on caps using Gnome Tweak tool and Extend works without any flaw.

    Thank you so much for the help. Mikka Nandri :D

    Offline
    • 1
    • Reputation: 171
    • From: Viken, Norway
    • Registered: 13-Dec-2006
    • Posts: 5,145

    Yeah, I guess Wayland may not use the /etc/default/keyboard file anymore? It was a bit touch-and-go even before Wayland.

    I guess I'll try to get WSL2 working on my comp soon. That'll be useful. I'm also planning to look more closely into KMonad, but I've been very busy making EPKL for Windows awesome.

    Last edited by DreymaR (26-Jun-2021 17:36:18)

    *** 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

    KMonad sounds nice. Can't wait to see how that turns out.
    I just tried xmonad where the gnome GUI settings aren't available but still the keyboard setup works perfect. So just running the setxkb.sh must have been enough if not for Wayland.

    WSL and your EPKL is what allows me to stay in Win10 for long and gives me a consistent platform when I can't use linux. So thanks for that.

    Offline
    • 1
    • Reputation: 171
    • From: Viken, Norway
    • Registered: 13-Dec-2006
    • Posts: 5,145

    Yeah... Did you hear that I'm making Compose for EPKL these days? Another bridge between Linux and Windows, as it were. I know there's already a WinCompose program but I think it's nice to have it in EPKL. Not sure how EPKL would play with WinCompose either, if they both use system keyboard hooks.  ¯\(º_o)/¯

    Last edited by DreymaR (26-Jun-2021 20:45:58)

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

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

    Glad to hear more functionalities ore being added to it. I personally have never used Compose on either system. Its main use I know is typing special characters? But I have stuck with plain English so far.

    Still I am excited to see this progress.

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

    Yeah, you can easily type for instance e ' then Compose for é. But my Compose key can make nearly anything now, so you can get your email by composing 'eml' or whatever you want. And you can have completions such as typing t then Compose for the. Yesterday I sat down and made entries for some of my favorite emojis; they won't show up here though so I can't show you. But they're fun to use on Discord.

    Last edited by DreymaR (27-Jun-2021 08:45:10)

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

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

    Wow.. autocomplete sounds cool.

    The other sounds like running commands as in mod+key ? Might help launch frequently used programs if that is how it works, especially on win where I have to either search or have on task icons and use numbers.

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

    No, for now at least the Compose method can only produce text output. You could use it for running commands on a command line, but you can't make compose sequences run EPKL functions. It can do escaped Enter/Tab/Backspace though, and any Unicode strings.

    Last edited by DreymaR (27-Jun-2021 12:36:21)

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

    Offline
    • 1