Skip to content
This repository was archived by the owner on Nov 26, 2026. It is now read-only.
rvwallacePublic archive

About

Unified Kanata layout configuration for macOS (MacBook & NuPhy Air75)

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

kanata-conf

Unified keyboard configuration for macOS (MacBook built-in keyboard and NuPhy Air75).

This repository contains a Kanata configuration for macOS. It maps keys identically across internal laptop keyboards and external keyboards.


🗺️ Layers & Layouts

1. Base Layer (Default)

  • Caps Lock:
    • Tap: Escape
    • Double Tap: Caps Lock
    • Hold: Navigation & Editing Layer
  • Tab:
    • Tap: Tab
    • Hold: Hyper Key (Cmd + Option + Ctrl + Shift)
  • Space:
    • Tap: Space
    • Hold: Numpad & Symbols Layer

2. Navigation & Editing Layer (Hold Caps Lock)

Vim navigation, dedicated scrolling, macOS text selection modifiers, and clipboard shortcuts without leaving the home row.

┌────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────────┐
│ `  │ 1  │ 2  │ 3  │ 4  │ 5  │ 6  │ 7  │ 8  │ 9  │ 0  │ -  │ =  │  DEL   │
├────┴─┬──┴─┬──┴─┬──┴─┬──┴─┬──┴─┬──┴─┬──┴─┬──┴─┬──┴─┬──┴─┬──┴─┬──┴─┬──────┤
│ TAB  │    │    │    │    │    │    │HOM │PGD │PGU │END │    │    │      │
├──────┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴──────┤
│ [HOLD]│CTL │ALT │CMD │SFT │    │ ←  │ ↓  │ ↑  │ →  │    │    │   RET    │
├───────┴─┬──┴─┬──┴─┬──┴─┬──┴─┬──┴─┬──┴─┬──┴─┬──┴─┬──┴─┬──┴─┬──┴──────────┤
│  SHIFT  │UND │CUT │CPY │PST │    │    │    │    │    │    │    SHIFT    │
├─────┬───┴─┬──┴──┬─┴────┴────┴────┴────┴────┴────┴────┴┬───┴─┬─────┬─────┤
│ CTL │ OPT │ CMD │                SPACE                │ CMD │ OPT │ CTL │
└─────┴─────┴─────┴─────────────────────────────────────┴─────┴─────┴─────┘
Key Action Purpose
H J K L ← ↓ ↑ → Directional navigation
U I O P Home PgDn PgUp End Document and scroll navigation
A S D F Ctrl Alt Cmd Shift Modifiers for macOS text selection
Z X C V Cmd+Z Cmd+X Cmd+C Cmd+V Undo, Cut, Copy, and Paste shortcuts
Backspace Forward Delete Forward delete character

Text Selection:

  • Caps (Hold) + F (Shift) + L $\rightarrow$ Select characters right.
  • Caps (Hold) + S (Alt) + L $\rightarrow$ Move forward one word.
  • Caps (Hold) + D (Cmd) + L $\rightarrow$ Move to end of line.
  • Caps (Hold) + D + F (Cmd+Shift) + L $\rightarrow$ Select to end of line with index and middle fingers.

3. Numpad & Symbols Layer (Hold Space)

A 10-key numeric keypad on the right hand and common programming symbols on the left hand.

┌────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────────┐
│ `  │ 1  │ 2  │ 3  │ 4  │ 5  │ 6  │ 7  │ 8  │ 9  │ 0  │ -  │ =  │  BSPC  │
├────┴─┬──┴─┬──┴─┬──┴─┬──┴─┬──┴─┬──┴─┬──┴─┬──┴─┬──┴─┬──┴─┬──┴─┬──┴─┬──────┤
│ TAB  │ !  │ @  │ #  │ $  │ %  │    │ 7  │ 8  │ 9  │ +  │ -  │    │      │
├──────┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴──────┤
│  CAPS │ ^  │ &  │ *  │ (  │ )  │    │ 4  │ 5  │ 6  │ *  │ /  │    =     │
├───────┴─┬──┴─┬──┴─┬──┴─┬──┴─┬──┴─┬──┴─┬──┴─┬──┴─┬──┴─┬──┴─┬──┴──────────┤
│  SHIFT  │ ~  │ `  │ [  │ ]  │ |  │ 0  │ 1  │ 2  │ 3  │ .  │    SHIFT    │
├─────┬───┴─┬──┴──┬─┴────┴────┴────┴────┴────┴────┴────┴┬───┴─┬─────┬─────┤
│ CTL │ OPT │ CMD │                [HOLD]               │ CMD │ OPT │ CTL │
└─────┴─────┴─────┴─────────────────────────────────────┴─────┴─────┴─────┘

🚀 Installation & Setup

Prerequisites

First-Time Installation

Clone the repository and run setup:

cd ~/silentcastle/projects/kanata-conf
make install

make install performs these setup steps:

  1. Installs kanata with Homebrew.
  2. Installs the matching Karabiner-DriverKit-VirtualHIDDevice package.
  3. Sets up the system LaunchDaemon for driver communication.
  4. Symlinks ~/.config/kanata/kanata.kbd to this repository.
  5. Checks configuration syntax and starts the background service.

Uninstall

Run make uninstall as your normal user, without sudo. The command stops and removes the Homebrew Kanata service and package. It removes this repository's driver launch daemon and runs the installed Karabiner driver's official uninstall scripts. Homebrew runs as your normal user. The command stops the old root service with launchctl. It repairs Kanata's Homebrew file ownership before removal. Follow the macOS prompts for administrator approval. The command preserves this repository and ~/.config/kanata. You can run the command again after removal.

The driver is shared with other remapping tools. If Karabiner-Elements is installed, the command stops before it makes changes. Use its uninstaller first. After removal, run systemextensionsctl list. Restart macOS if removal is pending. You can remove Kanata's old entries from Input Monitoring and Accessibility in System Settings.

macOS Permissions

Kanata requires two permissions in System Settings > Privacy & Security (run make permissions to auto-open these panes):

  1. Input Monitoring (Privacy & Security > Input Monitoring):
    • Toggle kanata to ON (blue).
    • If kanata is not listed: Click +, press Cmd+Shift+G, paste /opt/homebrew/bin/kanata, click Open, and toggle it ON.
  2. Accessibility (Privacy & Security > Accessibility):
    • Ensure kanata is toggled ON.

Once granted, start or reload the background service with make start or make reload.


🧩 DriverKit & Kanata Compatibility Matrix

Kanata communicates with the Karabiner DriverKit extension through an internal IPC protocol. The DriverKit version must match the protocol version in Kanata. See the Kanata macOS Setup Guide:

Kanata Version IPC Protocol Required Karabiner DriverKit Notes
v1.12.x and below Protocol 5 v6.2.0 Homebrew stable version
v1.13.0 and above Protocol 7 v8.0.0 / v8.2.0+ Uses updated karabiner-driverkit crate

Note

The setup.sh script detects your installed kanata version and downloads the matching DriverKit package automatically.


🛠️ Daily Workflow Commands

# Restart background service after editing kanata.kbd
make reload

# Check background daemon status
make status

# Stop the background service
make stop

# Start the background service
make start

# Test in foreground with live layer change logs
make test

⚙️ Customization

Edit kanata.kbd to change timings or key mappings:

  • Tap-Hold Timings (defvar): Change tap-time (180ms), hold-time (200ms), and space-hold-time (230ms) in the (defvar ...) block at the top of kanata.kbd.
  • Symlink: Run make link to link ~/.config/kanata/kanata.kbd to kanata.kbd in this repository.

📜 Changelog

See CHANGELOG.md for release history following Keep a Changelog.

About

Unified Kanata layout configuration for macOS (MacBook & NuPhy Air75)

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages