change CAPSLOCK to Ctrl Archlinux command line

2019-07-01 10:01发布

I have Tmux setup on my iMac so that CAPS and Ctrl are swapped and C-a is the prefix. On my old laptop I have archlinux without Xwindows and I can't figure out how to remap those keys. On Mac it was straightforward. How do I do it on my barebones linux setup?

1条回答
何必那么认真
2楼-- · 2019-07-01 10:39

Create a file ctrl-caps-swap.map:

keymaps 0-127
keycode 29 = Caps_Lock
keycode 58 = Control

And load it under root as loadkeys ./ctrl-caps-swap.map. You can read more about custom key mappings on Arch wiki.

查看更多
登录 后发表回答