Skip to content

Instantly share code, notes, and snippets.

@toonetown
Last active March 14, 2024 16:42
Show Gist options
  • Star 23 You must be signed in to star a gist
  • Fork 6 You must be signed in to fork a gist
  • Save toonetown/ec7d3e74807fcc57362dc34dd47a4570 to your computer and use it in GitHub Desktop.
Save toonetown/ec7d3e74807fcc57362dc34dd47a4570 to your computer and use it in GitHub Desktop.
Karabiner Elements JSON configuration for Microsoft Remote Desktop
{
"title": "Microsoft Remote Desktop",
"rules": [
{
"description": "Windows Mappings",
"manipulators": [
{
"type": "basic",
"from": { "key_code": "x", "modifiers": { "mandatory": [ "command" ] } },
"to": [ { "key_code": "x", "modifiers": [ "left_control" ] } ],
"conditions": [ { "type": "frontmost_application_if", "bundle_identifiers": [ "com\\.microsoft\\.rdc\\.macos" ] } ]
},
{
"type": "basic",
"from": { "key_code": "c", "modifiers": { "mandatory": [ "command" ] } },
"to": [ { "key_code": "c", "modifiers": [ "left_control" ] } ],
"conditions": [ { "type": "frontmost_application_if", "bundle_identifiers": [ "com\\.microsoft\\.rdc\\.macos" ] } ]
},
{
"type": "basic",
"from": { "key_code": "v", "modifiers": { "mandatory": [ "command" ] } },
"to": [ { "key_code": "v", "modifiers": [ "left_control" ] } ],
"conditions": [ { "type": "frontmost_application_if", "bundle_identifiers": [ "com\\.microsoft\\.rdc\\.macos" ] } ]
},
{
"type": "basic",
"from": { "key_code": "a", "modifiers": { "mandatory": [ "command" ] } },
"to": [ { "key_code": "a", "modifiers": [ "left_control" ] } ],
"conditions": [ { "type": "frontmost_application_if", "bundle_identifiers": [ "com\\.microsoft\\.rdc\\.macos" ] } ]
},
{
"type": "basic",
"from": { "key_code": "z", "modifiers": { "mandatory": [ "command" ] } },
"to": [ { "key_code": "z", "modifiers": [ "left_control" ] } ],
"conditions": [ { "type": "frontmost_application_if", "bundle_identifiers": [ "com\\.microsoft\\.rdc\\.macos" ] } ]
},
{
"type": "basic",
"from": { "key_code": "s", "modifiers": { "mandatory": [ "command" ] } },
"to": [ { "key_code": "s", "modifiers": [ "left_control" ] } ],
"conditions": [ { "type": "frontmost_application_if", "bundle_identifiers": [ "com\\.microsoft\\.rdc\\.macos" ] } ]
},
{
"type": "basic",
"from": { "key_code": "p", "modifiers": { "mandatory": [ "command" ] } },
"to": [ { "key_code": "p", "modifiers": [ "left_control" ] } ],
"conditions": [ { "type": "frontmost_application_if", "bundle_identifiers": [ "com\\.microsoft\\.rdc\\.macos" ] } ]
},
{
"type": "basic",
"from": { "key_code": "f", "modifiers": { "mandatory": [ "command" ] } },
"to": [ { "key_code": "f", "modifiers": [ "left_control" ] } ],
"conditions": [ { "type": "frontmost_application_if", "bundle_identifiers": [ "com\\.microsoft\\.rdc\\.macos" ] } ]
},
{
"type": "basic",
"from": { "key_code": "b", "modifiers": { "mandatory": [ "command" ] } },
"to": [ { "key_code": "b", "modifiers": [ "left_control" ] } ],
"conditions": [ { "type": "frontmost_application_if", "bundle_identifiers": [ "com\\.microsoft\\.rdc\\.macos" ] } ]
},
{
"type": "basic",
"from": { "key_code": "i", "modifiers": { "mandatory": [ "command" ] } },
"to": [ { "key_code": "i", "modifiers": [ "left_control" ] } ],
"conditions": [ { "type": "frontmost_application_if", "bundle_identifiers": [ "com\\.microsoft\\.rdc\\.macos" ] } ]
},
{
"type": "basic",
"from": { "key_code": "u", "modifiers": { "mandatory": [ "command" ] } },
"to": [ { "key_code": "u", "modifiers": [ "left_control" ] } ],
"conditions": [ { "type": "frontmost_application_if", "bundle_identifiers": [ "com\\.microsoft\\.rdc\\.macos" ] } ]
},
{
"type": "basic",
"from": { "key_code": "n", "modifiers": { "mandatory": [ "command" ] } },
"to": [ { "key_code": "n", "modifiers": [ "left_control" ] } ],
"conditions": [ { "type": "frontmost_application_if", "bundle_identifiers": [ "com\\.microsoft\\.rdc\\.macos" ] } ]
},
{
"type": "basic",
"from": { "key_code": "t", "modifiers": { "mandatory": [ "command" ] } },
"to": [ { "key_code": "t", "modifiers": [ "left_control" ] } ],
"conditions": [ { "type": "frontmost_application_if", "bundle_identifiers": [ "com\\.microsoft\\.rdc\\.macos" ] } ]
},
{
"type": "basic",
"from": { "key_code": "comma", "modifiers": { "mandatory": [ "command" ] } },
"to": [ { "key_code": "comma", "modifiers": [ "left_control" ] } ],
"conditions": [ { "type": "frontmost_application_if", "bundle_identifiers": [ "com\\.microsoft\\.rdc\\.macos" ] } ]
},
{
"type": "basic",
"from": { "key_code": "k", "modifiers": { "mandatory": [ "command" ] } },
"to": [ { "key_code": "k", "modifiers": [ "left_control" ] } ],
"conditions": [ { "type": "frontmost_application_if", "bundle_identifiers": [ "com\\.microsoft\\.rdc\\.macos" ] } ]
},
{
"type": "basic",
"from": { "key_code": "l", "modifiers": { "mandatory": [ "command" ] } },
"to": [ { "key_code": "l", "modifiers": [ "left_control" ] } ],
"conditions": [ { "type": "frontmost_application_if", "bundle_identifiers": [ "com\\.microsoft\\.rdc\\.macos" ] } ]
},
{
"type": "basic",
"from": { "key_code": "g", "modifiers": { "mandatory": [ "command" ] } },
"to": [ { "key_code": "g", "modifiers": [ "left_control" ] } ],
"conditions": [ { "type": "frontmost_application_if", "bundle_identifiers": [ "com\\.microsoft\\.rdc\\.macos" ] } ]
},
{
"type": "basic",
"from": { "key_code": "period", "modifiers": { "mandatory": [ "command" ] } },
"to": [ { "key_code": "period", "modifiers": [ "left_control" ] } ],
"conditions": [ { "type": "frontmost_application_if", "bundle_identifiers": [ "com\\.microsoft\\.rdc\\.macos" ] } ]
},
{
"type": "basic",
"from": { "key_code": "open_bracket", "modifiers": { "mandatory": [ "command" ] } },
"to": [ { "key_code": "open_bracket", "modifiers": [ "left_control" ] } ],
"conditions": [ { "type": "frontmost_application_if", "bundle_identifiers": [ "com\\.microsoft\\.rdc\\.macos" ] } ]
},
{
"type": "basic",
"from": { "key_code": "close_bracket", "modifiers": { "mandatory": [ "command" ] } },
"to": [ { "key_code": "close_bracket", "modifiers": [ "left_control" ] } ],
"conditions": [ { "type": "frontmost_application_if", "bundle_identifiers": [ "com\\.microsoft\\.rdc\\.macos" ] } ]
},
{
"type": "basic",
"from": { "key_code": "slash", "modifiers": { "mandatory": [ "command" ] } },
"to": [ { "key_code": "slash", "modifiers": [ "left_control" ] } ],
"conditions": [ { "type": "frontmost_application_if", "bundle_identifiers": [ "com\\.microsoft\\.rdc\\.macos" ] } ]
},
{
"type": "basic",
"from": { "key_code": "k", "modifiers": { "mandatory": [ "command", "shift" ] } },
"to": [ { "key_code": "k", "modifiers": [ "left_control", "left_shift" ] } ],
"conditions": [ { "type": "frontmost_application_if", "bundle_identifiers": [ "com\\.microsoft\\.rdc\\.macos" ] } ]
},
{
"type": "basic",
"from": { "key_code": "z", "modifiers": { "mandatory": [ "command", "shift" ] } },
"to": [ { "key_code": "z", "modifiers": [ "left_control", "left_shift" ] } ],
"conditions": [ { "type": "frontmost_application_if", "bundle_identifiers": [ "com\\.microsoft\\.rdc\\.macos" ] } ]
},
{
"type": "basic",
"from": { "key_code": "g", "modifiers": { "mandatory": [ "command", "shift" ] } },
"to": [ { "key_code": "g", "modifiers": [ "left_control", "left_shift" ] } ],
"conditions": [ { "type": "frontmost_application_if", "bundle_identifiers": [ "com\\.microsoft\\.rdc\\.macos" ] } ]
},
{
"type": "basic",
"from": { "key_code": "b", "modifiers": { "mandatory": [ "command", "shift" ] } },
"to": [ { "key_code": "b", "modifiers": [ "left_control", "left_shift" ] } ],
"conditions": [ { "type": "frontmost_application_if", "bundle_identifiers": [ "com\\.microsoft\\.rdc\\.macos" ] } ]
},
{
"type": "basic",
"from": { "key_code": "f", "modifiers": { "mandatory": [ "command", "shift" ] } },
"to": [ { "key_code": "f", "modifiers": [ "left_control", "left_shift" ] } ],
"conditions": [ { "type": "frontmost_application_if", "bundle_identifiers": [ "com\\.microsoft\\.rdc\\.macos" ] } ]
},
{
"type": "basic",
"from": { "key_code": "r", "modifiers": { "mandatory": [ "command", "shift" ] } },
"to": [ { "key_code": "r", "modifiers": [ "left_control", "left_shift" ] } ],
"conditions": [ { "type": "frontmost_application_if", "bundle_identifiers": [ "com\\.microsoft\\.rdc\\.macos" ] } ]
},
{
"type": "basic",
"from": { "key_code": "slash", "modifiers": { "mandatory": [ "command", "shift" ] } },
"to": [ { "key_code": "slash", "modifiers": [ "left_control", "left_shift" ] } ],
"conditions": [ { "type": "frontmost_application_if", "bundle_identifiers": [ "com\\.microsoft\\.rdc\\.macos" ] } ]
},
{
"type": "basic",
"from": { "key_code": "left_arrow", "modifiers": { "mandatory": [ "option" ] } },
"to": [ { "key_code": "left_arrow", "modifiers": [ "left_control" ] } ],
"conditions": [ { "type": "frontmost_application_if", "bundle_identifiers": [ "com\\.microsoft\\.rdc\\.macos" ] } ]
},
{
"type": "basic",
"from": { "key_code": "right_arrow", "modifiers": { "mandatory": [ "option" ] } },
"to": [ { "key_code": "right_arrow", "modifiers": [ "left_control" ] } ],
"conditions": [ { "type": "frontmost_application_if", "bundle_identifiers": [ "com\\.microsoft\\.rdc\\.macos" ] } ]
},
{
"type": "basic",
"from": { "key_code": "left_arrow", "modifiers": { "mandatory": [ "option", "shift" ] } },
"to": [ { "key_code": "left_arrow", "modifiers": [ "left_control", "left_shift" ] } ],
"conditions": [ { "type": "frontmost_application_if", "bundle_identifiers": [ "com\\.microsoft\\.rdc\\.macos" ] } ]
},
{
"type": "basic",
"from": { "key_code": "right_arrow", "modifiers": { "mandatory": [ "option", "shift" ] } },
"to": [ { "key_code": "right_arrow", "modifiers": [ "left_control", "left_shift" ] } ],
"conditions": [ { "type": "frontmost_application_if", "bundle_identifiers": [ "com\\.microsoft\\.rdc\\.macos" ] } ]
},
{
"type": "basic",
"from": { "key_code": "left_arrow", "modifiers": { "mandatory": [ "command" ] } },
"to": [ { "key_code": "home", "modifiers": [ ] } ],
"conditions": [ { "type": "frontmost_application_if", "bundle_identifiers": [ "com\\.microsoft\\.rdc\\.macos" ] } ]
},
{
"type": "basic",
"from": { "key_code": "right_arrow", "modifiers": { "mandatory": [ "command" ] } },
"to": [ { "key_code": "end", "modifiers": [ ] } ],
"conditions": [ { "type": "frontmost_application_if", "bundle_identifiers": [ "com\\.microsoft\\.rdc\\.macos" ] } ]
},
{
"type": "basic",
"from": { "key_code": "left_arrow", "modifiers": { "mandatory": [ "command", "shift" ] } },
"to": [ { "key_code": "home", "modifiers": [ "left_shift" ] } ],
"conditions": [ { "type": "frontmost_application_if", "bundle_identifiers": [ "com\\.microsoft\\.rdc\\.macos" ] } ]
},
{
"type": "basic",
"from": { "key_code": "right_arrow", "modifiers": { "mandatory": [ "command", "shift" ] } },
"to": [ { "key_code": "end", "modifiers": [ "left_shift" ] } ],
"conditions": [ { "type": "frontmost_application_if", "bundle_identifiers": [ "com\\.microsoft\\.rdc\\.macos" ] } ]
},
{
"type": "basic",
"from": { "key_code": "up_arrow", "modifiers": { "mandatory": [ "command" ] } },
"to": [ { "key_code": "up_arrow", "modifiers": [ "left_control" ] } ],
"conditions": [ { "type": "frontmost_application_if", "bundle_identifiers": [ "com\\.microsoft\\.rdc\\.macos" ] } ]
},
{
"type": "basic",
"from": { "key_code": "down_arrow", "modifiers": { "mandatory": [ "command" ] } },
"to": [ { "key_code": "down_arrow", "modifiers": [ "left_control" ] } ],
"conditions": [ { "type": "frontmost_application_if", "bundle_identifiers": [ "com\\.microsoft\\.rdc\\.macos" ] } ]
},
{
"type": "basic",
"from": { "key_code": "up_arrow", "modifiers": { "mandatory": [ "command", "shift" ] } },
"to": [ { "key_code": "up_arrow", "modifiers": [ "left_control", "left_shift" ] } ],
"conditions": [ { "type": "frontmost_application_if", "bundle_identifiers": [ "com\\.microsoft\\.rdc\\.macos" ] } ]
},
{
"type": "basic",
"from": { "key_code": "down_arrow", "modifiers": { "mandatory": [ "command", "shift" ] } },
"to": [ { "key_code": "down_arrow", "modifiers": [ "left_control", "shift" ] } ],
"conditions": [ { "type": "frontmost_application_if", "bundle_identifiers": [ "com\\.microsoft\\.rdc\\.macos" ] } ]
},
{
"type": "basic",
"from": { "key_code": "q", "modifiers": { "mandatory": [ "command" ] } },
"to": [ { "key_code": "f4", "modifiers": [ "fn", "left_option" ] } ],
"conditions": [ { "type": "frontmost_application_if", "bundle_identifiers": [ "com\\.microsoft\\.rdc\\.macos" ] } ]
},
{
"type": "basic",
"from": { "key_code": "w", "modifiers": { "mandatory": [ "command" ] } },
"to": [ { "key_code": "f4", "modifiers": [ "fn", "left_control" ] } ],
"conditions": [ { "type": "frontmost_application_if", "bundle_identifiers": [ "com\\.microsoft\\.rdc\\.macos" ] } ]
},
{
"type": "basic",
"from": { "key_code": "r", "modifiers": { "mandatory": [ "command" ] } },
"to": [ { "key_code": "f5", "modifiers": [ "fn" ] } ],
"conditions": [ { "type": "frontmost_application_if", "bundle_identifiers": [ "com\\.microsoft\\.rdc\\.macos" ] } ]
},
{
"type": "basic",
"from": { "key_code": "comma", "modifiers": { "mandatory": [ "command", "option" ] } },
"to": [ { "key_code": "comma", "modifiers": [ "left_command" ] } ],
"conditions": [ { "type": "frontmost_application_if", "bundle_identifiers": [ "com\\.microsoft\\.rdc\\.macos" ] } ]
},
{
"type": "basic",
"from": { "key_code": "c", "modifiers": { "mandatory": [ "command", "option" ] } },
"to": [ { "key_code": "c", "modifiers": [ "left_command" ] } ],
"conditions": [ { "type": "frontmost_application_if", "bundle_identifiers": [ "com\\.microsoft\\.rdc\\.macos" ] } ]
},
{
"type": "basic",
"from": { "key_code": "q", "modifiers": { "mandatory": [ "command", "option" ] } },
"to": [ { "key_code": "q", "modifiers": [ "left_command" ] } ],
"conditions": [ { "type": "frontmost_application_if", "bundle_identifiers": [ "com\\.microsoft\\.rdc\\.macos" ] } ]
},
{
"type": "basic",
"from": { "key_code": "h", "modifiers": { "mandatory": [ "command", "option" ] } },
"to": [ { "key_code": "h", "modifiers": [ "left_command" ] } ],
"conditions": [ { "type": "frontmost_application_if", "bundle_identifiers": [ "com\\.microsoft\\.rdc\\.macos" ] } ]
},
{
"type": "basic",
"from": { "key_code": "z", "modifiers": { "mandatory": [ "command", "option" ] } },
"to": [ { "key_code": "z", "modifiers": [ "left_command" ] } ],
"conditions": [ { "type": "frontmost_application_if", "bundle_identifiers": [ "com\\.microsoft\\.rdc\\.macos" ] } ]
},
{
"type": "basic",
"from": { "key_code": "w", "modifiers": { "mandatory": [ "command", "option" ] } },
"to": [ { "key_code": "w", "modifiers": [ "left_control", "left_option" ] } ],
"conditions": [ { "type": "frontmost_application_if", "bundle_identifiers": [ "com\\.microsoft\\.rdc\\.macos" ] } ]
},
{
"type": "basic",
"from": { "key_code": "d", "modifiers": { "mandatory": [ "command" ] } },
"to": [ { "key_code": "d", "modifiers": [ "left_control" ] } ],
"conditions": [ { "type": "frontmost_application_if", "bundle_identifiers": [ "com\\.microsoft\\.rdc\\.macos" ] } ]
},
{
"type": "basic",
"from": { "key_code": "d", "modifiers": { "mandatory": [ "command", "shift" ] } },
"to": [ { "key_code": "d", "modifiers": [ "left_control", "left_shift" ] } ],
"conditions": [ { "type": "frontmost_application_if", "bundle_identifiers": [ "com\\.microsoft\\.rdc\\.macos" ] } ]
}
]
}
]
}
@DennyWeinberg
Copy link

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