change CAPSLOCK to Ctrl Archlinux command line

余生长醉 提交于 2019-12-13 14:44:25

问题


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:


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.



来源:https://stackoverflow.com/questions/28651864/change-capslock-to-ctrl-archlinux-command-line

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!