Skip to content

Instantly share code, notes, and snippets.

@JadenH
Last active July 19, 2021 21:34
Show Gist options
  • Save JadenH/1bfca0295e9a07d8b8730a44b058bcba to your computer and use it in GitHub Desktop.
Save JadenH/1bfca0295e9a07d8b8730a44b058bcba to your computer and use it in GitHub Desktop.
Windows -> Mac Keys
{
"title": "Windows -> Mac Keys",
"rules": [
{
"description": "Move cursor to end of line [End -> CMD + Right Arrow]",
"manipulators": [
{
"from": {
"key_code": "end",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "right_arrow",
"modifiers": [
"command"
]
}
],
"type": "basic"
}
]
},
{
"description": "Move cursor to beginning of line [Home -> CMD + Left Arrow]",
"manipulators": [
{
"from": {
"key_code": "home",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "left_arrow",
"modifiers": [
"command"
]
}
],
"type": "basic"
}
]
},
{
"description": "Move cursor left between words [Ctrl + Left Arrow -> Option Left Arrow]",
"manipulators": [
{
"from": {
"key_code": "left_arrow",
"modifiers": {
"mandatory": [
"control"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "left_arrow",
"modifiers": [
"option"
]
}
],
"type": "basic"
}
]
},
{
"description": "Move cursor right between words [Ctrl + Right Arrow -> Option Right Arrow]",
"manipulators": [
{
"from": {
"key_code": "right_arrow",
"modifiers": {
"mandatory": [
"control"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "right_arrow",
"modifiers": [
"option"
]
}
],
"type": "basic"
}
]
},
{
"description": "Search (Left) [Left Windows -> Command + Space Bar]",
"manipulators": [
{
"from": {
"key_code": "left_command"
},
"to_if_alone": [
{
"key_code": "spacebar",
"modifiers": [
"command"
]
}
],
"type": "basic"
}
]
},
{
"description": "Search (Right) [Right Windows -> Command + Space Bar]",
"manipulators": [
{
"from": {
"key_code": "right_command"
},
"to_if_alone": [
{
"key_code": "spacebar",
"modifiers": [
"command"
]
}
],
"type": "basic"
}
]
},
{
"description": "Select All [Ctrl A -> Command A]",
"manipulators": [
{
"from": {
"key_code": "a",
"modifiers": {
"mandatory": [
"control"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "a",
"modifiers": [
"command"
]
}
],
"conditions": [
{
"type": "frontmost_application_unless",
"bundle_identifiers": [
"^io\\.alacritty$",
"^co\\.zeit\\.hyper$",
"^com\\.googlecode\\.iterm2$",
"^com\\.apple\\.terminal$",
"^org\\.terminus$"
]
}
],
"type": "basic"
}
]
},
{
"description": "Copy [Ctrl C -> Command C]",
"manipulators": [
{
"from": {
"key_code": "c",
"modifiers": {
"mandatory": [
"control"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "c",
"modifiers": [
"command"
]
}
],
"conditions": [
{
"type": "frontmost_application_unless",
"bundle_identifiers": [
"^io\\.alacritty$",
"^co\\.zeit\\.hyper$",
"^com\\.googlecode\\.iterm2$",
"^com\\.apple\\.terminal$",
"^org\\.terminus$"
]
}
],
"type": "basic"
}
]
},
{
"description": "Copy (Terminals) [Ctrl Shift C -> Command C]",
"manipulators": [
{
"from": {
"key_code": "c",
"modifiers": {
"mandatory": [
"control",
"shift"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "c",
"modifiers": [
"command"
]
}
],
"conditions": [
{
"type": "frontmost_application_if",
"bundle_identifiers": [
"^io\\.alacritty$",
"^co\\.zeit\\.hyper$",
"^com\\.googlecode\\.iterm2$",
"^com\\.apple\\.terminal$",
"^org\\.terminus$"
]
}
],
"type": "basic"
}
]
},
{
"description": "Duplicate [Ctrl D -> Command D]",
"manipulators": [
{
"from": {
"key_code": "d",
"modifiers": {
"mandatory": [
"control"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "d",
"modifiers": [
"command"
]
}
],
"conditions": [
{
"type": "frontmost_application_unless",
"bundle_identifiers": [
"^io\\.alacritty$",
"^co\\.zeit\\.hyper$",
"^com\\.googlecode\\.iterm2$",
"^com\\.apple\\.terminal$",
"^org\\.terminus$"
]
}
],
"type": "basic"
}
]
},
{
"description": "Find [Ctrl F -> Command F]",
"manipulators": [
{
"from": {
"key_code": "f",
"modifiers": {
"mandatory": [
"control"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "f",
"modifiers": [
"command"
]
}
],
"type": "basic"
}
]
},
{
"description": "Open [Ctrl O -> Command O]",
"manipulators": [
{
"from": {
"key_code": "o",
"modifiers": {
"mandatory": [
"control"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "o",
"modifiers": [
"command"
]
}
],
"type": "basic"
}
]
},
{
"description": "New [Ctrl N -> Command N]",
"manipulators": [
{
"from": {
"key_code": "n",
"modifiers": {
"mandatory": [
"control"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "n",
"modifiers": [
"command"
]
}
],
"type": "basic"
}
]
},
{
"description": "Print [Ctrl P -> Command P]",
"manipulators": [
{
"from": {
"key_code": "p",
"modifiers": {
"mandatory": [
"control"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "p",
"modifiers": [
"command"
]
}
],
"type": "basic"
}
]
},
{
"description": "Refresh [Ctrl R -> Command R]",
"manipulators": [
{
"from": {
"key_code": "r",
"modifiers": {
"mandatory": [
"control"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "r",
"modifiers": [
"command"
]
}
],
"type": "basic"
}
]
},
{
"description": "Save [Ctrl S -> Command S]",
"manipulators": [
{
"from": {
"key_code": "s",
"modifiers": {
"mandatory": [
"control"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "s",
"modifiers": [
"command"
]
}
],
"type": "basic"
}
]
},
{
"description": "New Tab [Ctrl T -> Command T]",
"manipulators": [
{
"from": {
"key_code": "t",
"modifiers": {
"mandatory": [
"control"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "t",
"modifiers": [
"command"
]
}
],
"type": "basic"
}
]
},
{
"description": "Reopen Closed Tab [Ctrl Shift T -> Command Shift T]",
"manipulators": [
{
"from": {
"key_code": "t",
"modifiers": {
"mandatory": [
"control",
"shift"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "t",
"modifiers": [
"command",
"shift"
]
}
],
"type": "basic"
}
]
},
{
"description": "Paste [Ctrl V -> Command V]",
"manipulators": [
{
"from": {
"key_code": "v",
"modifiers": {
"mandatory": [
"control"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "v",
"modifiers": [
"command"
]
}
],
"conditions": [
{
"type": "frontmost_application_unless",
"bundle_identifiers": [
"^io\\.alacritty$",
"^co\\.zeit\\.hyper$",
"^com\\.googlecode\\.iterm2$",
"^com\\.apple\\.terminal$",
"^org\\.terminus$"
]
}
],
"type": "basic"
}
]
},
{
"description": "Paste (Terminals) [Ctrl Shift V -> Command V]",
"manipulators": [
{
"from": {
"key_code": "v",
"modifiers": {
"mandatory": [
"control",
"shift"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "v",
"modifiers": [
"command"
]
}
],
"conditions": [
{
"type": "frontmost_application_if",
"bundle_identifiers": [
"^io\\.alacritty$",
"^co\\.zeit\\.hyper$",
"^com\\.googlecode\\.iterm2$",
"^com\\.apple\\.terminal$",
"^org\\.terminus$"
]
}
],
"type": "basic"
}
]
},
{
"description": "Close Window [Ctrl W -> Command W]",
"manipulators": [
{
"from": {
"key_code": "w",
"modifiers": {
"mandatory": [
"control"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "w",
"modifiers": [
"command"
]
}
],
"type": "basic"
}
]
},
{
"description": "Cut [Ctrl X -> Command X]",
"manipulators": [
{
"from": {
"key_code": "x",
"modifiers": {
"mandatory": [
"control"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "x",
"modifiers": [
"command"
]
}
],
"conditions": [
{
"type": "frontmost_application_unless",
"bundle_identifiers": [
"^io\\.alacritty$",
"^co\\.zeit\\.hyper$",
"^com\\.googlecode\\.iterm2$",
"^com\\.apple\\.terminal$",
"^org\\.terminus$"
]
}
],
"type": "basic"
}
]
},
{
"description": "Undo [Ctrl Z -> Command Z]",
"manipulators": [
{
"from": {
"key_code": "z",
"modifiers": {
"mandatory": [
"control"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "z",
"modifiers": [
"command"
]
}
],
"type": "basic"
}
]
},
{
"description": "Lock [Windows Key + L -> control + shift + power]",
"manipulators": [
{
"from": {
"key_code": "l",
"modifiers": {
"mandatory": [
"command"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "power",
"modifiers": [
"control",
"shift"
]
}
],
"type": "basic"
}
]
},
{
"description": "Delete Word [Ctrl Delete -> Command Delete]",
"manipulators": [
{
"from": {
"key_code": "delete_or_backspace",
"modifiers": {
"mandatory": [
"control"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "delete_or_backspace",
"modifiers": [
"option"
]
}
],
"type": "basic"
}
]
},
{
"description": "Screenshot [Print Screen -> Command Shift 3]",
"manipulators": [
{
"from": {
"key_code": "print_screen",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "3",
"modifiers": [
"left_command",
"left_shift"
]
}
],
"type": "basic"
}
]
},
{
"description": "Screenshot to Clipboard [Print Screen -> Command Shift 3]",
"manipulators": [
{
"from": {
"key_code": "print_screen",
"modifiers": {
"optional": [
"left_shift",
"right_shift"
]
}
},
"to": [
{
"key_code": "4",
"modifiers": [
"left_command",
"left_shift"
]
}
],
"type": "basic"
}
]
},
{
"description": "Zoom In [Ctrl Plus -> Command Plus]",
"manipulators": [
{
"from": {
"key_code": "equal_sign",
"modifiers": {
"mandatory": [
"control"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "equal_sign",
"modifiers": [
"command"
]
}
],
"type": "basic"
}
]
},
{
"description": "Zoom Out [Ctrl Minus -> Command Minus]",
"manipulators": [
{
"from": {
"key_code": "hyphen",
"modifiers": {
"mandatory": [
"control"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "hyphen",
"modifiers": [
"command"
]
}
],
"type": "basic"
}
]
},
{
"description": "Application Switching [Alt Tab -> Command Tab]",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "left_alt",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"set_variable": {
"name": "left_alt pressed",
"value": 1
}
},
{
"key_code": "left_command"
}
],
"to_delayed_action": {
"to_if_invoked": [
{
"set_variable": {
"name": "left_alt pressed",
"value": 0
}
}
],
"to_if_canceled": [
{
"set_variable": {
"name": "left_alt pressed",
"value": 0
}
}
]
}
}
]
},
{
"description": "(Slack) Search [Control K -> Command K]",
"manipulators": [
{
"from": {
"key_code": "k",
"modifiers": {
"mandatory": [
"control"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "k",
"modifiers": [
"command"
]
}
],
"conditions": [
{
"type": "frontmost_application_if",
"bundle_identifiers": [
"^com\\.tinyspeck\\.slackmacgap$"
]
}
],
"type": "basic"
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment