Skip to content

Instantly share code, notes, and snippets.

@fukayatsu
Last active December 8, 2021 19:20
Show Gist options
  • Save fukayatsu/c93d036e0b6cc010289facb67fc325e8 to your computer and use it in GitHub Desktop.
Save fukayatsu/c93d036e0b6cc010289facb67fc325e8 to your computer and use it in GitHub Desktop.
Fix "Cmd+[" / "Cmd+Shift+[" on M1 Mac
{
"title":"VSCode Fix",
"rules":[
{
"description":"Fix Cmd+[",
"_comment":"https://github.com/microsoft/vscode/issues/115651",
"manipulators":[
{
"conditions":[
{
"type":"frontmost_application_if",
"bundle_identifiers":[
"^com\\.microsoft\\.VSCode"
]
}
],
"from":{
"key_code":"open_bracket",
"modifiers":{
"mandatory":[
"command"
],
"optional":[
"fn",
"command",
"control",
"option",
"shift"
]
}
},
"to":[
{
"key_code":"caps_lock"
},
{
"key_code":"open_bracket",
"modifiers":[
"command"
]
},
{
"key_code":"caps_lock"
}
],
"type":"basic"
}
]
}
]
}
@fukayatsu
Copy link
Author

Usage:

  1. Put vscode_fix.json into ~/.config/karabiner/assets/complex_modifications/
  2. Open Karabiner-Elements > "Complex Modifications" > "Add rule"
  3. Enable "VSCode Fix" > "Fix Cmd+["

@fukayatsu
Copy link
Author

@fukayatsu
Copy link
Author

fukayatsu commented Aug 15, 2021

TODO:

  • Consider the case that caps lock is already enabled
    • from.modifiers.optional: ["any"] => ["fn", "command", "control", "option", "shift"]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment