Remapping
Back to System
RemappingIntermediate15 min

Karabiner-Elements Device-Specific Remapping for Multiple Keyboards

Multi-Keyboard Setup

Apply different keymaps per device in Karabiner-Elements so your laptop, mechanical, and gaming keyboards each behave their way.

Karabiner intercepts keys at the kernel level — before any app sees them. This means you can build a Hyper key, create layers, and remap keys system-wide.

By the end of this 15 min guide, you'll have a working Karabiner setup and practical Remapping workflows you can use immediately.

Device Rules Basics

Install Karabiner:

brew install --cask karabiner-elements
Tip: Verify the installation with karabiner --version or karabiner -V after installing.

Per-Keyboard Profiles

Configure in two places: Simple Modifications (one-to-one key swaps) and Complex Modifications (rules with conditions, layers, and device-specific logic).

Here's a foundational configuration to start with:

{
"title": "Hyper Key",
"rules": [{
"description": "Caps → Hyper+Esc",
"manipulators": [{
"from": {"key_code":"caps_lock"},
"to": [{"key_code":"left_shift","modifiers":["left_control","left_option","left_command"]}],
"to_if_alone":[{"key_code":"escape"}],
"type":"basic"
}]
}]
}

Conditional Logic & Layers

With Karabiner configured, these Remapping-specific workflows will save you time every day:

Pro tip: Don't try to adopt everything at once. Start with Caps Lock alone → Escape (tap) or Hyper (hold) and add more as it becomes habit.

USB Device Detection

Once you're comfortable with Karabiner basics, these advanced techniques will transform your Remapping workflow:

Profile Switching Issues

Here are the most common Karabiner issues and how to fix them:

Multi-Keyboard Mastery

Congratulations — you now have a solid Karabiner foundation. Here's where to go next:

← PreviousHammerspoon Clipboard Manager: A Lua-Powered History ToolNext →Hammerspoon Automation Cookbook: WiFi Triggers, Caffeine, and More