Setxkbmap -layout gb -option ctrl:nocaps # Caps Lock is Control on a GB keyboard If it is not a US keyboard layout, you need to add a switch with your layout, like: Note that the above will change your keyboard layout to a us keyboard layout. Setxkbmap -option ctrl:nocaps # Make Caps Lock a Control key Setxkbmap -option ctrl:swapcaps # Swap Left Control and Caps Lock If you don’t ever need Caps Lock you can instead of swapping the two set Caps Lock to be another Control. In the X Window System, you can also swap Control and Caps Lock with the xkb option `ctrl:swapcaps`. Which is sourced from my ~/.xsession with the line: On Unix-like systems, I have a ~/.xmodmap file: ! I swap their functions throughout my environment, not just for Emacs. See the man page command xmodmap(1) for more information. The advantage of using xmodmap is that it will work with any desktop or Window Manager. Some desktop environments, like Gnome and KDE, which use X, have specialized preference menus to make this easier. ![]() In the X Windowing System you can use xmodmap to change the keymaping.
0 Comments
Leave a Reply. |