Installation

Download Capslox and install it.

On first launch, Capslox creates a default config file with navigation, selection, and text editing shortcuts:

  • macOS: ~/.config/capslox/keymap.jsonc
  • Windows: %APPDATA%\Capslox\keymap.jsonc

The config uses JSONC format (JSON with comments). Edit the file with any text editor. Changes are detected and applied instantly — no restart needed.


Learn the Default Keymap

Capslox turns Caps Lock into a powerful modifier key — move the cursor, select, and delete text without your fingers leaving the home row.

Try the Interactive Tutorial — a game-like walkthrough that guides you through each shortcut step by step.

The rest of this guide covers how to customize your own bindings beyond the defaults.


Core Concepts

Capslox configuration has four core concepts: Layers, Bindings, Actions, and Custom Modifiers.

Layers

A layer is a named group of bindings. The base layer is always active. Other layers activate on top of it, forming a stack.

Layer types:

  • Base — Always active. Identified by "id": "base".
  • Manual — Activated by layer_push, layer_toggle, or layer_swap actions in bindings.
  • AutoApp — Activates automatically when a matching app gains focus.

When a key is pressed, the engine checks layers top-down. The first layer with a matching binding wins.

Bindings

A binding maps a trigger key (with optional modifiers) to an action.

Simple binding — Caps Lock + J sends Left arrow:

"caps-j": "left"

Binding types:

  • Direct — Triggers on key-down. The most common type.
  • ModTap — Hold for modifier, tap for action. "caps": { "type": "mod_tap", "tap": "esc" }
  • LongPress — Short press for one action, long press for another.

Capslox supports mod_tap (hold for modifier, tap for action) and long_press (action depends on press duration) as its two key modes. See Configuration Reference: Key Modes.

Key names use physical US QWERTY positions, lowercase. Modifiers: ctrl, shift, opt/alt, cmd/win, plus super as a cross-platform alias for cmd/win. Prefer the platform-native name — see Configuration Reference: Modifiers. Hyphen joins combos: cmd-shift-a.

See Configuration Reference: Key Vocabulary for the complete key list.

Actions

An action is what happens when a binding triggers.

The simplest action is a key press — just write the key name as a string:

"cx-h": "left"                    // send Left arrow
"cx-u": "cmd-left backspace"      // select to line start, then delete
"cx-cmd-e": "up*5"                // press Up 5 times

Beyond key presses, actions can control layers, manage clipboard slots, switch windows, and more. Each uses the "action" field:

{ "action": "layer_toggle", "target": "vim" }
{ "action": "clipboard_paste", "slot": "1" }
{ "action": "show_cheat_sheet" }

See Configuration Reference: Actions for all action types.


Custom Modifiers

Beyond the built-in modifiers (ctrl, shift, alt, super), Capslox lets you turn any physical key into a custom modifier — give it an alias, then use that alias in your bindings.

For example, you can register Caps Lock as the cx modifier with a tap action of Esc:

"custom_modifiers": { "caps": { "alias": "cx", "tap": "esc" } }
  • Names Caps Lock as cx
  • Hold Caps Lock → activates the cx modifier
  • Tap Caps Lock → sends Esc

The "esc" tap in the example above is for illustration. The keymap Capslox ships with uses toggle_caps_lock as the tap action — tap can be any action.

Now you can use cx as a prefix in your bindings:

"cx-e": "up",
"cx-d": "down",
"cx-s": "left",
"cx-f": "right"

Many-to-one

Multiple physical keys can share the same alias. For example, if your keyboard lacks a dedicated Caps Lock key (like the HHKB), you can register Tab as cx too:

{
  "custom_modifiers": {
    "caps": { "alias": "cx", "tap": "esc" },
    "tab": "cx"
  },
  "layers": [
    {
      "id": "base",
      "on_miss": "pass_to_os",
      "bindings": {
        "cx-e": "up",
        "cx-d": "down"
      }
    }
  ]
}

Now both Caps Lock and Tab act as cx modifiers.


Your First Config Edit

Press caps-shift-/ to open Capslox's built-in keymap editor, or open keymap.jsonc in your editor. Use the full example below as a reference, then add the new cx-tab binding and the browse layer to your existing config:

{
  "version": "1.0",
  "custom_modifiers": { "caps": { "alias": "cx", "tap": "esc" } },
  "layers": [
    {
      "id": "base",
      "on_miss": "pass_to_os",
      "bindings": {
        "cx-e": "up",
        "cx-d": "down",
        "cx-s": "left",
        "cx-f": "right",
        // Your new binding:
        "cx-tab": { "action": "layer_toggle", "target": "browse" },
        "cx-m": "enter"
      }
    },
    {
      "id": "browse",
      "activation": { "type": "manual" },
      "on_miss": "continue",
      "bindings": {
        "e": "pageup",
        "d": "pagedown",
        "s": "ctrl-shift-tab",
        "f": "ctrl-tab"
      }
    }
  ]
}

Save the file. Capslox detects the change and reloads the config. In your browser, press caps-tab to switch to the browse layer, then press e / d / s / f to navigate pages.


What's Next

Capslox supports many more features: