divergent post keyboard mapping

so the first and most consistent annoyance i’ve been dealing with on my laptop has been that the System76 Lemur13 – great laptop btw – has a small form factor keyboard. most typing has been relatively trouble free, however I have relatively big fingers, so I started digging into the fixes for eliminating my struggles/typos.

i run garuda-linux which is arch based, and an excellent distro for a laptop. arch has been my favorite for a while, but i know its using wayland and some of the old x11 keyboard remapping will not work on gnome 48. after some digging around i found keyd in github and a simple

sudo pacman -Syu keyd && sudo systemctl enable keyd –now

installed and got up things up and running. now to tackle my 2 issues:

  1. pageup/pagedown keys are tiny and directly above left/right keys (they are 1/2 key size)
  2. keep hitting Caps Lock and with no indication on keyboard miss-type passwords etc all the time
  3. want my shift keys to be tapped and not held for password inputs, name capitalizations etc

the man keyd page was useful as well as the web for trying to find some proper configs. after the install you need to create /etc/keyd/default.conf

sudo nano /etc/keyd/default.conf

i started with the recommeded default listed on the github readme.md and didn’t like it. the process for troubleshooting here is this

keyd monitor -> this lets you find the key names in the active mapping (running map) my key label PgUp for example is called pageup and PgDn is pagedown. i also needed to know the control buttons (leftcontrol and rightcontrol) as you might expect and a few others CapsLock was capslock and leftshift was left shift.

keyd reload -> lets you upload the new keymap after you save the default config.

so the process goes like this:

  1. make changes in default.conf
  2. keyd reload
  3. keyd monitor (observe changes are correct)

i also found the order of operations was important – here’s my current config:

[ids]

*

[main]

capslock = leftshift
shift = oneshot(shift)
pagedown = right
pageup = left

rightcontrol = layer(nav)

[nav]

pageup = pageup
pagedown = pagedown

the effects of the above:

  1. capslock = leftshift -> I usually accidentally hit capslock while trying to hit shift typing passwords (essentially this makes for 1 large left shift button but not locking capslock down).
  2. shift = oneshot(shift) -> either shift button when tapped will lock until another button is pressed making that a capital or whatever
  3. pagedown/pageup = right/left -> remapped to right/left buttons essentially making 1 larger right/left button since PgUp and Left were both half-buttons. this helps alot with navigating nano, vim etc
  4. rightcontrol = layer (nav) this sets up where when right control is pressed (which i don’t usually use) the functionality of the pageup/pagedown buttons is correct. also helpful for navigating nano, vim etc the [nav] section allows me to redefine those buttons back to their original mappings.

so that’s it. read the keyd man page, look at the keyd github page @ https://github.com/rvaiya/keyd and play around with it a bit. helped me solve my problems and thats just the tip of the iceberg, its capable of much, much more.