The VikiD Truth

Knowledge base / Computing / Linux & the command line

computingFreedom | Build | Picolisp | Picolisp Machine | pil sources | Linux | BASH | C Programmming | Operating Systems | Javascipt | Emacs | vim | Pharo Smalltalk | Computer Security | Python | SimpleLinuxConfig | Keyboard Config

Keyboard Config

I usually don’t make too many changes to my keyboards, but swapping the left-control key and caps has become a must. It is very annoying for the first few days, your mind has to physically remap itself to reflect the change. However the long term you won’t regret it.

Reading List & Source

The plain idea

This page is about remapping keys in Linux, chiefly the classic move of swapping Caps Lock with Control. On Linux the quick, session-level tool is setxkbmap (under X11), which can turn Caps Lock into another Control key with a single option. It is one of those tiny changes that pays back for years.

Why it matters

Control is one of the most-pressed keys for anyone who lives in Emacs, vim or a shell, and on most keyboards it sits awkwardly in the bottom corner, straining your little finger. Caps Lock, meanwhile, occupies prime home-row real estate and does almost nothing useful. Swapping them is the single best ergonomic tweak for a keyboard-driven workflow.

An everyday analogy

It is like moving the most-used tool in your workshop from a high back shelf to the bench right in front of you, and putting the dust-collecting gadget up on the shelf instead. A few days of reaching to the wrong place, then it feels obvious forever.

A 2026 note

setxkbmap works under X11. If you are on a Wayland desktop (now the default on Ubuntu, Fedora and others), setxkbmap may not apply; use your desktop’s keyboard settings, or a tool like keyd or a localectl XKB option, to make the Caps-to-Ctrl swap. The idea and the key names are identical; only the mechanism differs. For a permanent, display-server-independent remap, keyd is the modern favourite.

A note on the counter-argument

I link “Don’t Swap Ctrl and Caps!” above on purpose. Some people prefer remapping Caps to Escape (handy in vim) or to a dual-role key (Escape when tapped, Control when held). There is no universal right answer; the point is that Caps Lock is wasted space you can reclaim for whatever you press most.

How it connects

The truth revealed: the keyboard is the one tool you touch every single minute at a computer, and spending ten minutes to move your most-used key under a resting finger is among the highest-return tweaks you will ever make.

Last edited · 13 revisions

Tags: #Computing