Caps Lock - From Shouting to Superpower

Rethinking the functionality of a forgotten key could lead to a powerful new tool.

Caps Lock - From Shouting to Superpower

Caps Lock sits in prime keyboard real estate—right next to your home row—but most people only use it for SHOUTING IN ALL CAPS. That’s a waste.

I remapped mine to do something useful: tap it for Escape (great for vim), hold it as a modifier for arrow keys, Home, End, Backspace, and Delete. No more reaching across the keyboard.

Linux

Starting with Linux, we can configure caps lock using xremap (works with both the X11 and Wayland environment).

Provided below is the configuration I currently use. Tapping the caps lock key makes it the escape button. This is very useful for us vim lowers. Holding it down and it acts like a modifier for easier access to keys like Home, End, Back space, Delete and all the arrow keys.

Grab the latest release and save it to a convenient location, for example: /home/user/bin/xremap

Create a new file named xremap-config.yml (or a similar) in your configuration directory /home/user/.config/xremap-config.yml:

virtual_modifiers:
  - CapsLock
keymap:
  - remap:
      CapsLock-h: Left
      CapsLock-j: Down
      CapsLock-k: Up
      CapsLock-l: Right
      CapsLock-d: Delete
      CapsLock-f: BackSpace
      CapsLock-i: Home
      CapsLock-o: End
modmap:
  - remap:
      KEY_CAPSLOCK:
        held: KEY_CAPSLOCK
        alone: KEY_ESC

To be able to start xremap when we boot up, create a systemd service with the following contents and save it to: /etc/systemd/user/xremap.service.

[Unit]
Description=Start xremap

[Service]
Type=simple
ExecStart=/home/user/bin/xremap /home/user/.config/xremap-config.yml --watch

[Install]
WantedBy=default.target

Notice the --watch flag, this makes xremap watch for newly connected devices and apply the configuration to them as well.

Then we need to run the following commands to enable it:

systemctl --user daemon-reload - Reload so systemctl can find our new service.

systemctl --user start xremap.service - Start the service.

systemctl --user enable xremap.service - Make the service start on boot.

MacOS

In MacOS we can achive the same functionaliy using an application called Karabiner and loading the script provided by https://github.com/Vonng/Capslock. Follow the installation steps to get started.

More Articles

Fixing a black external monitor after suspend on Omarchy

My external monitor was detected after waking from sleep, but the screen stayed black. The monitor daemon was applying its profile before Hyprland knew which modes the display supported. Two flags fixed it.

Fix the grayed-out volume slider on your USB DAC

Your DAC reports no volume control, so macOS grays out the volume keys. A lightweight virtual audio driver and menu bar app give them back.

From issue to PR: AI workflow with Overvy and Hermes

Overvy and Hermes turn GitHub issues into implemented pull requests without a human touching the code.

Trading from your terminal: setting up Hermes Agent with Montrose

How I connected my Hermes Agent to Montrose for terminal-based portfolio tracking, trade tickets, and automated daily summaries.

Generate Commit Messages with Ollama in Neovim

Generate conventional commit messages from staged diffs using Ollama. Run it locally for privacy and offline, or use cloud models for speed.

Adding Umami analytics to the OpenClaw morning brief

An agent skill that fetches traffic data from Umami, and how it fits into a daily automated briefing.

Setting up Google Calendar sync for OpenClaw

How I set up read-only Google Calendar sync for my personal AI assistant running on a home server VM.

Better Clipboard Handling in Claude Code

A plugin that makes clipboard operations in Claude Code more reliable and natural to use.

Get notified when Claude Code needs your input

Stop constantly checking your terminal. Set up notifications that alert you when Claude Code is ready for your input.