From 7b970a50850fce3303114d48db99f93aeccba60d Mon Sep 17 00:00:00 2001 From: Carlo van Wyk <5310264+thecarlo@users.noreply.github.com> Date: Sat, 15 Jun 2024 22:12:36 +1000 Subject: [PATCH] Mac OSX key bindings (#1661) * Mac OSX key bindings * Updated documentation --- public/extra_descriptions/google_chrome.html | 20 +- public/extra_descriptions/mac_osx.html | 74 ++++++ public/extra_descriptions/premiere_pro.html | 6 +- public/extra_descriptions/vs_code.html | 16 +- public/groups.json | 4 + public/json/mac_osx.json | 250 +++++++++++++++++++ 6 files changed, 347 insertions(+), 23 deletions(-) create mode 100644 public/extra_descriptions/mac_osx.html create mode 100644 public/json/mac_osx.json diff --git a/public/extra_descriptions/google_chrome.html b/public/extra_descriptions/google_chrome.html index c6b171673..e2f80ab7f 100644 --- a/public/extra_descriptions/google_chrome.html +++ b/public/extra_descriptions/google_chrome.html @@ -10,14 +10,14 @@ - + - +
Caps LockCaps Lock Maps to left control + left shift + right command (⌃⇧⌘). The Caps lock is disabled.
Double-tap right shiftDouble-tap right shift Caps lock toggle
@@ -28,7 +28,7 @@ - +
Caps lock hyper key + aCaps lock hyper key + a Search Tabs
@@ -39,7 +39,7 @@ - +
Caps lock hyper key + qCaps lock hyper key + q Switch between Google Chrome profiles
@@ -50,23 +50,19 @@ - + - + - + - + - - - -
Caps lock hyper key + 1Caps lock hyper key + 1 Developer Tools
Caps lock hyper key + 2Caps lock hyper key + 2 Developer Console
Caps lock hyper key + 3Caps lock hyper key + 3 Developer Elements Panel
Caps lock hyper key + qCaps lock hyper key + q Toggle device toolbar (when you already have a developer panel open)
Right cmdToggle Zen mode
diff --git a/public/extra_descriptions/mac_osx.html b/public/extra_descriptions/mac_osx.html new file mode 100644 index 000000000..3e08bfd7b --- /dev/null +++ b/public/extra_descriptions/mac_osx.html @@ -0,0 +1,74 @@ + + +

+ Hyper Keys +

+ +

+ Includes 3 hyper keys for maximum flexibility. +

+ + + + + + + + + + + + + + +
Right Option Key + Maps to left shift + left option + left command (⌃⇧⌥⌘) +
Caps Lock + Maps to left control + left shift + right command (⌃⇧⌘) + The Caps lock is disabled. +
Tab (held down) + Maps to left control + left command (⌃⌘) +
+ +

+ Toggle Caps Lock +

+ +

+ Since the Caps Lock key is set up as a hyper key, double-tap the right shift key to toggle Caps lock. +

+ + + Double-tap right shift + Caps lock toggle + + +

+ Closing Applications +

+ +

+ Since it's easy to accidentally hit CMD + Q and close an application, I've changed this so that you need to hit CMD + q, q to close an application. +

+ + + + + + +
cmd + double-tap qclose application
+ +

+ Disable minimising applications +

+ +

+ Since it's easy to accidentally minimise an application, I've disabled the cmd + h default keybinding in Mac OSX. +

+ + + + + + +
cmd + hKeybinding is disabled
diff --git a/public/extra_descriptions/premiere_pro.html b/public/extra_descriptions/premiere_pro.html index 2ced86df7..6ba925795 100644 --- a/public/extra_descriptions/premiere_pro.html +++ b/public/extra_descriptions/premiere_pro.html @@ -6,7 +6,7 @@ - + @@ -19,11 +19,11 @@
Mouse button 3Mouse button 3 Hold in button 3 to scroll the timeline horizontally. This automatically selects the hand tool. When you release button 3, it goes back to the selection tool.
- + - +
Button 1 (left-click)Button 1 (left-click) Makes a cut on the timeline
Button 2 (right-click)Button 2 (right-click) Ripple edit to the previous cut on the timeline
diff --git a/public/extra_descriptions/vs_code.html b/public/extra_descriptions/vs_code.html index 36beb4b16..0fb3df21a 100644 --- a/public/extra_descriptions/vs_code.html +++ b/public/extra_descriptions/vs_code.html @@ -10,14 +10,14 @@ - + - +
Caps LockCaps Lock Maps to left control + left shift + right command (⌃⇧⌘). The Caps lock is disabled.
Double-tap right shiftDouble-tap right shift Caps lock toggle
@@ -28,11 +28,11 @@ - + - +
Caps Lock Hyper Key + aCaps Lock Hyper Key + a Quick open (search for a file)
Caps Lock Hyper Key + sCaps Lock Hyper Key + s Navigate symbols (search symbols)
@@ -43,19 +43,19 @@ - + - + - + - +
Double-tap left ctrlDouble-tap left ctrl Toggle sidebar
Double-tap left optionDouble-tap left option Toggle terminal
Double-tap left cmdDouble-tap left cmd Toggle Zen mode
Right cmdRight cmd Toggle Zen mode
diff --git a/public/groups.json b/public/groups.json index 06bae97be..e0044972b 100644 --- a/public/groups.json +++ b/public/groups.json @@ -1287,6 +1287,10 @@ "name": "OS Functionality", "id": "os-functionality", "files": [ + { + "path": "json/mac_osx.json", + "extra_description_path": "extra_descriptions/mac_osx.html" + }, { "path": "json/mac_osx_double_tap_q_close_application.json" }, diff --git a/public/json/mac_osx.json b/public/json/mac_osx.json new file mode 100644 index 000000000..20de47bb9 --- /dev/null +++ b/public/json/mac_osx.json @@ -0,0 +1,250 @@ +{ + "title": "Mac OSX: Essential Keybindings", + "maintainers": ["thecarlo"], + "rules": [ + { + "description": "Hyper Key: Right Option Key → left shift + left option + left command (⌃⇧⌥⌘)", + "manipulators": [ + { + "from": { + "key_code": "right_option", + "modifiers": { + "optional": ["any"] + } + }, + "to": [ + { + "set_variable": { + "name": "hyper_right_option", + "value": 1 + } + }, + { + "key_code": "left_control", + "modifiers": ["left_shift", "left_option", "left_command"] + } + ], + "to_after_key_up": [ + { + "set_variable": { + "name": "hyper_right_option", + "value": 0 + } + } + ], + "type": "basic" + } + ] + }, + { + "description": "Hyper Key: Caps Lock → left control + left shift + right command (⌃⇧⌘)", + "manipulators": [ + { + "from": { + "key_code": "caps_lock", + "modifiers": { + "optional": ["any"] + } + }, + "to": [ + { + "set_variable": { + "name": "hyper_caps_lock", + "value": 1 + } + }, + { + "key_code": "left_control", + "modifiers": ["left_shift", "right_command"] + } + ], + "to_after_key_up": [ + { + "set_variable": { + "name": "hyper_caps_lock", + "value": 0 + } + } + ], + "type": "basic" + } + ] + }, + { + "description": "Hyper Key: Tab (held down) → left control + left command (⌃⌘)", + "manipulators": [ + { + "from": { + "key_code": "tab" + }, + "to_if_alone": [ + { + "key_code": "tab" + } + ], + "to_if_held_down": [ + { + "set_variable": { + "name": "hyper_tab_held_down", + "value": 1 + } + }, + { + "key_code": "left_control", + "modifiers": ["left_command"] + } + ], + "to_after_key_up": [ + { + "set_variable": { + "name": "hyper_tab_held_down", + "value": 0 + } + } + ], + "type": "basic" + } + ] + }, + { + "description": "double-tap right ⇧ key → caps lock on", + "manipulators": [ + { + "conditions": [ + { + "name": "right_shift pressed", + "type": "variable_if", + "value": 1 + } + ], + "from": { + "key_code": "right_shift", + "modifiers": { + "optional": ["any"] + } + }, + "to": [ + { + "key_code": "caps_lock" + } + ], + "type": "basic" + }, + { + "from": { + "key_code": "right_shift", + "modifiers": { + "optional": ["any"] + } + }, + "to": [ + { + "set_variable": { + "name": "right_shift pressed", + "value": 1 + } + }, + { + "key_code": "right_shift" + } + ], + "to_delayed_action": { + "to_if_canceled": [ + { + "set_variable": { + "name": "right_shift pressed", + "value": 0 + } + } + ], + "to_if_invoked": [ + { + "set_variable": { + "name": "right_shift pressed", + "value": 0 + } + } + ] + }, + "type": "basic" + } + ] + }, + { + "description": "Mac OSX: left cmd + double-tap q → close application", + "manipulators": [ + { + "conditions": [ + { + "name": "command-q", + "type": "variable_if", + "value": 1 + } + ], + "from": { + "key_code": "q", + "modifiers": { + "mandatory": ["command"] + } + }, + "to": [ + { + "key_code": "q", + "modifiers": ["left_command"] + } + ], + "type": "basic" + }, + { + "from": { + "key_code": "q", + "modifiers": { + "mandatory": ["command"] + } + }, + "to": [ + { + "set_variable": { + "name": "command-q", + "value": 1 + } + } + ], + "to_delayed_action": { + "to_if_canceled": [ + { + "set_variable": { + "name": "command-q", + "value": 0 + } + } + ], + "to_if_invoked": [ + { + "set_variable": { + "name": "command-q", + "value": 0 + } + } + ] + }, + "type": "basic" + } + ] + }, + { + "description": "Mac OSX: disable cmd + h so that it does not minimise windows", + "manipulators": [ + { + "from": { + "key_code": "h", + "modifiers": { + "mandatory": ["command"] + } + }, + "type": "basic" + } + ] + } + ] +}