From 05da23ca10a056ed92b07708e8f6b5f73fde43b3 Mon Sep 17 00:00:00 2001 From: Christian Colglazier Date: Tue, 13 Oct 2026 21:20:41 -0400 Subject: [PATCH] feat(keyboard): configure model m macos keybindings --- home/.chezmoiignore | 4 + .../model-m-linux-macos-karabiner.json | 1519 +++++++++++++++++ 2 files changed, 1523 insertions(+) create mode 100644 home/dot_config/private_karabiner/assets/private_complex_modifications/model-m-linux-macos-karabiner.json diff --git a/home/.chezmoiignore b/home/.chezmoiignore index bcf6b74..08f015a 100644 --- a/home/.chezmoiignore +++ b/home/.chezmoiignore @@ -50,3 +50,7 @@ bin/video/cr3todng.sh # Homebrew dependencies are only managed on macOS. .brewfile {{ end -}} + +{{ if ne .chezmoi.os "darwin" -}} +.config/karabiner +{{ end -}} diff --git a/home/dot_config/private_karabiner/assets/private_complex_modifications/model-m-linux-macos-karabiner.json b/home/dot_config/private_karabiner/assets/private_complex_modifications/model-m-linux-macos-karabiner.json new file mode 100644 index 0000000..5f0cfb3 --- /dev/null +++ b/home/dot_config/private_karabiner/assets/private_complex_modifications/model-m-linux-macos-karabiner.json @@ -0,0 +1,1519 @@ +{ + "title": "Classic IBM Model M Linux style for macOS and Emacs", + "rules": [ + { + "description": "Model M: Caps Lock held = Command; tapped = Escape (all apps)", + "manipulators": [ + { + "type": "basic", + "from": { + "key_code": "caps_lock", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "left_command", + "lazy": true + } + ], + "to_if_alone": [ + { + "key_code": "escape" + } + ] + } + ] + }, + { + "description": "Model M: Ctrl shortcuts behave like PC in GUI apps, excluding terminals", + "manipulators": [ + { + "type": "basic", + "from": { + "key_code": "a", + "modifiers": { + "mandatory": [ + "control" + ], + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "a", + "modifiers": [ + "left_command" + ] + } + ], + "conditions": [ + { + "type": "frontmost_application_unless", + "bundle_identifiers": [ + "^com\\.apple\\.Terminal$", + "^com\\.googlecode\\.iterm2$", + "^net\\.kovidgoyal\\.kitty$", + "^org\\.alacritty$", + "^dev\\.warp\\.Warp-Stable$", + "^com\\.mitchellh\\.ghostty$", + "^io\\.wez\\.wezterm$" + ] + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "a", + "modifiers": { + "mandatory": [ + "control", + "shift" + ], + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "a", + "modifiers": [ + "left_command", + "left_shift" + ] + } + ], + "conditions": [ + { + "type": "frontmost_application_unless", + "bundle_identifiers": [ + "^com\\.apple\\.Terminal$", + "^com\\.googlecode\\.iterm2$", + "^net\\.kovidgoyal\\.kitty$", + "^org\\.alacritty$", + "^dev\\.warp\\.Warp-Stable$", + "^com\\.mitchellh\\.ghostty$", + "^io\\.wez\\.wezterm$" + ] + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "c", + "modifiers": { + "mandatory": [ + "control" + ], + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "c", + "modifiers": [ + "left_command" + ] + } + ], + "conditions": [ + { + "type": "frontmost_application_unless", + "bundle_identifiers": [ + "^com\\.apple\\.Terminal$", + "^com\\.googlecode\\.iterm2$", + "^net\\.kovidgoyal\\.kitty$", + "^org\\.alacritty$", + "^dev\\.warp\\.Warp-Stable$", + "^com\\.mitchellh\\.ghostty$", + "^io\\.wez\\.wezterm$" + ] + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "c", + "modifiers": { + "mandatory": [ + "control", + "shift" + ], + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "c", + "modifiers": [ + "left_command", + "left_shift" + ] + } + ], + "conditions": [ + { + "type": "frontmost_application_unless", + "bundle_identifiers": [ + "^com\\.apple\\.Terminal$", + "^com\\.googlecode\\.iterm2$", + "^net\\.kovidgoyal\\.kitty$", + "^org\\.alacritty$", + "^dev\\.warp\\.Warp-Stable$", + "^com\\.mitchellh\\.ghostty$", + "^io\\.wez\\.wezterm$" + ] + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "v", + "modifiers": { + "mandatory": [ + "control" + ], + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "v", + "modifiers": [ + "left_command" + ] + } + ], + "conditions": [ + { + "type": "frontmost_application_unless", + "bundle_identifiers": [ + "^com\\.apple\\.Terminal$", + "^com\\.googlecode\\.iterm2$", + "^net\\.kovidgoyal\\.kitty$", + "^org\\.alacritty$", + "^dev\\.warp\\.Warp-Stable$", + "^com\\.mitchellh\\.ghostty$", + "^io\\.wez\\.wezterm$" + ] + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "v", + "modifiers": { + "mandatory": [ + "control", + "shift" + ], + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "v", + "modifiers": [ + "left_command", + "left_shift" + ] + } + ], + "conditions": [ + { + "type": "frontmost_application_unless", + "bundle_identifiers": [ + "^com\\.apple\\.Terminal$", + "^com\\.googlecode\\.iterm2$", + "^net\\.kovidgoyal\\.kitty$", + "^org\\.alacritty$", + "^dev\\.warp\\.Warp-Stable$", + "^com\\.mitchellh\\.ghostty$", + "^io\\.wez\\.wezterm$" + ] + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "x", + "modifiers": { + "mandatory": [ + "control" + ], + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "x", + "modifiers": [ + "left_command" + ] + } + ], + "conditions": [ + { + "type": "frontmost_application_unless", + "bundle_identifiers": [ + "^com\\.apple\\.Terminal$", + "^com\\.googlecode\\.iterm2$", + "^net\\.kovidgoyal\\.kitty$", + "^org\\.alacritty$", + "^dev\\.warp\\.Warp-Stable$", + "^com\\.mitchellh\\.ghostty$", + "^io\\.wez\\.wezterm$" + ] + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "x", + "modifiers": { + "mandatory": [ + "control", + "shift" + ], + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "x", + "modifiers": [ + "left_command", + "left_shift" + ] + } + ], + "conditions": [ + { + "type": "frontmost_application_unless", + "bundle_identifiers": [ + "^com\\.apple\\.Terminal$", + "^com\\.googlecode\\.iterm2$", + "^net\\.kovidgoyal\\.kitty$", + "^org\\.alacritty$", + "^dev\\.warp\\.Warp-Stable$", + "^com\\.mitchellh\\.ghostty$", + "^io\\.wez\\.wezterm$" + ] + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "s", + "modifiers": { + "mandatory": [ + "control" + ], + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "s", + "modifiers": [ + "left_command" + ] + } + ], + "conditions": [ + { + "type": "frontmost_application_unless", + "bundle_identifiers": [ + "^com\\.apple\\.Terminal$", + "^com\\.googlecode\\.iterm2$", + "^net\\.kovidgoyal\\.kitty$", + "^org\\.alacritty$", + "^dev\\.warp\\.Warp-Stable$", + "^com\\.mitchellh\\.ghostty$", + "^io\\.wez\\.wezterm$" + ] + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "s", + "modifiers": { + "mandatory": [ + "control", + "shift" + ], + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "s", + "modifiers": [ + "left_command", + "left_shift" + ] + } + ], + "conditions": [ + { + "type": "frontmost_application_unless", + "bundle_identifiers": [ + "^com\\.apple\\.Terminal$", + "^com\\.googlecode\\.iterm2$", + "^net\\.kovidgoyal\\.kitty$", + "^org\\.alacritty$", + "^dev\\.warp\\.Warp-Stable$", + "^com\\.mitchellh\\.ghostty$", + "^io\\.wez\\.wezterm$" + ] + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "f", + "modifiers": { + "mandatory": [ + "control" + ], + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "f", + "modifiers": [ + "left_command" + ] + } + ], + "conditions": [ + { + "type": "frontmost_application_unless", + "bundle_identifiers": [ + "^com\\.apple\\.Terminal$", + "^com\\.googlecode\\.iterm2$", + "^net\\.kovidgoyal\\.kitty$", + "^org\\.alacritty$", + "^dev\\.warp\\.Warp-Stable$", + "^com\\.mitchellh\\.ghostty$", + "^io\\.wez\\.wezterm$" + ] + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "f", + "modifiers": { + "mandatory": [ + "control", + "shift" + ], + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "f", + "modifiers": [ + "left_command", + "left_shift" + ] + } + ], + "conditions": [ + { + "type": "frontmost_application_unless", + "bundle_identifiers": [ + "^com\\.apple\\.Terminal$", + "^com\\.googlecode\\.iterm2$", + "^net\\.kovidgoyal\\.kitty$", + "^org\\.alacritty$", + "^dev\\.warp\\.Warp-Stable$", + "^com\\.mitchellh\\.ghostty$", + "^io\\.wez\\.wezterm$" + ] + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "z", + "modifiers": { + "mandatory": [ + "control" + ], + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "z", + "modifiers": [ + "left_command" + ] + } + ], + "conditions": [ + { + "type": "frontmost_application_unless", + "bundle_identifiers": [ + "^com\\.apple\\.Terminal$", + "^com\\.googlecode\\.iterm2$", + "^net\\.kovidgoyal\\.kitty$", + "^org\\.alacritty$", + "^dev\\.warp\\.Warp-Stable$", + "^com\\.mitchellh\\.ghostty$", + "^io\\.wez\\.wezterm$" + ] + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "z", + "modifiers": { + "mandatory": [ + "control", + "shift" + ], + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "z", + "modifiers": [ + "left_command", + "left_shift" + ] + } + ], + "conditions": [ + { + "type": "frontmost_application_unless", + "bundle_identifiers": [ + "^com\\.apple\\.Terminal$", + "^com\\.googlecode\\.iterm2$", + "^net\\.kovidgoyal\\.kitty$", + "^org\\.alacritty$", + "^dev\\.warp\\.Warp-Stable$", + "^com\\.mitchellh\\.ghostty$", + "^io\\.wez\\.wezterm$" + ] + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "t", + "modifiers": { + "mandatory": [ + "control" + ], + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "t", + "modifiers": [ + "left_command" + ] + } + ], + "conditions": [ + { + "type": "frontmost_application_unless", + "bundle_identifiers": [ + "^com\\.apple\\.Terminal$", + "^com\\.googlecode\\.iterm2$", + "^net\\.kovidgoyal\\.kitty$", + "^org\\.alacritty$", + "^dev\\.warp\\.Warp-Stable$", + "^com\\.mitchellh\\.ghostty$", + "^io\\.wez\\.wezterm$" + ] + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "t", + "modifiers": { + "mandatory": [ + "control", + "shift" + ], + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "t", + "modifiers": [ + "left_command", + "left_shift" + ] + } + ], + "conditions": [ + { + "type": "frontmost_application_unless", + "bundle_identifiers": [ + "^com\\.apple\\.Terminal$", + "^com\\.googlecode\\.iterm2$", + "^net\\.kovidgoyal\\.kitty$", + "^org\\.alacritty$", + "^dev\\.warp\\.Warp-Stable$", + "^com\\.mitchellh\\.ghostty$", + "^io\\.wez\\.wezterm$" + ] + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "w", + "modifiers": { + "mandatory": [ + "control" + ], + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "w", + "modifiers": [ + "left_command" + ] + } + ], + "conditions": [ + { + "type": "frontmost_application_unless", + "bundle_identifiers": [ + "^com\\.apple\\.Terminal$", + "^com\\.googlecode\\.iterm2$", + "^net\\.kovidgoyal\\.kitty$", + "^org\\.alacritty$", + "^dev\\.warp\\.Warp-Stable$", + "^com\\.mitchellh\\.ghostty$", + "^io\\.wez\\.wezterm$" + ] + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "w", + "modifiers": { + "mandatory": [ + "control", + "shift" + ], + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "w", + "modifiers": [ + "left_command", + "left_shift" + ] + } + ], + "conditions": [ + { + "type": "frontmost_application_unless", + "bundle_identifiers": [ + "^com\\.apple\\.Terminal$", + "^com\\.googlecode\\.iterm2$", + "^net\\.kovidgoyal\\.kitty$", + "^org\\.alacritty$", + "^dev\\.warp\\.Warp-Stable$", + "^com\\.mitchellh\\.ghostty$", + "^io\\.wez\\.wezterm$" + ] + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "n", + "modifiers": { + "mandatory": [ + "control" + ], + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "n", + "modifiers": [ + "left_command" + ] + } + ], + "conditions": [ + { + "type": "frontmost_application_unless", + "bundle_identifiers": [ + "^com\\.apple\\.Terminal$", + "^com\\.googlecode\\.iterm2$", + "^net\\.kovidgoyal\\.kitty$", + "^org\\.alacritty$", + "^dev\\.warp\\.Warp-Stable$", + "^com\\.mitchellh\\.ghostty$", + "^io\\.wez\\.wezterm$" + ] + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "n", + "modifiers": { + "mandatory": [ + "control", + "shift" + ], + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "n", + "modifiers": [ + "left_command", + "left_shift" + ] + } + ], + "conditions": [ + { + "type": "frontmost_application_unless", + "bundle_identifiers": [ + "^com\\.apple\\.Terminal$", + "^com\\.googlecode\\.iterm2$", + "^net\\.kovidgoyal\\.kitty$", + "^org\\.alacritty$", + "^dev\\.warp\\.Warp-Stable$", + "^com\\.mitchellh\\.ghostty$", + "^io\\.wez\\.wezterm$" + ] + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "p", + "modifiers": { + "mandatory": [ + "control" + ], + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "p", + "modifiers": [ + "left_command" + ] + } + ], + "conditions": [ + { + "type": "frontmost_application_unless", + "bundle_identifiers": [ + "^com\\.apple\\.Terminal$", + "^com\\.googlecode\\.iterm2$", + "^net\\.kovidgoyal\\.kitty$", + "^org\\.alacritty$", + "^dev\\.warp\\.Warp-Stable$", + "^com\\.mitchellh\\.ghostty$", + "^io\\.wez\\.wezterm$" + ] + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "p", + "modifiers": { + "mandatory": [ + "control", + "shift" + ], + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "p", + "modifiers": [ + "left_command", + "left_shift" + ] + } + ], + "conditions": [ + { + "type": "frontmost_application_unless", + "bundle_identifiers": [ + "^com\\.apple\\.Terminal$", + "^com\\.googlecode\\.iterm2$", + "^net\\.kovidgoyal\\.kitty$", + "^org\\.alacritty$", + "^dev\\.warp\\.Warp-Stable$", + "^com\\.mitchellh\\.ghostty$", + "^io\\.wez\\.wezterm$" + ] + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "l", + "modifiers": { + "mandatory": [ + "control" + ], + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "l", + "modifiers": [ + "left_command" + ] + } + ], + "conditions": [ + { + "type": "frontmost_application_unless", + "bundle_identifiers": [ + "^com\\.apple\\.Terminal$", + "^com\\.googlecode\\.iterm2$", + "^net\\.kovidgoyal\\.kitty$", + "^org\\.alacritty$", + "^dev\\.warp\\.Warp-Stable$", + "^com\\.mitchellh\\.ghostty$", + "^io\\.wez\\.wezterm$" + ] + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "l", + "modifiers": { + "mandatory": [ + "control", + "shift" + ], + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "l", + "modifiers": [ + "left_command", + "left_shift" + ] + } + ], + "conditions": [ + { + "type": "frontmost_application_unless", + "bundle_identifiers": [ + "^com\\.apple\\.Terminal$", + "^com\\.googlecode\\.iterm2$", + "^net\\.kovidgoyal\\.kitty$", + "^org\\.alacritty$", + "^dev\\.warp\\.Warp-Stable$", + "^com\\.mitchellh\\.ghostty$", + "^io\\.wez\\.wezterm$" + ] + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "r", + "modifiers": { + "mandatory": [ + "control" + ], + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "r", + "modifiers": [ + "left_command" + ] + } + ], + "conditions": [ + { + "type": "frontmost_application_unless", + "bundle_identifiers": [ + "^com\\.apple\\.Terminal$", + "^com\\.googlecode\\.iterm2$", + "^net\\.kovidgoyal\\.kitty$", + "^org\\.alacritty$", + "^dev\\.warp\\.Warp-Stable$", + "^com\\.mitchellh\\.ghostty$", + "^io\\.wez\\.wezterm$" + ] + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "r", + "modifiers": { + "mandatory": [ + "control", + "shift" + ], + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "r", + "modifiers": [ + "left_command", + "left_shift" + ] + } + ], + "conditions": [ + { + "type": "frontmost_application_unless", + "bundle_identifiers": [ + "^com\\.apple\\.Terminal$", + "^com\\.googlecode\\.iterm2$", + "^net\\.kovidgoyal\\.kitty$", + "^org\\.alacritty$", + "^dev\\.warp\\.Warp-Stable$", + "^com\\.mitchellh\\.ghostty$", + "^io\\.wez\\.wezterm$" + ] + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "o", + "modifiers": { + "mandatory": [ + "control" + ], + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "o", + "modifiers": [ + "left_command" + ] + } + ], + "conditions": [ + { + "type": "frontmost_application_unless", + "bundle_identifiers": [ + "^com\\.apple\\.Terminal$", + "^com\\.googlecode\\.iterm2$", + "^net\\.kovidgoyal\\.kitty$", + "^org\\.alacritty$", + "^dev\\.warp\\.Warp-Stable$", + "^com\\.mitchellh\\.ghostty$", + "^io\\.wez\\.wezterm$" + ] + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "o", + "modifiers": { + "mandatory": [ + "control", + "shift" + ], + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "o", + "modifiers": [ + "left_command", + "left_shift" + ] + } + ], + "conditions": [ + { + "type": "frontmost_application_unless", + "bundle_identifiers": [ + "^com\\.apple\\.Terminal$", + "^com\\.googlecode\\.iterm2$", + "^net\\.kovidgoyal\\.kitty$", + "^org\\.alacritty$", + "^dev\\.warp\\.Warp-Stable$", + "^com\\.mitchellh\\.ghostty$", + "^io\\.wez\\.wezterm$" + ] + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "b", + "modifiers": { + "mandatory": [ + "control" + ], + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "b", + "modifiers": [ + "left_command" + ] + } + ], + "conditions": [ + { + "type": "frontmost_application_unless", + "bundle_identifiers": [ + "^com\\.apple\\.Terminal$", + "^com\\.googlecode\\.iterm2$", + "^net\\.kovidgoyal\\.kitty$", + "^org\\.alacritty$", + "^dev\\.warp\\.Warp-Stable$", + "^com\\.mitchellh\\.ghostty$", + "^io\\.wez\\.wezterm$" + ] + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "b", + "modifiers": { + "mandatory": [ + "control", + "shift" + ], + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "b", + "modifiers": [ + "left_command", + "left_shift" + ] + } + ], + "conditions": [ + { + "type": "frontmost_application_unless", + "bundle_identifiers": [ + "^com\\.apple\\.Terminal$", + "^com\\.googlecode\\.iterm2$", + "^net\\.kovidgoyal\\.kitty$", + "^org\\.alacritty$", + "^dev\\.warp\\.Warp-Stable$", + "^com\\.mitchellh\\.ghostty$", + "^io\\.wez\\.wezterm$" + ] + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "i", + "modifiers": { + "mandatory": [ + "control" + ], + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "i", + "modifiers": [ + "left_command" + ] + } + ], + "conditions": [ + { + "type": "frontmost_application_unless", + "bundle_identifiers": [ + "^com\\.apple\\.Terminal$", + "^com\\.googlecode\\.iterm2$", + "^net\\.kovidgoyal\\.kitty$", + "^org\\.alacritty$", + "^dev\\.warp\\.Warp-Stable$", + "^com\\.mitchellh\\.ghostty$", + "^io\\.wez\\.wezterm$" + ] + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "i", + "modifiers": { + "mandatory": [ + "control", + "shift" + ], + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "i", + "modifiers": [ + "left_command", + "left_shift" + ] + } + ], + "conditions": [ + { + "type": "frontmost_application_unless", + "bundle_identifiers": [ + "^com\\.apple\\.Terminal$", + "^com\\.googlecode\\.iterm2$", + "^net\\.kovidgoyal\\.kitty$", + "^org\\.alacritty$", + "^dev\\.warp\\.Warp-Stable$", + "^com\\.mitchellh\\.ghostty$", + "^io\\.wez\\.wezterm$" + ] + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "u", + "modifiers": { + "mandatory": [ + "control" + ], + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "u", + "modifiers": [ + "left_command" + ] + } + ], + "conditions": [ + { + "type": "frontmost_application_unless", + "bundle_identifiers": [ + "^com\\.apple\\.Terminal$", + "^com\\.googlecode\\.iterm2$", + "^net\\.kovidgoyal\\.kitty$", + "^org\\.alacritty$", + "^dev\\.warp\\.Warp-Stable$", + "^com\\.mitchellh\\.ghostty$", + "^io\\.wez\\.wezterm$" + ] + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "u", + "modifiers": { + "mandatory": [ + "control", + "shift" + ], + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "u", + "modifiers": [ + "left_command", + "left_shift" + ] + } + ], + "conditions": [ + { + "type": "frontmost_application_unless", + "bundle_identifiers": [ + "^com\\.apple\\.Terminal$", + "^com\\.googlecode\\.iterm2$", + "^net\\.kovidgoyal\\.kitty$", + "^org\\.alacritty$", + "^dev\\.warp\\.Warp-Stable$", + "^com\\.mitchellh\\.ghostty$", + "^io\\.wez\\.wezterm$" + ] + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "y", + "modifiers": { + "mandatory": [ + "control" + ], + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "z", + "modifiers": [ + "left_command", + "left_shift" + ] + } + ], + "conditions": [ + { + "type": "frontmost_application_unless", + "bundle_identifiers": [ + "^com\\.apple\\.Terminal$", + "^com\\.googlecode\\.iterm2$", + "^net\\.kovidgoyal\\.kitty$", + "^org\\.alacritty$", + "^dev\\.warp\\.Warp-Stable$", + "^com\\.mitchellh\\.ghostty$", + "^io\\.wez\\.wezterm$" + ] + } + ] + } + ] + }, + { + "description": "Model M: Linux Alt+Tab, Alt+F4, Ctrl+Insert, Shift+Insert outside terminals", + "manipulators": [ + { + "type": "basic", + "from": { + "key_code": "tab", + "modifiers": { + "mandatory": [ + "option" + ], + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "tab", + "modifiers": [ + "left_command" + ] + } + ], + "conditions": [ + { + "type": "frontmost_application_unless", + "bundle_identifiers": [ + "^com\\.apple\\.Terminal$", + "^com\\.googlecode\\.iterm2$", + "^net\\.kovidgoyal\\.kitty$", + "^org\\.alacritty$", + "^dev\\.warp\\.Warp-Stable$", + "^com\\.mitchellh\\.ghostty$", + "^io\\.wez\\.wezterm$" + ] + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "tab", + "modifiers": { + "mandatory": [ + "option", + "shift" + ], + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "tab", + "modifiers": [ + "left_command", + "left_shift" + ] + } + ], + "conditions": [ + { + "type": "frontmost_application_unless", + "bundle_identifiers": [ + "^com\\.apple\\.Terminal$", + "^com\\.googlecode\\.iterm2$", + "^net\\.kovidgoyal\\.kitty$", + "^org\\.alacritty$", + "^dev\\.warp\\.Warp-Stable$", + "^com\\.mitchellh\\.ghostty$", + "^io\\.wez\\.wezterm$" + ] + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "f4", + "modifiers": { + "mandatory": [ + "option" + ], + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "w", + "modifiers": [ + "left_command" + ] + } + ], + "conditions": [ + { + "type": "frontmost_application_unless", + "bundle_identifiers": [ + "^com\\.apple\\.Terminal$", + "^com\\.googlecode\\.iterm2$", + "^net\\.kovidgoyal\\.kitty$", + "^org\\.alacritty$", + "^dev\\.warp\\.Warp-Stable$", + "^com\\.mitchellh\\.ghostty$", + "^io\\.wez\\.wezterm$" + ] + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "insert", + "modifiers": { + "mandatory": [ + "control" + ], + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "c", + "modifiers": [ + "left_command" + ] + } + ], + "conditions": [ + { + "type": "frontmost_application_unless", + "bundle_identifiers": [ + "^com\\.apple\\.Terminal$", + "^com\\.googlecode\\.iterm2$", + "^net\\.kovidgoyal\\.kitty$", + "^org\\.alacritty$", + "^dev\\.warp\\.Warp-Stable$", + "^com\\.mitchellh\\.ghostty$", + "^io\\.wez\\.wezterm$" + ] + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "insert", + "modifiers": { + "mandatory": [ + "shift" + ], + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "v", + "modifiers": [ + "left_command" + ] + } + ], + "conditions": [ + { + "type": "frontmost_application_unless", + "bundle_identifiers": [ + "^com\\.apple\\.Terminal$", + "^com\\.googlecode\\.iterm2$", + "^net\\.kovidgoyal\\.kitty$", + "^org\\.alacritty$", + "^dev\\.warp\\.Warp-Stable$", + "^com\\.mitchellh\\.ghostty$", + "^io\\.wez\\.wezterm$" + ] + } + ] + } + ] + } + ] +}