Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: stop media buttons from starting apple music #133

Merged
merged 1 commit into from
Nov 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
117 changes: 115 additions & 2 deletions other/karabiner/karabiner.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down Expand Up @@ -449,8 +562,8 @@
"from": { "key_code": "caps_lock" },
"to": [{ "key_code": "escape" }]
}
]
],
"virtual_hid_keyboard": { "keyboard_type_v2": "ansi" }
}
]
}