Mendhak / Code

Repurposing Caps Lock into something useful

Does there exist a key more useless, more banal in its existence than Caps Lock? For most typical computer usage and software development there is no reason to use it, and yet it persists as a holdover from the typewriter era.

There do exist other keys which are less often used, such as Pause, and Scroll Lock, but when measuring by ratio of surface area to uselessness, the Caps Lock key comes ahead. It is also in close proximity to ASDF and WASD, which only helps to further amplify just what a deadweight it is.

It is even harmful. An accidental press of Caps Lock can lead to accidental shouting in social media, incorrect password attempts, and even bad habits forming. I have even witnessed actual grown adults, functioning members of society, using it in place of a Shift key. They will press Caps Lock, type the letter, then press Caps Lock again. I did not enquire as to what series of circumstances, events and abuse led to such a habit being formed. I could only inform them that the Shift key exists, and merely holding this key down for a moment replicates the entire functionality of Caps Lock — they feigned polite interest.

I have been searching for better uses of the Caps Lock key and am listing some better uses I’ve found, as well as some observations regarding this key.

Caps Lock key replaced on my keyboard with a shrug (MT3 Susuwatari)
Caps Lock key replaced on my keyboard with a shrug (MT3 Susuwatari)
Of course there are some fields where the Caps Lock key gets used regularly, such as engineering drawing, certain kinds of data entry, and legal. However for the purposes of self-serving hyperbole, these shall be ignored.

Linux, as a Compose Key

Entering special characters on most OSes is a difficult process either involving additional overlays, keyboard modes, or awkward shortcuts.

By far one of the most intuitive, most human ways I’ve found of entering special characters is through Compose Keys on Linux. A Compose Key is a special key that allows you to press multiple keys in a row to get a special character. The Compose Key can be assigned by the user — and this is where the Caps Lock key is made useful by assigning it as a Compose Key. For example:

Caps e ' = é

Caps L - = £

Caps < = = ≤

To enable Compose Keys in Ubuntu 20.04, open Gnome Tweaks keyboard settings, look for the Compose Key option. Caps Lock can be selected here.

Gnome Tweaks Compose Key

In Ubuntu 22.04, it’s available directly in Settings. Go to Keyboard, and under ‘Special Character Entry’ change the Compose Key there.

Ubuntu 22.04 Compose Key

There are Compose Key Cheatsheets available which usually list the most common combinations; the complete list is massive

Note that the Compose Keys are a sequence. Don’t hold down Caps while pressing the other keys like a shortcut. Simply type the keys one after the other.

Chromebook, as a searcher

The Chromebook actually recognizes how unnecessary this key is, and goes ahead and replaces the Caps Lock key entirely. The button in its place can show the Launcher or start a search. That’s pretty functional.

Chromebook Keyboard

PowerToys, as a video conferencing tool

PowerToys is a collection of useful utilities meant for power users on Windows. One of its utilities is a feature called Video Conference Mute, which lets you quickly mute or unmute yourself regardless of the video conferencing software you’re using such as Teams, Zoom or Slack. The default shortcut for the audio mute is Win+Shift+A.

Getting CapsLock to toggle mute in video conferences

It cannot directly be set to Caps Lock, however PowerToys also comes with a Keyboard Manager which allows you to assign a key to another key sequence. In Keyboard Manager, set Caps to Win+Shift+A, and there’s your audio mute, with a somewhat useful Caps Lock key.

Map it to something else

Shift and Escape

An alternative to any of the features above is to simply allow remapping Caps Lock to any number of other more commonly or more useful keys such as Esc, or Shift. Remapping to Escape or Shift is sometimes seen among gamers, speedtypers, and vim users.

The PowerToys Keyboard Manager mentioned above can do this, and there are also other third party software that allow remapping, such as the popular AutoHotKey and Uncap.

In AutoHotKey this would be done with:

Send, {Escape}

Switching keyboard layouts

AutoHotKey adds a lot of versatility, it can also be used to switch keyboard layouts for multilingual typers.

In Ubuntu this can be done by remapping the keyboard shortcut for input sources.

Keyboard shortcuts

Turn it off

A not uncommon approach is to just turn Caps Lock off. It’s a marginal improvement, and helps avoid any Caps Lock associated pain.