• You are not logged in.

    Setting up in Pop Linux

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

    Hello people of the community. :)

    I have been looking to adopt to Colemak into my keyboards usage. I switched to it first on my mobile (without any mods as none is readily available on GBoards other than vanilla layout) primarily to see if I can get used to the layout. And a few days back I came across DreymaR's BBKT and decided to switch on my linux OS too.

    My setup: ANSI layout on a HP Omen running Pop OS 20.04.

    I have applied "pc104caw-zqu" which I assume is wide, curl mod with Z in the middle. I have switched my key caps too to help adapt faster. Most of the functionality is available but there are a few issues I haven't been able to iron out. I have looked through the forum but the solutions either don't fit my setup or I get confused with the terminology used. I understand some functionality is not yet available in Linux while some others are probably not been properly setup by me.

    What I have done so far:

    1. Cloned git repo
      2. Executed install and setup scripts.
      3. Under Linux's 'keyboard setting' have changed to colemak with wide mod.
      4. Added "sudo bash ~/src/git-clones/BigBagKbdTrixXKB/setxkb.sh" into .bashrc but I have to manually execute the script after first login to get the extend layer. Either the command I have used is wrong or since I have set fish as my default shell the command doesn't run. Not sure which.

    Would appreciate any help for these:
    1. On boot login screen, QWERTY is enabled with wide mod enabled. Switches to Colemak after the first login. Can I switch to colemak before typing the password?
    2. Extend layer needs to be manually enabled after each reboot by running the setup script. How to make it persistent?
    3. Only the directional keys, backspace/delete and cut/copy/paste work on extend layer. Even Q for ESC doesn't work. I really wanted that, as previously I was using caps as ESC. Reaching the corner ESC means I constantly loose the home rows easily without the homing bumps.
    4. Does mouse and other extend keys not work on Linux? Do I need to setup anything else for it?
    5. How to customize the layers and even the modifiers? Not sure of which file to edit. I want to change the middle column to have brackets by default as currently it types Å Æ. I only type in English and I want to make programming easier. So I want to customize the layers to my needs. Also maybe the extend key to bottom row or simply switch Win key and alt. Altering AltGr to have programming symbols might better suit me. Is there an existing layout I can use for programming?

    I am trying to learn how to setup properly to better adapt to the layout. My goal is to build either the USB-USB converter or a split mech that I can program to have colemak and the extend functionality so as to easily carry around a plug and play setup instead of setting it up especially on a office device once I get a job. Till then practising and adapting with the built in keeb.

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

    Your point #4 is wrong. What you want to do is execute that script manually with the -a switch to get a command written in your .bashrc file. Maybe it won't get sourced on your distro though, look into using ~/.xprofile instead?

    1) Yes. Don't recall how to set the login layout though.
    2) Get it sourced at logon, see above.
    3) Supposed to be working, so no idea...
    4) For mousekeys you may need to press the MouseKeys key to switch them on; there's one in Extend.
    5) The default Colemak has brackets. You got the Norwegian layout by not specifying a locale in your setxkb. Read closely about setup, and run scripts with -h.

    Most of the editables are in xkb/symbols in the colemak and extend files. Modifiers are harder.

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

    Offline
    • 0
    • Reputation: 117
    • From: UK
    • Registered: 14-Apr-2014
    • Posts: 978
    bharathyes said:

    How to customize the layers and even the modifiers? Not sure of which file to edit. I want to change the middle column to have brackets by default as currently it types Å Æ. I only type in English and I want to make programming easier. So I want to customize the layers to my needs. Also maybe the extend key to bottom row or simply switch Win key and alt. Altering AltGr to have programming symbols might better suit me. Is there an existing layout I can use for programming?

    What you have described there is remarkably close to what I have done:

    LeftAlt mapped to Extend
    CapsLock mapped to Win/Super
    LeftWin mapped to Alt

    In other words, something like this. I prefer Extend on a thumb key, but YMMV depending on where LeftAlt key is on your keyboard. To change around modifiers in xkb you need to edit xkb/keycodes/evdev. Or, there is now another alternative: kmonad which might be of interest, especially if you are thinking to replicate the QMK style approach.

    I also have a "programming layer" which is a customized AltGr layer containing with brackets, symbols, numbers etc, since I don't have much need for foreign characters.

    Using Colemak-DH with Seniply.

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

    Your point #4 is wrong. What you want to do is execute that script manually with the -a switch to get a command written in your .bashrc file. Maybe it won't get sourced on your distro though, look into using ~/.xprofile instead?
    5) The default Colemak has brackets. You got the Norwegian layout by not specifying a locale in your setxkb. Read closely about setup, and run scripts with -h.

    Thanks. The proper cmd was generated and have also changed the locale to us. The cmd still doesn't run on boot from .bashrc so I will look into that part further.

    DreymaR said:

    3) Supposed to be working, so no idea...

    hmm... Maybe something in my setup is causing some conflict with the ESC key. I'll have to test on a different machine or try to remap to a different key.

    DreymaR said:

    4) For mousekeys you may need to press the MouseKeys key to switch them on; there's one in Extend.

    I am not sure which key it is on [img]ANSI[/img]. I only see the 3 button, 4 movement and 2 scroll keys.

    BTW this is so great. Just using extend for a couple days I am so glad for it. The backspace remapping alone is so helpful and with time tne nav cluster would help me a lot. Thanks.

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

    To change around modifiers in xkb you need to edit xkb/keycodes/evdev.
    Or, there is now another alternative: kmonad which might be of interest, especially if you are thinking to replicate the QMK style approach.

    Kmonad seems nice and easy to configure. Been trying to setup but facing some issues. Till now managed to install it using stack and got your keymap too and edited to be wide mod. It works in the dry run but currently I am not able to find the event-file name of my inbuilt keyboard. '/dev/input/by-id' only has the webcam and my external mouse.
    Is there a better way to identify the file for a laptop keyboard?  There is a file ending in 'kbd' under '/dev/input/by-path' but getting permission denied. Weird thing is if I try to run kmonad as sudo i am getting "sudo: kmonad: command not found".

    (defcfg
      ;; ** For Linux **
      ;; input  (device-file "/dev/input/by-id/usb-04d9_USB-HID_Keyboard-event-kbd")
      input  (device-file "/dev/input/by-path/platform-i8042-serio-0-event-kbd")
      ;; input  (device-file "/dev/input/by-id/usb-Matias_Ergo_Pro_Keyboard-event-kbd")
      output (uinput-sink "KMonad output")
    
      ;; ** For Windows **
      ;; input  (low-level-hook)
      ;; output (send-event-sink)
    
      ;; ** For MacOS **
      ;; input  (iokit-name "my-keyboard-product-string")
      ;; output (kext)
    
      fallthrough true
    )
    
    (defsrc
      esc     f1   f2   f3   f4   f5   f6   f7   f8   f9   f10  f11  f12
      grv     1    2    3    4    5    6    =    7    8    9    0    -    bspc
      tab     q    w    e    r    t    [    y    u    i    o    p    ;    '    \
      caps    a    s    d    f    g    ]    h    j    k    l    ret
      lsft      z    x    c    v    b    /    n    m    ,    .    rsft
      lctl    lmet lalt           spc            ralt rctl
    )
     
    (defalias
      ext  (layer-toggle extend) ;; Bind 'ext' to the Extend Layer
      sym  (layer-toggle symbols) ;; Bind 'sym' to Symbols Layer
    )
    
    (defalias
      cpy C-c
      pst C-v
      cut C-x
      udo C-z
      all C-a
      fnd C-f
      bk Back
      fw Forward
      £ S-3  ;;UK pound sign
    )
    
    (deflayer colemak-dh
      lalt     f1   f2   f3   f4   f5   f6   f7   f8   f9   f10  f11  f12
      grv      1    2    3    4    5    6    =    7    8    9    0    -    bspc
      tab      q    w    f    p    b    [    j    l    u    y    ;    '    \\
      esc     a    r    s    t    g    ]    k    n    e    i    o    ret
      lsft       x    c    d    v    z    /    m    h    ,    .    rsft
      lctl     lmet @ext           spc            @sym rmet
    )
    
    (deflayer extend
      _        play rewind previoussong nextsong ejectcd refresh brdn brup www mail prog1 prog2
      _        f1   f2   f3   f4   f5   f6   f7   f8   f9  f10   f11  f12  ret
      _        esc  @bk  @fnd @fw  ins prnt pgup home up   end  menu slck _
      _        @all tab  lsft lctl lalt caps pgdn lft  down rght bks _
      _          @cut @cpy @pst @pst @udo f13 del  comp  pgdn  f14 _
      _        _    _              ret            _    _
    )
    
    (deflayer symbols
      _        _    _    _    _    _    _    _    _    _    _    _    _    
      _        _    _    _    _    _    _    _    _    _    _    _    _    _
      _        S-1  S-2  S-3  S-4  S-5  =    7    8    9    +    «    »    _
      _        \_   [    {    \(   S-6  *    4    5    6    -    _    _
      _          ]    }    \)   S-7  `    0    1    2    3    /    _
      _        _    _              _              _    _
    )
    
    (deflayer empty
      _        _    _    _    _    _    _    _    _    _    _    _    _    
      _        _    _    _    _    _    _    _    _    _    _    _    _    _
      _        _    _    _    _    _    _    _    _    _    _    _    _    _
      _        _    _    _    _    _    _    _    _    _    _    _    _ 
      _          _    _    _    _    _    _    _    _    _    _    _ 
      _        _    _              _              _    _
    )

    Any suggestion on kmonad? If not this I should just try editting the file like you said but kmonad seems legit useful and simpler once setup.

    stevep99 said:

    I also have a "programming layer" which is a customized AltGr layer containing with brackets, symbols, numbers etc, since I don't have much need for foreign characters.

    Will try this but I only saw .ahk files in that repo. Can these be applied in Linux too?

    Again thanks for the suggestions. And the key-maps too.

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

    Hi again!

    No, AHK files are for Windows. Autohotkey is a Windows automating tool, very neat.

    Looking at the Extend(1) image in the Big Bag for Linux/XKB topic, I see that I may have put the MouseKeys key on the ISO key next to LShift, which you don't have if you're on an ANSI board. Can you find it in the symbols/extend file and swap with another key, such as the tilde/grave key?

    key <TLDE>
    key <LSGT>

    You could simply swap their names in the brackets. The TLDE key is a spare key in Extend.

    Actually, I just did that in the repo. So if you refresh and reinstall my files you'll get it too. But that simple edit may be faster to do.

    Last edited by DreymaR (12-Oct-2020 07:54:54)

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

    Offline
    • 0
    • Reputation: 117
    • From: UK
    • Registered: 14-Apr-2014
    • Posts: 978
    bharathyes said:

    Any suggestion on kmonad? If not this I should just try editting the file like you said but kmonad seems legit useful and simpler once setup.

    Maybe could be something to do with permissions? The kmonad FAQ mentions about needing to be in "uinput" group for example. There might be subtle differences between linuxes too. I'm not well versed in this though.


    bharathyes said:

    Will try this but I only saw .ahk files in that repo. Can these be applied in Linux too?

    I have implemented my linux version by just forking DreymaR's big bag and having my own custom mapping file.

    Using Colemak-DH with Seniply.

    Offline
    • 0