You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The default remap script does not persist well when new keyboards are plugged in or sometimes the remaps seem to disable themselves. The current method also does not work in the TTY, whereas the keyd daemon does.
It's also very lightweight and fast compared to the current solution using setxkbmap and xcape.
here is a simple config to remap caps lock to esc and meta:
[ids]
# accept all keyboards for this remap
*
[main]
# Maps capslock to escape when pressed and meta when held.
capslock = overload(meta, esc)
You can also go much deeper with this. Here is my current config with home row mods (able to be disabled for things that may need you to hold down keys) and a layer with hjkl converted to arrow keys:
[ids]
*
[main]
capslock = overload(arrows, esc)
bookmarks = toggle(disablehrm)
esc = capslock
# home row mods
a = overloadi(a, overloadt(alt, a, 200), 150)
s = overloadi(s, overloadt(shift, s, 200), 150)
d = overloadi(d, overloadt(control, d, 200), 150)
f = overloadi(f, overloadt(meta, f, 200), 150)
j = overloadi(j, overloadt(meta, j, 200), 150)
k = overloadi(k, overloadt(control, k, 200), 150)
l = overloadi(l, overloadt(shift, l, 200), 150)
; = overloadi(;, overloadt(alt, ;, 200), 150)
[disablehrm]
a = a
s = s
d = d
f = f
j = j
k = k
l = l
; = ;
[arrows]
h = left
j = down
k = up
l = right
The text was updated successfully, but these errors were encountered:
Great suggestion, thank you @TurtleMeds . In addition to what you said, I noticed that the current LARBS method also maps the meta keys to esc, leading to a whopping 4 escape keys on the same keyboard (if you have two meta keys).
I tested keyd and can confirm it's an easy switch for Arch Linux users, probably for Artix users as well. To use keyd, remove the remapd entry in ~/.config/x11/xprofile and restart. Then run pacman -S keyd and, as sudo, copy the following to /etc/keyd/default.conf (this file must be created).
[ids]
*
[main]
# Maps capslock to escape when pressed and meta when held.
capslock = overload(meta, esc)
# Maps menu button to meta.
compose = rightmeta
To apply your remaps, start the daemon with sudo systemctl enable --now keyd. That's it. (Artix users will enable this according to their own init system).
To keep the default LARBS cursor speed, you can add a line containing xset r rate 300 50 to ~/.config/x11/xprofile.
The default remap script does not persist well when new keyboards are plugged in or sometimes the remaps seem to disable themselves. The current method also does not work in the TTY, whereas the keyd daemon does.
It's also very lightweight and fast compared to the current solution using setxkbmap and xcape.
here is a simple config to remap caps lock to esc and meta:
You can also go much deeper with this. Here is my current config with home row mods (able to be disabled for things that may need you to hold down keys) and a layer with hjkl converted to arrow keys:
The text was updated successfully, but these errors were encountered: