Last active
September 21, 2025 19:38
-
-
Save tabidots/d97c69d5d667fa0302617522eb5b08df to your computer and use it in GitHub Desktop.
Karabiner-Elements rule to get Safari to close a tab even when W is mapped to a non-alpha key
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "description": "Fix Safari ⌘W close tab when using custom layout", | |
| "manipulators": [ | |
| { | |
| "conditions": [ | |
| { | |
| "bundle_identifiers": [ | |
| "^com\\.apple\\.Safari$" | |
| ], | |
| "type": "frontmost_application_if" | |
| } | |
| ], | |
| "from": { | |
| "key_code": "w", | |
| "modifiers": { "mandatory": ["command"] } | |
| }, | |
| "to": [{ "shell_command": "osascript -e 'tell application \"Safari\" to tell front window to close current tab'" }], | |
| "type": "basic" | |
| } | |
| ] | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment