diff --git a/other/karabiner/karabiner.json b/other/karabiner/karabiner.json index e733c91..2a00d99 100644 --- a/other/karabiner/karabiner.json +++ b/other/karabiner/karabiner.json @@ -3,6 +3,119 @@ { "complex_modifications": { "rules": [ + { + "description": "⏪ (back track) key should only control Spotify.", + "manipulators": [ + { + "from": { "key_code": "f7" }, + "to_if_alone": [ + { + "shell_command": "osascript -e 'tell application \"Spotify\" to back track'" + } + ], + "to_if_held_down": [ + { + "shell_command": "osascript -e 'tell application \"Spotify\" to rewind'" + } + ], + "type": "basic" + } + ] + }, + { + "description": "⏯ (play/pause) key should only control Spotify.", + "manipulators": [ + { + "from": { "key_code": "f8" }, + "to": [ + { + "shell_command": "osascript -e 'tell application \"Spotify\" to playpause'" + } + ], + "type": "basic" + } + ] + }, + { + "description": "⏩ (next track) key should only control Spotify.", + "manipulators": [ + { + "from": { "key_code": "f9" }, + "to_if_alone": [ + { + "shell_command": "osascript -e 'tell application \"Spotify\" to next track'" + } + ], + "to_if_held_down": [ + { + "shell_command": "osascript -e 'tell application \"Spotify\" to fast forward'" + } + ], + "type": "basic" + } + ] + }, + { + "description": "Fn+⏪ (back track) key should only control Spotify.", + "manipulators": [ + { + "from": { + "key_code": "f7", + "modifiers": { "mandatory": ["fn"] } + }, + "to_if_alone": [ + { + "shell_command": "osascript -e 'tell application \"Spotify\" to back track'" + } + ], + "to_if_held_down": [ + { + "shell_command": "osascript -e 'tell application \"Spotify\" to rewind'" + } + ], + "type": "basic" + } + ] + }, + { + "description": "Fn+⏯ (play/pause) key should only control Spotify.", + "manipulators": [ + { + "from": { + "key_code": "f8", + "modifiers": { "mandatory": ["fn"] } + }, + "to": [ + { + "shell_command": "osascript -e 'tell application \"Spotify\" to playpause'" + } + ], + "type": "basic" + } + ] + }, + { + "description": "Fn+⏩ (next track) key should only control Spotify.", + "manipulators": [ + { + "from": { + "key_code": "f9", + "modifiers": { "mandatory": ["fn"] } + }, + "to_if_alone": [ + { + "shell_command": "osascript -e 'tell application \"Spotify\" to next track'" + } + ], + "to_if_held_down": [ + { + "shell_command": "osascript -e 'tell application \"Spotify\" to fast forward'" + } + ], + "type": "basic" + } + ] + }, { "description": "For VSCode, VSCode Insiders, and Cursor: Function keys (F1-F12) act as standard function keys. Pressing fn + Function key performs the corresponding media function.", "manipulators": [ @@ -449,8 +562,8 @@ "from": { "key_code": "caps_lock" }, "to": [{ "key_code": "escape" }] } - ] + ], + "virtual_hid_keyboard": { "keyboard_type_v2": "ansi" } } ] } -