From f5784df4fc40cf55ff162c027fb6a8f8f00e385f Mon Sep 17 00:00:00 2001 From: Justin Tanner Date: Fri, 30 Aug 2024 09:22:23 +0700 Subject: [PATCH] Updated keybindings to v1.2 for Universal Emacs Keybindings, added to groups.json and get the extra description working --- .../universal_emacs_keybindings.json.html | 160 +- public/groups.json | 4 + public/json/universal_emacs_keybindings.json | 2359 +++++++++++++++-- src/json/universal_emacs_keybindings.json.js | 530 ++-- 4 files changed, 2533 insertions(+), 520 deletions(-) diff --git a/public/extra_descriptions/universal_emacs_keybindings.json.html b/public/extra_descriptions/universal_emacs_keybindings.json.html index 5c1e4b8e4..eee3c663d 100644 --- a/public/extra_descriptions/universal_emacs_keybindings.json.html +++ b/public/extra_descriptions/universal_emacs_keybindings.json.html @@ -1,161 +1,7 @@ -

Port of my emacs universal keybindings script from Hammerspoon to Karabiner.

- +

Full Keymaps

+

Why I developed this script

+

Github Repository

-

- C-x prefix keys -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
C-x C-b - Switch tabs in browsers using QuickTabs.
- - (conf Cmd+B to activate QuickTabs here chrome://extensions/shortcuts) -
C-x C-dOpen dev console (web browsers only)
C-x C-cQuit current application.
C-x C-fOpen file in most apps, browsers switch to focus location bar instead.
C-x C-hSelect all
C-x C-kClose tab or window
C-x C-rReload (browsers only)
C-x C-sSave
C-x C-uUndo
- -

- Control keys (*supports set mark) -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
C-a*Start of line
C-b*Back character
C-dDelete forward
C-e*End of line
C-f*Forward character
C-gEscape also cancels mark
C-hBackspace
C-n*Down arrow
C-p*Up arrow
C-rFind
C-v*Page down
C-yPaste (will passthrough to terminals)
C-/Undo
C-spaceSet mark
- -

- Option keys -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
M-bMove word backward
M-dDelete forward word
M-fMove word forward
M-nNew empty tab or file
M-tNew tab (browsers only)
M-vPage up
M-wCopy selection
M-yPaste
M-delete, M-backspaceUndo
diff --git a/public/groups.json b/public/groups.json index 3826cad35..790894a03 100644 --- a/public/groups.json +++ b/public/groups.json @@ -739,6 +739,10 @@ "path": "json/emacs_key_bindings.json", "extra_description_path": "extra_descriptions/emacs_key_bindings.json.html" }, + { + "path": "json/universal_emacs_keybindings.json", + "extra_description_path": "extra_descriptions/universal_emacs_keybindings.json.html" + }, { "path": "json/ergo_fly_keys.json", "extra_description_path": "extra_descriptions/ergo_fly_keys.json.html" diff --git a/public/json/universal_emacs_keybindings.json b/public/json/universal_emacs_keybindings.json index 1bdbb08f9..ee1782d18 100644 --- a/public/json/universal_emacs_keybindings.json +++ b/public/json/universal_emacs_keybindings.json @@ -5,7 +5,7 @@ ], "rules": [ { - "description": "Emacs Emulation in all apps without emacs keybindings (v1)", + "description": "Emacs Emulation in all apps without emacs keybindings (v1.2)", "manipulators": [ { "type": "basic", @@ -22,7 +22,87 @@ }, "to": [ { - "key_code": "b", + "key_code": "a", + "modifiers": [ + "command", + "shift" + ] + } + ], + "conditions": [ + { + "type": "variable_if", + "name": "C-x", + "value": 1 + }, + { + "type": "frontmost_application_unless", + "bundle_identifiers": [ + "^org\\.gnu\\.Emacs$", + "^org\\.gnu\\.AquamacsEmacs$", + "^org\\.gnu\\.Aquamacs$", + "^org\\.pqrs\\.unknownapp\\.conkeror$", + "^com\\.microsoft\\.rdc$", + "^com\\.microsoft\\.rdc\\.", + "^net\\.sf\\.cord$", + "^com\\.thinomenon\\.RemoteDesktopConnection$", + "^com\\.itap-mobile\\.qmote$", + "^com\\.nulana\\.remotixmac$", + "^com\\.p5sys\\.jump\\.mac\\.viewer$", + "^com\\.p5sys\\.jump\\.mac\\.viewer\\.", + "^com\\.teamviewer\\.TeamViewer$", + "^com\\.vmware\\.horizon$", + "^com\\.2X\\.Client\\.Mac$", + "^com\\.OpenText\\.Exceed-TurboX-Client$", + "^com\\.realvnc\\.vncviewer$", + "^com\\.citrix\\.receiver\\.icaviewer", + "^com\\.apple\\.Terminal$", + "^com\\.googlecode\\.iterm2$", + "^co\\.zeit\\.hyperterm$", + "^co\\.zeit\\.hyper$", + "^io\\.alacritty$", + "^org\\.alacritty$", + "^net\\.kovidgoyal\\.kitty$", + "^org\\.vim\\.", + "^com\\.qvacua\\.VimR$", + "^com\\.vmware\\.fusion$", + "^com\\.vmware\\.horizon$", + "^com\\.vmware\\.view$", + "^com\\.parallels\\.desktop$", + "^com\\.parallels\\.vm$", + "^com\\.parallels\\.desktop\\.console$", + "^org\\.virtualbox\\.app\\.VirtualBoxVM$", + "^com\\.citrix\\.XenAppViewer$", + "^com\\.vmware\\.proxyApp\\.", + "^com\\.parallels\\.winapp\\.", + "^com\\.utmapp\\.UTM$", + "^org\\.x\\.X11$", + "^com\\.apple\\.x11$", + "^org\\.macosforge\\.xquartz\\.X11$", + "^org\\.macports\\.X11$", + "^com\\.sublimetext\\.", + "^com\\.microsoft\\.VSCode$", + "^com\\.jetbrains\\." + ] + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "c", + "modifiers": { + "mandatory": [ + "control" + ], + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "q", "modifiers": [ "command" ] @@ -33,6 +113,56 @@ "type": "variable_if", "name": "C-x", "value": 1 + }, + { + "type": "frontmost_application_unless", + "bundle_identifiers": [ + "^org\\.gnu\\.Emacs$", + "^org\\.gnu\\.AquamacsEmacs$", + "^org\\.gnu\\.Aquamacs$", + "^org\\.pqrs\\.unknownapp\\.conkeror$", + "^com\\.microsoft\\.rdc$", + "^com\\.microsoft\\.rdc\\.", + "^net\\.sf\\.cord$", + "^com\\.thinomenon\\.RemoteDesktopConnection$", + "^com\\.itap-mobile\\.qmote$", + "^com\\.nulana\\.remotixmac$", + "^com\\.p5sys\\.jump\\.mac\\.viewer$", + "^com\\.p5sys\\.jump\\.mac\\.viewer\\.", + "^com\\.teamviewer\\.TeamViewer$", + "^com\\.vmware\\.horizon$", + "^com\\.2X\\.Client\\.Mac$", + "^com\\.OpenText\\.Exceed-TurboX-Client$", + "^com\\.realvnc\\.vncviewer$", + "^com\\.citrix\\.receiver\\.icaviewer", + "^com\\.apple\\.Terminal$", + "^com\\.googlecode\\.iterm2$", + "^co\\.zeit\\.hyperterm$", + "^co\\.zeit\\.hyper$", + "^io\\.alacritty$", + "^org\\.alacritty$", + "^net\\.kovidgoyal\\.kitty$", + "^org\\.vim\\.", + "^com\\.qvacua\\.VimR$", + "^com\\.vmware\\.fusion$", + "^com\\.vmware\\.horizon$", + "^com\\.vmware\\.view$", + "^com\\.parallels\\.desktop$", + "^com\\.parallels\\.vm$", + "^com\\.parallels\\.desktop\\.console$", + "^org\\.virtualbox\\.app\\.VirtualBoxVM$", + "^com\\.citrix\\.XenAppViewer$", + "^com\\.vmware\\.proxyApp\\.", + "^com\\.parallels\\.winapp\\.", + "^com\\.utmapp\\.UTM$", + "^org\\.x\\.X11$", + "^com\\.apple\\.x11$", + "^org\\.macosforge\\.xquartz\\.X11$", + "^org\\.macports\\.X11$", + "^com\\.sublimetext\\.", + "^com\\.microsoft\\.VSCode$", + "^com\\.jetbrains\\." + ] } ] }, @@ -64,17 +194,61 @@ "name": "C-x", "value": 1 }, + { + "type": "frontmost_application_unless", + "bundle_identifiers": [ + "^org\\.gnu\\.Emacs$", + "^org\\.gnu\\.AquamacsEmacs$", + "^org\\.gnu\\.Aquamacs$", + "^org\\.pqrs\\.unknownapp\\.conkeror$", + "^com\\.microsoft\\.rdc$", + "^com\\.microsoft\\.rdc\\.", + "^net\\.sf\\.cord$", + "^com\\.thinomenon\\.RemoteDesktopConnection$", + "^com\\.itap-mobile\\.qmote$", + "^com\\.nulana\\.remotixmac$", + "^com\\.p5sys\\.jump\\.mac\\.viewer$", + "^com\\.p5sys\\.jump\\.mac\\.viewer\\.", + "^com\\.teamviewer\\.TeamViewer$", + "^com\\.vmware\\.horizon$", + "^com\\.2X\\.Client\\.Mac$", + "^com\\.OpenText\\.Exceed-TurboX-Client$", + "^com\\.realvnc\\.vncviewer$", + "^com\\.citrix\\.receiver\\.icaviewer", + "^com\\.apple\\.Terminal$", + "^com\\.googlecode\\.iterm2$", + "^co\\.zeit\\.hyperterm$", + "^co\\.zeit\\.hyper$", + "^io\\.alacritty$", + "^org\\.alacritty$", + "^net\\.kovidgoyal\\.kitty$", + "^org\\.vim\\.", + "^com\\.qvacua\\.VimR$", + "^com\\.vmware\\.fusion$", + "^com\\.vmware\\.horizon$", + "^com\\.vmware\\.view$", + "^com\\.parallels\\.desktop$", + "^com\\.parallels\\.vm$", + "^com\\.parallels\\.desktop\\.console$", + "^org\\.virtualbox\\.app\\.VirtualBoxVM$", + "^com\\.citrix\\.XenAppViewer$", + "^com\\.vmware\\.proxyApp\\.", + "^com\\.parallels\\.winapp\\.", + "^com\\.utmapp\\.UTM$", + "^org\\.x\\.X11$", + "^com\\.apple\\.x11$", + "^org\\.macosforge\\.xquartz\\.X11$", + "^org\\.macports\\.X11$", + "^com\\.sublimetext\\.", + "^com\\.microsoft\\.VSCode$", + "^com\\.jetbrains\\." + ] + }, { "type": "frontmost_application_if", "bundle_identifiers": [ - "^org\\.mozilla\\.firefox$", - "^org\\.mozilla\\.firefoxdeveloperedition$", - "^org\\.mozilla\\.nightly$", - "^com\\.microsoft\\.Edge", - "^com\\.microsoft\\.edgemac", "^com\\.google\\.Chrome$", - "^com\\.brave\\.Browser$", - "^com\\.apple\\.Safari$" + "^com\\.brave\\.Browser$" ] } ] @@ -82,7 +256,7 @@ { "type": "basic", "from": { - "key_code": "c", + "key_code": "d", "modifiers": { "mandatory": [ "control" @@ -94,9 +268,10 @@ }, "to": [ { - "key_code": "q", + "key_code": "i", "modifiers": [ - "command" + "command", + "option" ] } ], @@ -105,6 +280,63 @@ "type": "variable_if", "name": "C-x", "value": 1 + }, + { + "type": "frontmost_application_unless", + "bundle_identifiers": [ + "^org\\.gnu\\.Emacs$", + "^org\\.gnu\\.AquamacsEmacs$", + "^org\\.gnu\\.Aquamacs$", + "^org\\.pqrs\\.unknownapp\\.conkeror$", + "^com\\.microsoft\\.rdc$", + "^com\\.microsoft\\.rdc\\.", + "^net\\.sf\\.cord$", + "^com\\.thinomenon\\.RemoteDesktopConnection$", + "^com\\.itap-mobile\\.qmote$", + "^com\\.nulana\\.remotixmac$", + "^com\\.p5sys\\.jump\\.mac\\.viewer$", + "^com\\.p5sys\\.jump\\.mac\\.viewer\\.", + "^com\\.teamviewer\\.TeamViewer$", + "^com\\.vmware\\.horizon$", + "^com\\.2X\\.Client\\.Mac$", + "^com\\.OpenText\\.Exceed-TurboX-Client$", + "^com\\.realvnc\\.vncviewer$", + "^com\\.citrix\\.receiver\\.icaviewer", + "^com\\.apple\\.Terminal$", + "^com\\.googlecode\\.iterm2$", + "^co\\.zeit\\.hyperterm$", + "^co\\.zeit\\.hyper$", + "^io\\.alacritty$", + "^org\\.alacritty$", + "^net\\.kovidgoyal\\.kitty$", + "^org\\.vim\\.", + "^com\\.qvacua\\.VimR$", + "^com\\.vmware\\.fusion$", + "^com\\.vmware\\.horizon$", + "^com\\.vmware\\.view$", + "^com\\.parallels\\.desktop$", + "^com\\.parallels\\.vm$", + "^com\\.parallels\\.desktop\\.console$", + "^org\\.virtualbox\\.app\\.VirtualBoxVM$", + "^com\\.citrix\\.XenAppViewer$", + "^com\\.vmware\\.proxyApp\\.", + "^com\\.parallels\\.winapp\\.", + "^com\\.utmapp\\.UTM$", + "^org\\.x\\.X11$", + "^com\\.apple\\.x11$", + "^org\\.macosforge\\.xquartz\\.X11$", + "^org\\.macports\\.X11$", + "^com\\.sublimetext\\.", + "^com\\.microsoft\\.VSCode$", + "^com\\.jetbrains\\." + ] + }, + { + "type": "frontmost_application_if", + "bundle_identifiers": [ + "^org\\.mozilla\\.firefox$", + "^com\\.apple\\.Safari$" + ] } ] }, @@ -195,7 +427,7 @@ { "type": "basic", "from": { - "key_code": "h", + "key_code": "n", "modifiers": { "mandatory": [ "control" @@ -207,7 +439,7 @@ }, "to": [ { - "key_code": "a", + "key_code": "n", "modifiers": [ "command" ] @@ -218,13 +450,76 @@ "type": "variable_if", "name": "C-x", "value": 1 + }, + { + "type": "frontmost_application_unless", + "bundle_identifiers": [ + "^org\\.mozilla\\.firefox$", + "^org\\.mozilla\\.firefoxdeveloperedition$", + "^org\\.mozilla\\.nightly$", + "^com\\.microsoft\\.Edge", + "^com\\.microsoft\\.edgemac", + "^com\\.google\\.Chrome$", + "^com\\.brave\\.Browser$", + "^com\\.apple\\.Safari$" + ] + }, + { + "type": "frontmost_application_unless", + "bundle_identifiers": [ + "^org\\.gnu\\.Emacs$", + "^org\\.gnu\\.AquamacsEmacs$", + "^org\\.gnu\\.Aquamacs$", + "^org\\.pqrs\\.unknownapp\\.conkeror$", + "^com\\.microsoft\\.rdc$", + "^com\\.microsoft\\.rdc\\.", + "^net\\.sf\\.cord$", + "^com\\.thinomenon\\.RemoteDesktopConnection$", + "^com\\.itap-mobile\\.qmote$", + "^com\\.nulana\\.remotixmac$", + "^com\\.p5sys\\.jump\\.mac\\.viewer$", + "^com\\.p5sys\\.jump\\.mac\\.viewer\\.", + "^com\\.teamviewer\\.TeamViewer$", + "^com\\.vmware\\.horizon$", + "^com\\.2X\\.Client\\.Mac$", + "^com\\.OpenText\\.Exceed-TurboX-Client$", + "^com\\.realvnc\\.vncviewer$", + "^com\\.citrix\\.receiver\\.icaviewer", + "^com\\.apple\\.Terminal$", + "^com\\.googlecode\\.iterm2$", + "^co\\.zeit\\.hyperterm$", + "^co\\.zeit\\.hyper$", + "^io\\.alacritty$", + "^org\\.alacritty$", + "^net\\.kovidgoyal\\.kitty$", + "^org\\.vim\\.", + "^com\\.qvacua\\.VimR$", + "^com\\.vmware\\.fusion$", + "^com\\.vmware\\.horizon$", + "^com\\.vmware\\.view$", + "^com\\.parallels\\.desktop$", + "^com\\.parallels\\.vm$", + "^com\\.parallels\\.desktop\\.console$", + "^org\\.virtualbox\\.app\\.VirtualBoxVM$", + "^com\\.citrix\\.XenAppViewer$", + "^com\\.vmware\\.proxyApp\\.", + "^com\\.parallels\\.winapp\\.", + "^com\\.utmapp\\.UTM$", + "^org\\.x\\.X11$", + "^com\\.apple\\.x11$", + "^org\\.macosforge\\.xquartz\\.X11$", + "^org\\.macports\\.X11$", + "^com\\.sublimetext\\.", + "^com\\.microsoft\\.VSCode$", + "^com\\.jetbrains\\." + ] } ] }, { "type": "basic", "from": { - "key_code": "k", + "key_code": "n", "modifiers": { "mandatory": [ "control" @@ -236,7 +531,7 @@ }, "to": [ { - "key_code": "w", + "key_code": "t", "modifiers": [ "command" ] @@ -247,13 +542,76 @@ "type": "variable_if", "name": "C-x", "value": 1 + }, + { + "type": "frontmost_application_if", + "bundle_identifiers": [ + "^org\\.mozilla\\.firefox$", + "^org\\.mozilla\\.firefoxdeveloperedition$", + "^org\\.mozilla\\.nightly$", + "^com\\.microsoft\\.Edge", + "^com\\.microsoft\\.edgemac", + "^com\\.google\\.Chrome$", + "^com\\.brave\\.Browser$", + "^com\\.apple\\.Safari$" + ] + }, + { + "type": "frontmost_application_unless", + "bundle_identifiers": [ + "^org\\.gnu\\.Emacs$", + "^org\\.gnu\\.AquamacsEmacs$", + "^org\\.gnu\\.Aquamacs$", + "^org\\.pqrs\\.unknownapp\\.conkeror$", + "^com\\.microsoft\\.rdc$", + "^com\\.microsoft\\.rdc\\.", + "^net\\.sf\\.cord$", + "^com\\.thinomenon\\.RemoteDesktopConnection$", + "^com\\.itap-mobile\\.qmote$", + "^com\\.nulana\\.remotixmac$", + "^com\\.p5sys\\.jump\\.mac\\.viewer$", + "^com\\.p5sys\\.jump\\.mac\\.viewer\\.", + "^com\\.teamviewer\\.TeamViewer$", + "^com\\.vmware\\.horizon$", + "^com\\.2X\\.Client\\.Mac$", + "^com\\.OpenText\\.Exceed-TurboX-Client$", + "^com\\.realvnc\\.vncviewer$", + "^com\\.citrix\\.receiver\\.icaviewer", + "^com\\.apple\\.Terminal$", + "^com\\.googlecode\\.iterm2$", + "^co\\.zeit\\.hyperterm$", + "^co\\.zeit\\.hyper$", + "^io\\.alacritty$", + "^org\\.alacritty$", + "^net\\.kovidgoyal\\.kitty$", + "^org\\.vim\\.", + "^com\\.qvacua\\.VimR$", + "^com\\.vmware\\.fusion$", + "^com\\.vmware\\.horizon$", + "^com\\.vmware\\.view$", + "^com\\.parallels\\.desktop$", + "^com\\.parallels\\.vm$", + "^com\\.parallels\\.desktop\\.console$", + "^org\\.virtualbox\\.app\\.VirtualBoxVM$", + "^com\\.citrix\\.XenAppViewer$", + "^com\\.vmware\\.proxyApp\\.", + "^com\\.parallels\\.winapp\\.", + "^com\\.utmapp\\.UTM$", + "^org\\.x\\.X11$", + "^com\\.apple\\.x11$", + "^org\\.macosforge\\.xquartz\\.X11$", + "^org\\.macports\\.X11$", + "^com\\.sublimetext\\.", + "^com\\.microsoft\\.VSCode$", + "^com\\.jetbrains\\." + ] } ] }, { "type": "basic", "from": { - "key_code": "r", + "key_code": "h", "modifiers": { "mandatory": [ "control" @@ -265,7 +623,7 @@ }, "to": [ { - "key_code": "r", + "key_code": "a", "modifiers": [ "command" ] @@ -278,16 +636,53 @@ "value": 1 }, { - "type": "frontmost_application_if", + "type": "frontmost_application_unless", "bundle_identifiers": [ - "^org\\.mozilla\\.firefox$", - "^org\\.mozilla\\.firefoxdeveloperedition$", - "^org\\.mozilla\\.nightly$", - "^com\\.microsoft\\.Edge", - "^com\\.microsoft\\.edgemac", - "^com\\.google\\.Chrome$", - "^com\\.brave\\.Browser$", - "^com\\.apple\\.Safari$" + "^org\\.gnu\\.Emacs$", + "^org\\.gnu\\.AquamacsEmacs$", + "^org\\.gnu\\.Aquamacs$", + "^org\\.pqrs\\.unknownapp\\.conkeror$", + "^com\\.microsoft\\.rdc$", + "^com\\.microsoft\\.rdc\\.", + "^net\\.sf\\.cord$", + "^com\\.thinomenon\\.RemoteDesktopConnection$", + "^com\\.itap-mobile\\.qmote$", + "^com\\.nulana\\.remotixmac$", + "^com\\.p5sys\\.jump\\.mac\\.viewer$", + "^com\\.p5sys\\.jump\\.mac\\.viewer\\.", + "^com\\.teamviewer\\.TeamViewer$", + "^com\\.vmware\\.horizon$", + "^com\\.2X\\.Client\\.Mac$", + "^com\\.OpenText\\.Exceed-TurboX-Client$", + "^com\\.realvnc\\.vncviewer$", + "^com\\.citrix\\.receiver\\.icaviewer", + "^com\\.apple\\.Terminal$", + "^com\\.googlecode\\.iterm2$", + "^co\\.zeit\\.hyperterm$", + "^co\\.zeit\\.hyper$", + "^io\\.alacritty$", + "^org\\.alacritty$", + "^net\\.kovidgoyal\\.kitty$", + "^org\\.vim\\.", + "^com\\.qvacua\\.VimR$", + "^com\\.vmware\\.fusion$", + "^com\\.vmware\\.horizon$", + "^com\\.vmware\\.view$", + "^com\\.parallels\\.desktop$", + "^com\\.parallels\\.vm$", + "^com\\.parallels\\.desktop\\.console$", + "^org\\.virtualbox\\.app\\.VirtualBoxVM$", + "^com\\.citrix\\.XenAppViewer$", + "^com\\.vmware\\.proxyApp\\.", + "^com\\.parallels\\.winapp\\.", + "^com\\.utmapp\\.UTM$", + "^org\\.x\\.X11$", + "^com\\.apple\\.x11$", + "^org\\.macosforge\\.xquartz\\.X11$", + "^org\\.macports\\.X11$", + "^com\\.sublimetext\\.", + "^com\\.microsoft\\.VSCode$", + "^com\\.jetbrains\\." ] } ] @@ -295,7 +690,7 @@ { "type": "basic", "from": { - "key_code": "s", + "key_code": "k", "modifiers": { "mandatory": [ "control" @@ -307,7 +702,7 @@ }, "to": [ { - "key_code": "s", + "key_code": "w", "modifiers": [ "command" ] @@ -318,13 +713,63 @@ "type": "variable_if", "name": "C-x", "value": 1 + }, + { + "type": "frontmost_application_unless", + "bundle_identifiers": [ + "^org\\.gnu\\.Emacs$", + "^org\\.gnu\\.AquamacsEmacs$", + "^org\\.gnu\\.Aquamacs$", + "^org\\.pqrs\\.unknownapp\\.conkeror$", + "^com\\.microsoft\\.rdc$", + "^com\\.microsoft\\.rdc\\.", + "^net\\.sf\\.cord$", + "^com\\.thinomenon\\.RemoteDesktopConnection$", + "^com\\.itap-mobile\\.qmote$", + "^com\\.nulana\\.remotixmac$", + "^com\\.p5sys\\.jump\\.mac\\.viewer$", + "^com\\.p5sys\\.jump\\.mac\\.viewer\\.", + "^com\\.teamviewer\\.TeamViewer$", + "^com\\.vmware\\.horizon$", + "^com\\.2X\\.Client\\.Mac$", + "^com\\.OpenText\\.Exceed-TurboX-Client$", + "^com\\.realvnc\\.vncviewer$", + "^com\\.citrix\\.receiver\\.icaviewer", + "^com\\.apple\\.Terminal$", + "^com\\.googlecode\\.iterm2$", + "^co\\.zeit\\.hyperterm$", + "^co\\.zeit\\.hyper$", + "^io\\.alacritty$", + "^org\\.alacritty$", + "^net\\.kovidgoyal\\.kitty$", + "^org\\.vim\\.", + "^com\\.qvacua\\.VimR$", + "^com\\.vmware\\.fusion$", + "^com\\.vmware\\.horizon$", + "^com\\.vmware\\.view$", + "^com\\.parallels\\.desktop$", + "^com\\.parallels\\.vm$", + "^com\\.parallels\\.desktop\\.console$", + "^org\\.virtualbox\\.app\\.VirtualBoxVM$", + "^com\\.citrix\\.XenAppViewer$", + "^com\\.vmware\\.proxyApp\\.", + "^com\\.parallels\\.winapp\\.", + "^com\\.utmapp\\.UTM$", + "^org\\.x\\.X11$", + "^com\\.apple\\.x11$", + "^org\\.macosforge\\.xquartz\\.X11$", + "^org\\.macports\\.X11$", + "^com\\.sublimetext\\.", + "^com\\.microsoft\\.VSCode$", + "^com\\.jetbrains\\." + ] } ] }, { "type": "basic", "from": { - "key_code": "u", + "key_code": "o", "modifiers": { "mandatory": [ "control" @@ -336,17 +781,1084 @@ }, "to": [ { - "key_code": "z", + "key_code": "grave_accent_and_tilde", "modifiers": [ "command" ] - } - ], - "conditions": [ + } + ], + "conditions": [ + { + "type": "variable_if", + "name": "C-x", + "value": 1 + }, + { + "type": "frontmost_application_unless", + "bundle_identifiers": [ + "^org\\.gnu\\.Emacs$", + "^org\\.gnu\\.AquamacsEmacs$", + "^org\\.gnu\\.Aquamacs$", + "^org\\.pqrs\\.unknownapp\\.conkeror$", + "^com\\.microsoft\\.rdc$", + "^com\\.microsoft\\.rdc\\.", + "^net\\.sf\\.cord$", + "^com\\.thinomenon\\.RemoteDesktopConnection$", + "^com\\.itap-mobile\\.qmote$", + "^com\\.nulana\\.remotixmac$", + "^com\\.p5sys\\.jump\\.mac\\.viewer$", + "^com\\.p5sys\\.jump\\.mac\\.viewer\\.", + "^com\\.teamviewer\\.TeamViewer$", + "^com\\.vmware\\.horizon$", + "^com\\.2X\\.Client\\.Mac$", + "^com\\.OpenText\\.Exceed-TurboX-Client$", + "^com\\.realvnc\\.vncviewer$", + "^com\\.citrix\\.receiver\\.icaviewer", + "^com\\.apple\\.Terminal$", + "^com\\.googlecode\\.iterm2$", + "^co\\.zeit\\.hyperterm$", + "^co\\.zeit\\.hyper$", + "^io\\.alacritty$", + "^org\\.alacritty$", + "^net\\.kovidgoyal\\.kitty$", + "^org\\.vim\\.", + "^com\\.qvacua\\.VimR$", + "^com\\.vmware\\.fusion$", + "^com\\.vmware\\.horizon$", + "^com\\.vmware\\.view$", + "^com\\.parallels\\.desktop$", + "^com\\.parallels\\.vm$", + "^com\\.parallels\\.desktop\\.console$", + "^org\\.virtualbox\\.app\\.VirtualBoxVM$", + "^com\\.citrix\\.XenAppViewer$", + "^com\\.vmware\\.proxyApp\\.", + "^com\\.parallels\\.winapp\\.", + "^com\\.utmapp\\.UTM$", + "^org\\.x\\.X11$", + "^com\\.apple\\.x11$", + "^org\\.macosforge\\.xquartz\\.X11$", + "^org\\.macports\\.X11$", + "^com\\.sublimetext\\.", + "^com\\.microsoft\\.VSCode$", + "^com\\.jetbrains\\." + ] + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "p", + "modifiers": { + "mandatory": [ + "control" + ], + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "f", + "modifiers": [ + "option", + "command" + ] + } + ], + "conditions": [ + { + "type": "variable_if", + "name": "C-x", + "value": 1 + }, + { + "type": "frontmost_application_unless", + "bundle_identifiers": [ + "^org\\.gnu\\.Emacs$", + "^org\\.gnu\\.AquamacsEmacs$", + "^org\\.gnu\\.Aquamacs$", + "^org\\.pqrs\\.unknownapp\\.conkeror$", + "^com\\.microsoft\\.rdc$", + "^com\\.microsoft\\.rdc\\.", + "^net\\.sf\\.cord$", + "^com\\.thinomenon\\.RemoteDesktopConnection$", + "^com\\.itap-mobile\\.qmote$", + "^com\\.nulana\\.remotixmac$", + "^com\\.p5sys\\.jump\\.mac\\.viewer$", + "^com\\.p5sys\\.jump\\.mac\\.viewer\\.", + "^com\\.teamviewer\\.TeamViewer$", + "^com\\.vmware\\.horizon$", + "^com\\.2X\\.Client\\.Mac$", + "^com\\.OpenText\\.Exceed-TurboX-Client$", + "^com\\.realvnc\\.vncviewer$", + "^com\\.citrix\\.receiver\\.icaviewer", + "^com\\.apple\\.Terminal$", + "^com\\.googlecode\\.iterm2$", + "^co\\.zeit\\.hyperterm$", + "^co\\.zeit\\.hyper$", + "^io\\.alacritty$", + "^org\\.alacritty$", + "^net\\.kovidgoyal\\.kitty$", + "^org\\.vim\\.", + "^com\\.qvacua\\.VimR$", + "^com\\.vmware\\.fusion$", + "^com\\.vmware\\.horizon$", + "^com\\.vmware\\.view$", + "^com\\.parallels\\.desktop$", + "^com\\.parallels\\.vm$", + "^com\\.parallels\\.desktop\\.console$", + "^org\\.virtualbox\\.app\\.VirtualBoxVM$", + "^com\\.citrix\\.XenAppViewer$", + "^com\\.vmware\\.proxyApp\\.", + "^com\\.parallels\\.winapp\\.", + "^com\\.utmapp\\.UTM$", + "^org\\.x\\.X11$", + "^com\\.apple\\.x11$", + "^org\\.macosforge\\.xquartz\\.X11$", + "^org\\.macports\\.X11$", + "^com\\.sublimetext\\.", + "^com\\.microsoft\\.VSCode$", + "^com\\.jetbrains\\." + ] + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "q", + "modifiers": { + "mandatory": [ + "control" + ], + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "q", + "modifiers": [ + "command" + ] + } + ], + "conditions": [ + { + "type": "variable_if", + "name": "C-x", + "value": 1 + }, + { + "type": "frontmost_application_unless", + "bundle_identifiers": [ + "^org\\.gnu\\.Emacs$", + "^org\\.gnu\\.AquamacsEmacs$", + "^org\\.gnu\\.Aquamacs$", + "^org\\.pqrs\\.unknownapp\\.conkeror$", + "^com\\.microsoft\\.rdc$", + "^com\\.microsoft\\.rdc\\.", + "^net\\.sf\\.cord$", + "^com\\.thinomenon\\.RemoteDesktopConnection$", + "^com\\.itap-mobile\\.qmote$", + "^com\\.nulana\\.remotixmac$", + "^com\\.p5sys\\.jump\\.mac\\.viewer$", + "^com\\.p5sys\\.jump\\.mac\\.viewer\\.", + "^com\\.teamviewer\\.TeamViewer$", + "^com\\.vmware\\.horizon$", + "^com\\.2X\\.Client\\.Mac$", + "^com\\.OpenText\\.Exceed-TurboX-Client$", + "^com\\.realvnc\\.vncviewer$", + "^com\\.citrix\\.receiver\\.icaviewer", + "^com\\.apple\\.Terminal$", + "^com\\.googlecode\\.iterm2$", + "^co\\.zeit\\.hyperterm$", + "^co\\.zeit\\.hyper$", + "^io\\.alacritty$", + "^org\\.alacritty$", + "^net\\.kovidgoyal\\.kitty$", + "^org\\.vim\\.", + "^com\\.qvacua\\.VimR$", + "^com\\.vmware\\.fusion$", + "^com\\.vmware\\.horizon$", + "^com\\.vmware\\.view$", + "^com\\.parallels\\.desktop$", + "^com\\.parallels\\.vm$", + "^com\\.parallels\\.desktop\\.console$", + "^org\\.virtualbox\\.app\\.VirtualBoxVM$", + "^com\\.citrix\\.XenAppViewer$", + "^com\\.vmware\\.proxyApp\\.", + "^com\\.parallels\\.winapp\\.", + "^com\\.utmapp\\.UTM$", + "^org\\.x\\.X11$", + "^com\\.apple\\.x11$", + "^org\\.macosforge\\.xquartz\\.X11$", + "^org\\.macports\\.X11$", + "^com\\.sublimetext\\.", + "^com\\.microsoft\\.VSCode$", + "^com\\.jetbrains\\." + ] + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "r", + "modifiers": { + "mandatory": [ + "control" + ], + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "r", + "modifiers": [ + "command" + ] + } + ], + "conditions": [ + { + "type": "variable_if", + "name": "C-x", + "value": 1 + }, + { + "type": "frontmost_application_if", + "bundle_identifiers": [ + "^org\\.mozilla\\.firefox$", + "^org\\.mozilla\\.firefoxdeveloperedition$", + "^org\\.mozilla\\.nightly$", + "^com\\.microsoft\\.Edge", + "^com\\.microsoft\\.edgemac", + "^com\\.google\\.Chrome$", + "^com\\.brave\\.Browser$", + "^com\\.apple\\.Safari$" + ] + }, + { + "type": "frontmost_application_unless", + "bundle_identifiers": [ + "^org\\.gnu\\.Emacs$", + "^org\\.gnu\\.AquamacsEmacs$", + "^org\\.gnu\\.Aquamacs$", + "^org\\.pqrs\\.unknownapp\\.conkeror$", + "^com\\.microsoft\\.rdc$", + "^com\\.microsoft\\.rdc\\.", + "^net\\.sf\\.cord$", + "^com\\.thinomenon\\.RemoteDesktopConnection$", + "^com\\.itap-mobile\\.qmote$", + "^com\\.nulana\\.remotixmac$", + "^com\\.p5sys\\.jump\\.mac\\.viewer$", + "^com\\.p5sys\\.jump\\.mac\\.viewer\\.", + "^com\\.teamviewer\\.TeamViewer$", + "^com\\.vmware\\.horizon$", + "^com\\.2X\\.Client\\.Mac$", + "^com\\.OpenText\\.Exceed-TurboX-Client$", + "^com\\.realvnc\\.vncviewer$", + "^com\\.citrix\\.receiver\\.icaviewer", + "^com\\.apple\\.Terminal$", + "^com\\.googlecode\\.iterm2$", + "^co\\.zeit\\.hyperterm$", + "^co\\.zeit\\.hyper$", + "^io\\.alacritty$", + "^org\\.alacritty$", + "^net\\.kovidgoyal\\.kitty$", + "^org\\.vim\\.", + "^com\\.qvacua\\.VimR$", + "^com\\.vmware\\.fusion$", + "^com\\.vmware\\.horizon$", + "^com\\.vmware\\.view$", + "^com\\.parallels\\.desktop$", + "^com\\.parallels\\.vm$", + "^com\\.parallels\\.desktop\\.console$", + "^org\\.virtualbox\\.app\\.VirtualBoxVM$", + "^com\\.citrix\\.XenAppViewer$", + "^com\\.vmware\\.proxyApp\\.", + "^com\\.parallels\\.winapp\\.", + "^com\\.utmapp\\.UTM$", + "^org\\.x\\.X11$", + "^com\\.apple\\.x11$", + "^org\\.macosforge\\.xquartz\\.X11$", + "^org\\.macports\\.X11$", + "^com\\.sublimetext\\.", + "^com\\.microsoft\\.VSCode$", + "^com\\.jetbrains\\." + ] + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "s", + "modifiers": { + "mandatory": [ + "control" + ], + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "s", + "modifiers": [ + "command" + ] + } + ], + "conditions": [ + { + "type": "variable_if", + "name": "C-x", + "value": 1 + }, + { + "type": "frontmost_application_unless", + "bundle_identifiers": [ + "^org\\.gnu\\.Emacs$", + "^org\\.gnu\\.AquamacsEmacs$", + "^org\\.gnu\\.Aquamacs$", + "^org\\.pqrs\\.unknownapp\\.conkeror$", + "^com\\.microsoft\\.rdc$", + "^com\\.microsoft\\.rdc\\.", + "^net\\.sf\\.cord$", + "^com\\.thinomenon\\.RemoteDesktopConnection$", + "^com\\.itap-mobile\\.qmote$", + "^com\\.nulana\\.remotixmac$", + "^com\\.p5sys\\.jump\\.mac\\.viewer$", + "^com\\.p5sys\\.jump\\.mac\\.viewer\\.", + "^com\\.teamviewer\\.TeamViewer$", + "^com\\.vmware\\.horizon$", + "^com\\.2X\\.Client\\.Mac$", + "^com\\.OpenText\\.Exceed-TurboX-Client$", + "^com\\.realvnc\\.vncviewer$", + "^com\\.citrix\\.receiver\\.icaviewer", + "^com\\.apple\\.Terminal$", + "^com\\.googlecode\\.iterm2$", + "^co\\.zeit\\.hyperterm$", + "^co\\.zeit\\.hyper$", + "^io\\.alacritty$", + "^org\\.alacritty$", + "^net\\.kovidgoyal\\.kitty$", + "^org\\.vim\\.", + "^com\\.qvacua\\.VimR$", + "^com\\.vmware\\.fusion$", + "^com\\.vmware\\.horizon$", + "^com\\.vmware\\.view$", + "^com\\.parallels\\.desktop$", + "^com\\.parallels\\.vm$", + "^com\\.parallels\\.desktop\\.console$", + "^org\\.virtualbox\\.app\\.VirtualBoxVM$", + "^com\\.citrix\\.XenAppViewer$", + "^com\\.vmware\\.proxyApp\\.", + "^com\\.parallels\\.winapp\\.", + "^com\\.utmapp\\.UTM$", + "^org\\.x\\.X11$", + "^com\\.apple\\.x11$", + "^org\\.macosforge\\.xquartz\\.X11$", + "^org\\.macports\\.X11$", + "^com\\.sublimetext\\.", + "^com\\.microsoft\\.VSCode$", + "^com\\.jetbrains\\." + ] + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "u", + "modifiers": { + "mandatory": [ + "control" + ], + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "z", + "modifiers": [ + "command" + ] + } + ], + "conditions": [ + { + "type": "variable_if", + "name": "C-x", + "value": 1 + }, + { + "type": "frontmost_application_unless", + "bundle_identifiers": [ + "^org\\.gnu\\.Emacs$", + "^org\\.gnu\\.AquamacsEmacs$", + "^org\\.gnu\\.Aquamacs$", + "^org\\.pqrs\\.unknownapp\\.conkeror$", + "^com\\.microsoft\\.rdc$", + "^com\\.microsoft\\.rdc\\.", + "^net\\.sf\\.cord$", + "^com\\.thinomenon\\.RemoteDesktopConnection$", + "^com\\.itap-mobile\\.qmote$", + "^com\\.nulana\\.remotixmac$", + "^com\\.p5sys\\.jump\\.mac\\.viewer$", + "^com\\.p5sys\\.jump\\.mac\\.viewer\\.", + "^com\\.teamviewer\\.TeamViewer$", + "^com\\.vmware\\.horizon$", + "^com\\.2X\\.Client\\.Mac$", + "^com\\.OpenText\\.Exceed-TurboX-Client$", + "^com\\.realvnc\\.vncviewer$", + "^com\\.citrix\\.receiver\\.icaviewer", + "^com\\.apple\\.Terminal$", + "^com\\.googlecode\\.iterm2$", + "^co\\.zeit\\.hyperterm$", + "^co\\.zeit\\.hyper$", + "^io\\.alacritty$", + "^org\\.alacritty$", + "^net\\.kovidgoyal\\.kitty$", + "^org\\.vim\\.", + "^com\\.qvacua\\.VimR$", + "^com\\.vmware\\.fusion$", + "^com\\.vmware\\.horizon$", + "^com\\.vmware\\.view$", + "^com\\.parallels\\.desktop$", + "^com\\.parallels\\.vm$", + "^com\\.parallels\\.desktop\\.console$", + "^org\\.virtualbox\\.app\\.VirtualBoxVM$", + "^com\\.citrix\\.XenAppViewer$", + "^com\\.vmware\\.proxyApp\\.", + "^com\\.parallels\\.winapp\\.", + "^com\\.utmapp\\.UTM$", + "^org\\.x\\.X11$", + "^com\\.apple\\.x11$", + "^org\\.macosforge\\.xquartz\\.X11$", + "^org\\.macports\\.X11$", + "^com\\.sublimetext\\.", + "^com\\.microsoft\\.VSCode$", + "^com\\.jetbrains\\." + ] + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "w", + "modifiers": { + "mandatory": [ + "control" + ], + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "s", + "modifiers": [ + "command" + ] + } + ], + "conditions": [ + { + "type": "variable_if", + "name": "C-x", + "value": 1 + }, + { + "type": "frontmost_application_unless", + "bundle_identifiers": [ + "^org\\.gnu\\.Emacs$", + "^org\\.gnu\\.AquamacsEmacs$", + "^org\\.gnu\\.Aquamacs$", + "^org\\.pqrs\\.unknownapp\\.conkeror$", + "^com\\.microsoft\\.rdc$", + "^com\\.microsoft\\.rdc\\.", + "^net\\.sf\\.cord$", + "^com\\.thinomenon\\.RemoteDesktopConnection$", + "^com\\.itap-mobile\\.qmote$", + "^com\\.nulana\\.remotixmac$", + "^com\\.p5sys\\.jump\\.mac\\.viewer$", + "^com\\.p5sys\\.jump\\.mac\\.viewer\\.", + "^com\\.teamviewer\\.TeamViewer$", + "^com\\.vmware\\.horizon$", + "^com\\.2X\\.Client\\.Mac$", + "^com\\.OpenText\\.Exceed-TurboX-Client$", + "^com\\.realvnc\\.vncviewer$", + "^com\\.citrix\\.receiver\\.icaviewer", + "^com\\.apple\\.Terminal$", + "^com\\.googlecode\\.iterm2$", + "^co\\.zeit\\.hyperterm$", + "^co\\.zeit\\.hyper$", + "^io\\.alacritty$", + "^org\\.alacritty$", + "^net\\.kovidgoyal\\.kitty$", + "^org\\.vim\\.", + "^com\\.qvacua\\.VimR$", + "^com\\.vmware\\.fusion$", + "^com\\.vmware\\.horizon$", + "^com\\.vmware\\.view$", + "^com\\.parallels\\.desktop$", + "^com\\.parallels\\.vm$", + "^com\\.parallels\\.desktop\\.console$", + "^org\\.virtualbox\\.app\\.VirtualBoxVM$", + "^com\\.citrix\\.XenAppViewer$", + "^com\\.vmware\\.proxyApp\\.", + "^com\\.parallels\\.winapp\\.", + "^com\\.utmapp\\.UTM$", + "^org\\.x\\.X11$", + "^com\\.apple\\.x11$", + "^org\\.macosforge\\.xquartz\\.X11$", + "^org\\.macports\\.X11$", + "^com\\.sublimetext\\.", + "^com\\.microsoft\\.VSCode$", + "^com\\.jetbrains\\." + ] + }, + { + "type": "frontmost_application_unless", + "bundle_identifiers": [ + "^org\\.mozilla\\.firefox$", + "^org\\.mozilla\\.firefoxdeveloperedition$", + "^org\\.mozilla\\.nightly$", + "^com\\.microsoft\\.Edge", + "^com\\.microsoft\\.edgemac", + "^com\\.google\\.Chrome$", + "^com\\.brave\\.Browser$", + "^com\\.apple\\.Safari$" + ] + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "1", + "modifiers": { + "mandatory": [ + "control" + ], + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "w", + "modifiers": [ + "command", + "shift" + ] + } + ], + "conditions": [ + { + "type": "variable_if", + "name": "C-x", + "value": 1 + }, + { + "type": "frontmost_application_unless", + "bundle_identifiers": [ + "^org\\.gnu\\.Emacs$", + "^org\\.gnu\\.AquamacsEmacs$", + "^org\\.gnu\\.Aquamacs$", + "^org\\.pqrs\\.unknownapp\\.conkeror$", + "^com\\.microsoft\\.rdc$", + "^com\\.microsoft\\.rdc\\.", + "^net\\.sf\\.cord$", + "^com\\.thinomenon\\.RemoteDesktopConnection$", + "^com\\.itap-mobile\\.qmote$", + "^com\\.nulana\\.remotixmac$", + "^com\\.p5sys\\.jump\\.mac\\.viewer$", + "^com\\.p5sys\\.jump\\.mac\\.viewer\\.", + "^com\\.teamviewer\\.TeamViewer$", + "^com\\.vmware\\.horizon$", + "^com\\.2X\\.Client\\.Mac$", + "^com\\.OpenText\\.Exceed-TurboX-Client$", + "^com\\.realvnc\\.vncviewer$", + "^com\\.citrix\\.receiver\\.icaviewer", + "^com\\.apple\\.Terminal$", + "^com\\.googlecode\\.iterm2$", + "^co\\.zeit\\.hyperterm$", + "^co\\.zeit\\.hyper$", + "^io\\.alacritty$", + "^org\\.alacritty$", + "^net\\.kovidgoyal\\.kitty$", + "^org\\.vim\\.", + "^com\\.qvacua\\.VimR$", + "^com\\.vmware\\.fusion$", + "^com\\.vmware\\.horizon$", + "^com\\.vmware\\.view$", + "^com\\.parallels\\.desktop$", + "^com\\.parallels\\.vm$", + "^com\\.parallels\\.desktop\\.console$", + "^org\\.virtualbox\\.app\\.VirtualBoxVM$", + "^com\\.citrix\\.XenAppViewer$", + "^com\\.vmware\\.proxyApp\\.", + "^com\\.parallels\\.winapp\\.", + "^com\\.utmapp\\.UTM$", + "^org\\.x\\.X11$", + "^com\\.apple\\.x11$", + "^org\\.macosforge\\.xquartz\\.X11$", + "^org\\.macports\\.X11$", + "^com\\.sublimetext\\.", + "^com\\.microsoft\\.VSCode$", + "^com\\.jetbrains\\." + ] + }, + { + "type": "frontmost_application_unless", + "bundle_identifiers": [ + "^org\\.mozilla\\.firefox$" + ] + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "1", + "modifiers": { + "mandatory": [ + "control" + ], + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "1", + "modifiers": [ + "option", + "shift" + ] + } + ], + "conditions": [ + { + "type": "variable_if", + "name": "C-x", + "value": 1 + }, + { + "type": "frontmost_application_unless", + "bundle_identifiers": [ + "^org\\.gnu\\.Emacs$", + "^org\\.gnu\\.AquamacsEmacs$", + "^org\\.gnu\\.Aquamacs$", + "^org\\.pqrs\\.unknownapp\\.conkeror$", + "^com\\.microsoft\\.rdc$", + "^com\\.microsoft\\.rdc\\.", + "^net\\.sf\\.cord$", + "^com\\.thinomenon\\.RemoteDesktopConnection$", + "^com\\.itap-mobile\\.qmote$", + "^com\\.nulana\\.remotixmac$", + "^com\\.p5sys\\.jump\\.mac\\.viewer$", + "^com\\.p5sys\\.jump\\.mac\\.viewer\\.", + "^com\\.teamviewer\\.TeamViewer$", + "^com\\.vmware\\.horizon$", + "^com\\.2X\\.Client\\.Mac$", + "^com\\.OpenText\\.Exceed-TurboX-Client$", + "^com\\.realvnc\\.vncviewer$", + "^com\\.citrix\\.receiver\\.icaviewer", + "^com\\.apple\\.Terminal$", + "^com\\.googlecode\\.iterm2$", + "^co\\.zeit\\.hyperterm$", + "^co\\.zeit\\.hyper$", + "^io\\.alacritty$", + "^org\\.alacritty$", + "^net\\.kovidgoyal\\.kitty$", + "^org\\.vim\\.", + "^com\\.qvacua\\.VimR$", + "^com\\.vmware\\.fusion$", + "^com\\.vmware\\.horizon$", + "^com\\.vmware\\.view$", + "^com\\.parallels\\.desktop$", + "^com\\.parallels\\.vm$", + "^com\\.parallels\\.desktop\\.console$", + "^org\\.virtualbox\\.app\\.VirtualBoxVM$", + "^com\\.citrix\\.XenAppViewer$", + "^com\\.vmware\\.proxyApp\\.", + "^com\\.parallels\\.winapp\\.", + "^com\\.utmapp\\.UTM$", + "^org\\.x\\.X11$", + "^com\\.apple\\.x11$", + "^org\\.macosforge\\.xquartz\\.X11$", + "^org\\.macports\\.X11$", + "^com\\.sublimetext\\.", + "^com\\.microsoft\\.VSCode$", + "^com\\.jetbrains\\." + ] + }, + { + "type": "frontmost_application_if", + "bundle_identifiers": [ + "^org\\.mozilla\\.firefox$" + ] + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "7", + "modifiers": { + "mandatory": [ + "control" + ], + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "7", + "modifiers": [ + "command", + "shift" + ] + } + ], + "conditions": [ + { + "type": "variable_if", + "name": "C-x", + "value": 1 + }, + { + "type": "frontmost_application_unless", + "bundle_identifiers": [ + "^org\\.gnu\\.Emacs$", + "^org\\.gnu\\.AquamacsEmacs$", + "^org\\.gnu\\.Aquamacs$", + "^org\\.pqrs\\.unknownapp\\.conkeror$", + "^com\\.microsoft\\.rdc$", + "^com\\.microsoft\\.rdc\\.", + "^net\\.sf\\.cord$", + "^com\\.thinomenon\\.RemoteDesktopConnection$", + "^com\\.itap-mobile\\.qmote$", + "^com\\.nulana\\.remotixmac$", + "^com\\.p5sys\\.jump\\.mac\\.viewer$", + "^com\\.p5sys\\.jump\\.mac\\.viewer\\.", + "^com\\.teamviewer\\.TeamViewer$", + "^com\\.vmware\\.horizon$", + "^com\\.2X\\.Client\\.Mac$", + "^com\\.OpenText\\.Exceed-TurboX-Client$", + "^com\\.realvnc\\.vncviewer$", + "^com\\.citrix\\.receiver\\.icaviewer", + "^com\\.apple\\.Terminal$", + "^com\\.googlecode\\.iterm2$", + "^co\\.zeit\\.hyperterm$", + "^co\\.zeit\\.hyper$", + "^io\\.alacritty$", + "^org\\.alacritty$", + "^net\\.kovidgoyal\\.kitty$", + "^org\\.vim\\.", + "^com\\.qvacua\\.VimR$", + "^com\\.vmware\\.fusion$", + "^com\\.vmware\\.horizon$", + "^com\\.vmware\\.view$", + "^com\\.parallels\\.desktop$", + "^com\\.parallels\\.vm$", + "^com\\.parallels\\.desktop\\.console$", + "^org\\.virtualbox\\.app\\.VirtualBoxVM$", + "^com\\.citrix\\.XenAppViewer$", + "^com\\.vmware\\.proxyApp\\.", + "^com\\.parallels\\.winapp\\.", + "^com\\.utmapp\\.UTM$", + "^org\\.x\\.X11$", + "^com\\.apple\\.x11$", + "^org\\.macosforge\\.xquartz\\.X11$", + "^org\\.macports\\.X11$", + "^com\\.sublimetext\\.", + "^com\\.microsoft\\.VSCode$", + "^com\\.jetbrains\\." + ] + }, + { + "type": "frontmost_application_unless", + "bundle_identifiers": [ + "^org\\.mozilla\\.firefox$" + ] + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "7", + "modifiers": { + "mandatory": [ + "control" + ], + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "7", + "modifiers": [ + "option", + "shift" + ] + } + ], + "conditions": [ + { + "type": "variable_if", + "name": "C-x", + "value": 1 + }, + { + "type": "frontmost_application_unless", + "bundle_identifiers": [ + "^org\\.gnu\\.Emacs$", + "^org\\.gnu\\.AquamacsEmacs$", + "^org\\.gnu\\.Aquamacs$", + "^org\\.pqrs\\.unknownapp\\.conkeror$", + "^com\\.microsoft\\.rdc$", + "^com\\.microsoft\\.rdc\\.", + "^net\\.sf\\.cord$", + "^com\\.thinomenon\\.RemoteDesktopConnection$", + "^com\\.itap-mobile\\.qmote$", + "^com\\.nulana\\.remotixmac$", + "^com\\.p5sys\\.jump\\.mac\\.viewer$", + "^com\\.p5sys\\.jump\\.mac\\.viewer\\.", + "^com\\.teamviewer\\.TeamViewer$", + "^com\\.vmware\\.horizon$", + "^com\\.2X\\.Client\\.Mac$", + "^com\\.OpenText\\.Exceed-TurboX-Client$", + "^com\\.realvnc\\.vncviewer$", + "^com\\.citrix\\.receiver\\.icaviewer", + "^com\\.apple\\.Terminal$", + "^com\\.googlecode\\.iterm2$", + "^co\\.zeit\\.hyperterm$", + "^co\\.zeit\\.hyper$", + "^io\\.alacritty$", + "^org\\.alacritty$", + "^net\\.kovidgoyal\\.kitty$", + "^org\\.vim\\.", + "^com\\.qvacua\\.VimR$", + "^com\\.vmware\\.fusion$", + "^com\\.vmware\\.horizon$", + "^com\\.vmware\\.view$", + "^com\\.parallels\\.desktop$", + "^com\\.parallels\\.vm$", + "^com\\.parallels\\.desktop\\.console$", + "^org\\.virtualbox\\.app\\.VirtualBoxVM$", + "^com\\.citrix\\.XenAppViewer$", + "^com\\.vmware\\.proxyApp\\.", + "^com\\.parallels\\.winapp\\.", + "^com\\.utmapp\\.UTM$", + "^org\\.x\\.X11$", + "^com\\.apple\\.x11$", + "^org\\.macosforge\\.xquartz\\.X11$", + "^org\\.macports\\.X11$", + "^com\\.sublimetext\\.", + "^com\\.microsoft\\.VSCode$", + "^com\\.jetbrains\\." + ] + }, + { + "type": "frontmost_application_if", + "bundle_identifiers": [ + "^org\\.mozilla\\.firefox$" + ] + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "8", + "modifiers": { + "mandatory": [ + "control" + ], + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "8", + "modifiers": [ + "command", + "shift" + ] + } + ], + "conditions": [ + { + "type": "variable_if", + "name": "C-x", + "value": 1 + }, + { + "type": "frontmost_application_unless", + "bundle_identifiers": [ + "^org\\.gnu\\.Emacs$", + "^org\\.gnu\\.AquamacsEmacs$", + "^org\\.gnu\\.Aquamacs$", + "^org\\.pqrs\\.unknownapp\\.conkeror$", + "^com\\.microsoft\\.rdc$", + "^com\\.microsoft\\.rdc\\.", + "^net\\.sf\\.cord$", + "^com\\.thinomenon\\.RemoteDesktopConnection$", + "^com\\.itap-mobile\\.qmote$", + "^com\\.nulana\\.remotixmac$", + "^com\\.p5sys\\.jump\\.mac\\.viewer$", + "^com\\.p5sys\\.jump\\.mac\\.viewer\\.", + "^com\\.teamviewer\\.TeamViewer$", + "^com\\.vmware\\.horizon$", + "^com\\.2X\\.Client\\.Mac$", + "^com\\.OpenText\\.Exceed-TurboX-Client$", + "^com\\.realvnc\\.vncviewer$", + "^com\\.citrix\\.receiver\\.icaviewer", + "^com\\.apple\\.Terminal$", + "^com\\.googlecode\\.iterm2$", + "^co\\.zeit\\.hyperterm$", + "^co\\.zeit\\.hyper$", + "^io\\.alacritty$", + "^org\\.alacritty$", + "^net\\.kovidgoyal\\.kitty$", + "^org\\.vim\\.", + "^com\\.qvacua\\.VimR$", + "^com\\.vmware\\.fusion$", + "^com\\.vmware\\.horizon$", + "^com\\.vmware\\.view$", + "^com\\.parallels\\.desktop$", + "^com\\.parallels\\.vm$", + "^com\\.parallels\\.desktop\\.console$", + "^org\\.virtualbox\\.app\\.VirtualBoxVM$", + "^com\\.citrix\\.XenAppViewer$", + "^com\\.vmware\\.proxyApp\\.", + "^com\\.parallels\\.winapp\\.", + "^com\\.utmapp\\.UTM$", + "^org\\.x\\.X11$", + "^com\\.apple\\.x11$", + "^org\\.macosforge\\.xquartz\\.X11$", + "^org\\.macports\\.X11$", + "^com\\.sublimetext\\.", + "^com\\.microsoft\\.VSCode$", + "^com\\.jetbrains\\." + ] + }, + { + "type": "frontmost_application_unless", + "bundle_identifiers": [ + "^org\\.mozilla\\.firefox$" + ] + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "8", + "modifiers": { + "mandatory": [ + "control" + ], + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "key_code": "8", + "modifiers": [ + "option", + "shift" + ] + } + ], + "conditions": [ + { + "type": "variable_if", + "name": "C-x", + "value": 1 + }, + { + "type": "frontmost_application_unless", + "bundle_identifiers": [ + "^org\\.gnu\\.Emacs$", + "^org\\.gnu\\.AquamacsEmacs$", + "^org\\.gnu\\.Aquamacs$", + "^org\\.pqrs\\.unknownapp\\.conkeror$", + "^com\\.microsoft\\.rdc$", + "^com\\.microsoft\\.rdc\\.", + "^net\\.sf\\.cord$", + "^com\\.thinomenon\\.RemoteDesktopConnection$", + "^com\\.itap-mobile\\.qmote$", + "^com\\.nulana\\.remotixmac$", + "^com\\.p5sys\\.jump\\.mac\\.viewer$", + "^com\\.p5sys\\.jump\\.mac\\.viewer\\.", + "^com\\.teamviewer\\.TeamViewer$", + "^com\\.vmware\\.horizon$", + "^com\\.2X\\.Client\\.Mac$", + "^com\\.OpenText\\.Exceed-TurboX-Client$", + "^com\\.realvnc\\.vncviewer$", + "^com\\.citrix\\.receiver\\.icaviewer", + "^com\\.apple\\.Terminal$", + "^com\\.googlecode\\.iterm2$", + "^co\\.zeit\\.hyperterm$", + "^co\\.zeit\\.hyper$", + "^io\\.alacritty$", + "^org\\.alacritty$", + "^net\\.kovidgoyal\\.kitty$", + "^org\\.vim\\.", + "^com\\.qvacua\\.VimR$", + "^com\\.vmware\\.fusion$", + "^com\\.vmware\\.horizon$", + "^com\\.vmware\\.view$", + "^com\\.parallels\\.desktop$", + "^com\\.parallels\\.vm$", + "^com\\.parallels\\.desktop\\.console$", + "^org\\.virtualbox\\.app\\.VirtualBoxVM$", + "^com\\.citrix\\.XenAppViewer$", + "^com\\.vmware\\.proxyApp\\.", + "^com\\.parallels\\.winapp\\.", + "^com\\.utmapp\\.UTM$", + "^org\\.x\\.X11$", + "^com\\.apple\\.x11$", + "^org\\.macosforge\\.xquartz\\.X11$", + "^org\\.macports\\.X11$", + "^com\\.sublimetext\\.", + "^com\\.microsoft\\.VSCode$", + "^com\\.jetbrains\\." + ] + }, { - "type": "variable_if", - "name": "C-x", - "value": 1 + "type": "frontmost_application_if", + "bundle_identifiers": [ + "^org\\.mozilla\\.firefox$" + ] } ] }, @@ -804,9 +2316,262 @@ "to": [ { "key_code": "delete_forward" + }, + { + "set_variable": { + "name": "C-spacebar", + "value": 0 + } + } + ], + "conditions": [ + { + "type": "frontmost_application_unless", + "bundle_identifiers": [ + "^org\\.gnu\\.Emacs$", + "^org\\.gnu\\.AquamacsEmacs$", + "^org\\.gnu\\.Aquamacs$", + "^org\\.pqrs\\.unknownapp\\.conkeror$", + "^com\\.microsoft\\.rdc$", + "^com\\.microsoft\\.rdc\\.", + "^net\\.sf\\.cord$", + "^com\\.thinomenon\\.RemoteDesktopConnection$", + "^com\\.itap-mobile\\.qmote$", + "^com\\.nulana\\.remotixmac$", + "^com\\.p5sys\\.jump\\.mac\\.viewer$", + "^com\\.p5sys\\.jump\\.mac\\.viewer\\.", + "^com\\.teamviewer\\.TeamViewer$", + "^com\\.vmware\\.horizon$", + "^com\\.2X\\.Client\\.Mac$", + "^com\\.OpenText\\.Exceed-TurboX-Client$", + "^com\\.realvnc\\.vncviewer$", + "^com\\.citrix\\.receiver\\.icaviewer", + "^com\\.apple\\.Terminal$", + "^com\\.googlecode\\.iterm2$", + "^co\\.zeit\\.hyperterm$", + "^co\\.zeit\\.hyper$", + "^io\\.alacritty$", + "^org\\.alacritty$", + "^net\\.kovidgoyal\\.kitty$", + "^org\\.vim\\.", + "^com\\.qvacua\\.VimR$", + "^com\\.vmware\\.fusion$", + "^com\\.vmware\\.horizon$", + "^com\\.vmware\\.view$", + "^com\\.parallels\\.desktop$", + "^com\\.parallels\\.vm$", + "^com\\.parallels\\.desktop\\.console$", + "^org\\.virtualbox\\.app\\.VirtualBoxVM$", + "^com\\.citrix\\.XenAppViewer$", + "^com\\.vmware\\.proxyApp\\.", + "^com\\.parallels\\.winapp\\.", + "^com\\.utmapp\\.UTM$", + "^org\\.x\\.X11$", + "^com\\.apple\\.x11$", + "^org\\.macosforge\\.xquartz\\.X11$", + "^org\\.macports\\.X11$", + "^com\\.sublimetext\\.", + "^com\\.microsoft\\.VSCode$", + "^com\\.jetbrains\\." + ] + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "e", + "modifiers": { + "mandatory": [ + "control" + ], + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "key_code": "e", + "modifiers": [ + "control" + ] + }, + { + "set_variable": { + "name": "C-spacebar", + "value": 0 + } + } + ], + "conditions": [ + { + "type": "variable_unless", + "name": "C-spacebar", + "value": 1 + }, + { + "type": "frontmost_application_unless", + "bundle_identifiers": [ + "^org\\.gnu\\.Emacs$", + "^org\\.gnu\\.AquamacsEmacs$", + "^org\\.gnu\\.Aquamacs$", + "^org\\.pqrs\\.unknownapp\\.conkeror$", + "^com\\.microsoft\\.rdc$", + "^com\\.microsoft\\.rdc\\.", + "^net\\.sf\\.cord$", + "^com\\.thinomenon\\.RemoteDesktopConnection$", + "^com\\.itap-mobile\\.qmote$", + "^com\\.nulana\\.remotixmac$", + "^com\\.p5sys\\.jump\\.mac\\.viewer$", + "^com\\.p5sys\\.jump\\.mac\\.viewer\\.", + "^com\\.teamviewer\\.TeamViewer$", + "^com\\.vmware\\.horizon$", + "^com\\.2X\\.Client\\.Mac$", + "^com\\.OpenText\\.Exceed-TurboX-Client$", + "^com\\.realvnc\\.vncviewer$", + "^com\\.citrix\\.receiver\\.icaviewer", + "^com\\.apple\\.Terminal$", + "^com\\.googlecode\\.iterm2$", + "^co\\.zeit\\.hyperterm$", + "^co\\.zeit\\.hyper$", + "^io\\.alacritty$", + "^org\\.alacritty$", + "^net\\.kovidgoyal\\.kitty$", + "^org\\.vim\\.", + "^com\\.qvacua\\.VimR$", + "^com\\.vmware\\.fusion$", + "^com\\.vmware\\.horizon$", + "^com\\.vmware\\.view$", + "^com\\.parallels\\.desktop$", + "^com\\.parallels\\.vm$", + "^com\\.parallels\\.desktop\\.console$", + "^org\\.virtualbox\\.app\\.VirtualBoxVM$", + "^com\\.citrix\\.XenAppViewer$", + "^com\\.vmware\\.proxyApp\\.", + "^com\\.parallels\\.winapp\\.", + "^com\\.utmapp\\.UTM$", + "^org\\.x\\.X11$", + "^com\\.apple\\.x11$", + "^org\\.macosforge\\.xquartz\\.X11$", + "^org\\.macports\\.X11$", + "^com\\.sublimetext\\.", + "^com\\.microsoft\\.VSCode$", + "^com\\.jetbrains\\." + ] + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "e", + "modifiers": { + "mandatory": [ + "control" + ], + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "key_code": "e", + "modifiers": [ + "shift", + "control" + ] + } + ], + "conditions": [ + { + "type": "variable_if", + "name": "C-spacebar", + "value": 1 + }, + { + "type": "frontmost_application_unless", + "bundle_identifiers": [ + "^org\\.gnu\\.Emacs$", + "^org\\.gnu\\.AquamacsEmacs$", + "^org\\.gnu\\.Aquamacs$", + "^org\\.pqrs\\.unknownapp\\.conkeror$", + "^com\\.microsoft\\.rdc$", + "^com\\.microsoft\\.rdc\\.", + "^net\\.sf\\.cord$", + "^com\\.thinomenon\\.RemoteDesktopConnection$", + "^com\\.itap-mobile\\.qmote$", + "^com\\.nulana\\.remotixmac$", + "^com\\.p5sys\\.jump\\.mac\\.viewer$", + "^com\\.p5sys\\.jump\\.mac\\.viewer\\.", + "^com\\.teamviewer\\.TeamViewer$", + "^com\\.vmware\\.horizon$", + "^com\\.2X\\.Client\\.Mac$", + "^com\\.OpenText\\.Exceed-TurboX-Client$", + "^com\\.realvnc\\.vncviewer$", + "^com\\.citrix\\.receiver\\.icaviewer", + "^com\\.apple\\.Terminal$", + "^com\\.googlecode\\.iterm2$", + "^co\\.zeit\\.hyperterm$", + "^co\\.zeit\\.hyper$", + "^io\\.alacritty$", + "^org\\.alacritty$", + "^net\\.kovidgoyal\\.kitty$", + "^org\\.vim\\.", + "^com\\.qvacua\\.VimR$", + "^com\\.vmware\\.fusion$", + "^com\\.vmware\\.horizon$", + "^com\\.vmware\\.view$", + "^com\\.parallels\\.desktop$", + "^com\\.parallels\\.vm$", + "^com\\.parallels\\.desktop\\.console$", + "^org\\.virtualbox\\.app\\.VirtualBoxVM$", + "^com\\.citrix\\.XenAppViewer$", + "^com\\.vmware\\.proxyApp\\.", + "^com\\.parallels\\.winapp\\.", + "^com\\.utmapp\\.UTM$", + "^org\\.x\\.X11$", + "^com\\.apple\\.x11$", + "^org\\.macosforge\\.xquartz\\.X11$", + "^org\\.macports\\.X11$", + "^com\\.sublimetext\\.", + "^com\\.microsoft\\.VSCode$", + "^com\\.jetbrains\\." + ] + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "f", + "modifiers": { + "mandatory": [ + "control" + ], + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "key_code": "f", + "modifiers": [ + "control" + ] } ], "conditions": [ + { + "type": "variable_unless", + "name": "C-spacebar", + "value": 1 + }, { "type": "frontmost_application_unless", "bundle_identifiers": [ @@ -862,7 +2627,7 @@ { "type": "basic", "from": { - "key_code": "e", + "key_code": "f", "modifiers": { "mandatory": [ "control" @@ -875,21 +2640,16 @@ }, "to": [ { - "key_code": "e", + "key_code": "f", "modifiers": [ + "shift", "control" ] - }, - { - "set_variable": { - "name": "C-spacebar", - "value": 0 - } } ], "conditions": [ { - "type": "variable_unless", + "type": "variable_if", "name": "C-spacebar", "value": 1 }, @@ -948,7 +2708,7 @@ { "type": "basic", "from": { - "key_code": "e", + "key_code": "g", "modifiers": { "mandatory": [ "control" @@ -961,19 +2721,16 @@ }, "to": [ { - "key_code": "e", - "modifiers": [ - "shift", - "control" - ] + "set_variable": { + "name": "C-spacebar", + "value": 0 + } + }, + { + "key_code": "escape" } ], "conditions": [ - { - "type": "variable_if", - "name": "C-spacebar", - "value": 1 - }, { "type": "frontmost_application_unless", "bundle_identifiers": [ @@ -1029,7 +2786,7 @@ { "type": "basic", "from": { - "key_code": "f", + "key_code": "n", "modifiers": { "mandatory": [ "control" @@ -1042,7 +2799,7 @@ }, "to": [ { - "key_code": "f", + "key_code": "n", "modifiers": [ "control" ] @@ -1103,13 +2860,26 @@ "^com\\.microsoft\\.VSCode$", "^com\\.jetbrains\\." ] + }, + { + "type": "frontmost_application_unless", + "bundle_identifiers": [ + "^org\\.mozilla\\.firefox$", + "^org\\.mozilla\\.firefoxdeveloperedition$", + "^org\\.mozilla\\.nightly$", + "^com\\.microsoft\\.Edge", + "^com\\.microsoft\\.edgemac", + "^com\\.google\\.Chrome$", + "^com\\.brave\\.Browser$", + "^com\\.apple\\.Safari$" + ] } ] }, { "type": "basic", "from": { - "key_code": "f", + "key_code": "n", "modifiers": { "mandatory": [ "control" @@ -1122,7 +2892,7 @@ }, "to": [ { - "key_code": "f", + "key_code": "n", "modifiers": [ "shift", "control" @@ -1184,13 +2954,26 @@ "^com\\.microsoft\\.VSCode$", "^com\\.jetbrains\\." ] + }, + { + "type": "frontmost_application_unless", + "bundle_identifiers": [ + "^org\\.mozilla\\.firefox$", + "^org\\.mozilla\\.firefoxdeveloperedition$", + "^org\\.mozilla\\.nightly$", + "^com\\.microsoft\\.Edge", + "^com\\.microsoft\\.edgemac", + "^com\\.google\\.Chrome$", + "^com\\.brave\\.Browser$", + "^com\\.apple\\.Safari$" + ] } ] }, { "type": "basic", "from": { - "key_code": "g", + "key_code": "n", "modifiers": { "mandatory": [ "control" @@ -1203,16 +2986,15 @@ }, "to": [ { - "set_variable": { - "name": "C-spacebar", - "value": 0 - } - }, - { - "key_code": "escape" + "key_code": "down_arrow" } ], "conditions": [ + { + "type": "variable_unless", + "name": "C-spacebar", + "value": 1 + }, { "type": "frontmost_application_unless", "bundle_identifiers": [ @@ -1262,28 +3044,50 @@ "^com\\.microsoft\\.VSCode$", "^com\\.jetbrains\\." ] + }, + { + "type": "frontmost_application_if", + "bundle_identifiers": [ + "^org\\.mozilla\\.firefox$", + "^org\\.mozilla\\.firefoxdeveloperedition$", + "^org\\.mozilla\\.nightly$", + "^com\\.microsoft\\.Edge", + "^com\\.microsoft\\.edgemac", + "^com\\.google\\.Chrome$", + "^com\\.brave\\.Browser$", + "^com\\.apple\\.Safari$" + ] } ] }, { "type": "basic", "from": { - "key_code": "h", + "key_code": "n", "modifiers": { "mandatory": [ "control" ], "optional": [ - "caps_lock" + "caps_lock", + "shift" ] } }, "to": [ { - "key_code": "delete_or_backspace" + "key_code": "down_arrow", + "modifiers": [ + "shift" + ] } ], "conditions": [ + { + "type": "variable_if", + "name": "C-spacebar", + "value": 1 + }, { "type": "frontmost_application_unless", "bundle_identifiers": [ @@ -1333,13 +3137,26 @@ "^com\\.microsoft\\.VSCode$", "^com\\.jetbrains\\." ] + }, + { + "type": "frontmost_application_if", + "bundle_identifiers": [ + "^org\\.mozilla\\.firefox$", + "^org\\.mozilla\\.firefoxdeveloperedition$", + "^org\\.mozilla\\.nightly$", + "^com\\.microsoft\\.Edge", + "^com\\.microsoft\\.edgemac", + "^com\\.google\\.Chrome$", + "^com\\.brave\\.Browser$", + "^com\\.apple\\.Safari$" + ] } ] }, { "type": "basic", "from": { - "key_code": "n", + "key_code": "p", "modifiers": { "mandatory": [ "control" @@ -1352,7 +3169,7 @@ }, "to": [ { - "key_code": "n", + "key_code": "p", "modifiers": [ "control" ] @@ -1413,13 +3230,26 @@ "^com\\.microsoft\\.VSCode$", "^com\\.jetbrains\\." ] + }, + { + "type": "frontmost_application_unless", + "bundle_identifiers": [ + "^org\\.mozilla\\.firefox$", + "^org\\.mozilla\\.firefoxdeveloperedition$", + "^org\\.mozilla\\.nightly$", + "^com\\.microsoft\\.Edge", + "^com\\.microsoft\\.edgemac", + "^com\\.google\\.Chrome$", + "^com\\.brave\\.Browser$", + "^com\\.apple\\.Safari$" + ] } ] }, { "type": "basic", "from": { - "key_code": "n", + "key_code": "p", "modifiers": { "mandatory": [ "control" @@ -1432,7 +3262,7 @@ }, "to": [ { - "key_code": "n", + "key_code": "p", "modifiers": [ "shift", "control" @@ -1494,6 +3324,19 @@ "^com\\.microsoft\\.VSCode$", "^com\\.jetbrains\\." ] + }, + { + "type": "frontmost_application_unless", + "bundle_identifiers": [ + "^org\\.mozilla\\.firefox$", + "^org\\.mozilla\\.firefoxdeveloperedition$", + "^org\\.mozilla\\.nightly$", + "^com\\.microsoft\\.Edge", + "^com\\.microsoft\\.edgemac", + "^com\\.google\\.Chrome$", + "^com\\.brave\\.Browser$", + "^com\\.apple\\.Safari$" + ] } ] }, @@ -1513,10 +3356,7 @@ }, "to": [ { - "key_code": "p", - "modifiers": [ - "control" - ] + "key_code": "up_arrow" } ], "conditions": [ @@ -1574,6 +3414,19 @@ "^com\\.microsoft\\.VSCode$", "^com\\.jetbrains\\." ] + }, + { + "type": "frontmost_application_if", + "bundle_identifiers": [ + "^org\\.mozilla\\.firefox$", + "^org\\.mozilla\\.firefoxdeveloperedition$", + "^org\\.mozilla\\.nightly$", + "^com\\.microsoft\\.Edge", + "^com\\.microsoft\\.edgemac", + "^com\\.google\\.Chrome$", + "^com\\.brave\\.Browser$", + "^com\\.apple\\.Safari$" + ] } ] }, @@ -1593,10 +3446,9 @@ }, "to": [ { - "key_code": "p", + "key_code": "up_arrow", "modifiers": [ - "shift", - "control" + "shift" ] } ], @@ -1655,6 +3507,19 @@ "^com\\.microsoft\\.VSCode$", "^com\\.jetbrains\\." ] + }, + { + "type": "frontmost_application_if", + "bundle_identifiers": [ + "^org\\.mozilla\\.firefox$", + "^org\\.mozilla\\.firefoxdeveloperedition$", + "^org\\.mozilla\\.nightly$", + "^com\\.microsoft\\.Edge", + "^com\\.microsoft\\.edgemac", + "^com\\.google\\.Chrome$", + "^com\\.brave\\.Browser$", + "^com\\.apple\\.Safari$" + ] } ] }, @@ -2118,6 +3983,18 @@ "^com\\.microsoft\\.VSCode$", "^com\\.jetbrains\\." ] + }, + { + "type": "frontmost_application_unless", + "bundle_identifiers": [ + "^com\\.apple\\.Terminal$", + "^com\\.googlecode\\.iterm2$", + "^co\\.zeit\\.hyperterm$", + "^co\\.zeit\\.hyper$", + "^io\\.alacritty$", + "^org\\.alacritty$", + "^net\\.kovidgoyal\\.kitty$" + ] } ] }, @@ -2132,19 +4009,69 @@ "optional": [ "caps_lock" ] - } - }, - "to": [ - { - "key_code": "v", - "modifiers": "command" + } + }, + "to": [ + { + "key_code": "v", + "modifiers": "command" + }, + { + "key_code": "y", + "modifiers": "command" + } + ], + "conditions": [ + { + "type": "frontmost_application_unless", + "bundle_identifiers": [ + "^org\\.gnu\\.Emacs$", + "^org\\.gnu\\.AquamacsEmacs$", + "^org\\.gnu\\.Aquamacs$", + "^org\\.pqrs\\.unknownapp\\.conkeror$", + "^com\\.microsoft\\.rdc$", + "^com\\.microsoft\\.rdc\\.", + "^net\\.sf\\.cord$", + "^com\\.thinomenon\\.RemoteDesktopConnection$", + "^com\\.itap-mobile\\.qmote$", + "^com\\.nulana\\.remotixmac$", + "^com\\.p5sys\\.jump\\.mac\\.viewer$", + "^com\\.p5sys\\.jump\\.mac\\.viewer\\.", + "^com\\.teamviewer\\.TeamViewer$", + "^com\\.vmware\\.horizon$", + "^com\\.2X\\.Client\\.Mac$", + "^com\\.OpenText\\.Exceed-TurboX-Client$", + "^com\\.realvnc\\.vncviewer$", + "^com\\.citrix\\.receiver\\.icaviewer", + "^com\\.apple\\.Terminal$", + "^com\\.googlecode\\.iterm2$", + "^co\\.zeit\\.hyperterm$", + "^co\\.zeit\\.hyper$", + "^io\\.alacritty$", + "^org\\.alacritty$", + "^net\\.kovidgoyal\\.kitty$", + "^org\\.vim\\.", + "^com\\.qvacua\\.VimR$", + "^com\\.vmware\\.fusion$", + "^com\\.vmware\\.horizon$", + "^com\\.vmware\\.view$", + "^com\\.parallels\\.desktop$", + "^com\\.parallels\\.vm$", + "^com\\.parallels\\.desktop\\.console$", + "^org\\.virtualbox\\.app\\.VirtualBoxVM$", + "^com\\.citrix\\.XenAppViewer$", + "^com\\.vmware\\.proxyApp\\.", + "^com\\.parallels\\.winapp\\.", + "^com\\.utmapp\\.UTM$", + "^org\\.x\\.X11$", + "^com\\.apple\\.x11$", + "^org\\.macosforge\\.xquartz\\.X11$", + "^org\\.macports\\.X11$", + "^com\\.sublimetext\\.", + "^com\\.microsoft\\.VSCode$", + "^com\\.jetbrains\\." + ] }, - { - "key_code": "y", - "modifiers": "command" - } - ], - "conditions": [ { "type": "frontmost_application_if", "bundle_identifiers": [ @@ -2394,7 +4321,7 @@ { "type": "basic", "from": { - "key_code": "f", + "key_code": "d", "modifiers": { "mandatory": [ "option" @@ -2406,8 +4333,9 @@ }, "to": [ { - "key_code": "right_arrow", + "key_code": "delete_or_backspace", "modifiers": [ + "fn", "option" ] } @@ -2468,21 +4396,21 @@ { "type": "basic", "from": { - "key_code": "n", + "key_code": "b", "modifiers": { "mandatory": [ "option" ], "optional": [ - "any" + "shift" ] } }, "to": [ { - "key_code": "n", + "key_code": "left_arrow", "modifiers": [ - "command" + "option" ] } ], @@ -2536,53 +4464,78 @@ "^com\\.microsoft\\.VSCode$", "^com\\.jetbrains\\." ] - }, - { - "type": "frontmost_application_unless", - "bundle_identifiers": [ - "^com\\.jetbrains\\." - ] - }, - { - "type": "frontmost_application_unless", - "bundle_identifiers": [ - "^org\\.mozilla\\.firefox$", - "^org\\.mozilla\\.firefoxdeveloperedition$", - "^org\\.mozilla\\.nightly$", - "^com\\.microsoft\\.Edge", - "^com\\.microsoft\\.edgemac", - "^com\\.google\\.Chrome$", - "^com\\.brave\\.Browser$", - "^com\\.apple\\.Safari$" - ] } ] }, { "type": "basic", "from": { - "key_code": "n", + "key_code": "f", "modifiers": { "mandatory": [ "option" ], "optional": [ - "any" + "shift" ] } }, "to": [ { - "key_code": "n", + "key_code": "right_arrow", "modifiers": [ - "command" + "option" ] } ], "conditions": [ { - "type": "frontmost_application_if", + "type": "frontmost_application_unless", "bundle_identifiers": [ + "^org\\.gnu\\.Emacs$", + "^org\\.gnu\\.AquamacsEmacs$", + "^org\\.gnu\\.Aquamacs$", + "^org\\.pqrs\\.unknownapp\\.conkeror$", + "^com\\.microsoft\\.rdc$", + "^com\\.microsoft\\.rdc\\.", + "^net\\.sf\\.cord$", + "^com\\.thinomenon\\.RemoteDesktopConnection$", + "^com\\.itap-mobile\\.qmote$", + "^com\\.nulana\\.remotixmac$", + "^com\\.p5sys\\.jump\\.mac\\.viewer$", + "^com\\.p5sys\\.jump\\.mac\\.viewer\\.", + "^com\\.teamviewer\\.TeamViewer$", + "^com\\.vmware\\.horizon$", + "^com\\.2X\\.Client\\.Mac$", + "^com\\.OpenText\\.Exceed-TurboX-Client$", + "^com\\.realvnc\\.vncviewer$", + "^com\\.citrix\\.receiver\\.icaviewer", + "^com\\.apple\\.Terminal$", + "^com\\.googlecode\\.iterm2$", + "^co\\.zeit\\.hyperterm$", + "^co\\.zeit\\.hyper$", + "^io\\.alacritty$", + "^org\\.alacritty$", + "^net\\.kovidgoyal\\.kitty$", + "^org\\.vim\\.", + "^com\\.qvacua\\.VimR$", + "^com\\.vmware\\.fusion$", + "^com\\.vmware\\.horizon$", + "^com\\.vmware\\.view$", + "^com\\.parallels\\.desktop$", + "^com\\.parallels\\.vm$", + "^com\\.parallels\\.desktop\\.console$", + "^org\\.virtualbox\\.app\\.VirtualBoxVM$", + "^com\\.citrix\\.XenAppViewer$", + "^com\\.vmware\\.proxyApp\\.", + "^com\\.parallels\\.winapp\\.", + "^com\\.utmapp\\.UTM$", + "^org\\.x\\.X11$", + "^com\\.apple\\.x11$", + "^org\\.macosforge\\.xquartz\\.X11$", + "^org\\.macports\\.X11$", + "^com\\.sublimetext\\.", + "^com\\.microsoft\\.VSCode$", "^com\\.jetbrains\\." ] } @@ -2591,36 +4544,70 @@ { "type": "basic", "from": { - "key_code": "n", + "key_code": "v", "modifiers": { "mandatory": [ "option" ], "optional": [ - "any" + "shift" ] } }, "to": [ { - "key_code": "t", - "modifiers": [ - "command" - ] + "key_code": "page_up" } ], "conditions": [ { - "type": "frontmost_application_if", + "type": "frontmost_application_unless", "bundle_identifiers": [ - "^org\\.mozilla\\.firefox$", - "^org\\.mozilla\\.firefoxdeveloperedition$", - "^org\\.mozilla\\.nightly$", - "^com\\.microsoft\\.Edge", - "^com\\.microsoft\\.edgemac", - "^com\\.google\\.Chrome$", - "^com\\.brave\\.Browser$", - "^com\\.apple\\.Safari$" + "^org\\.gnu\\.Emacs$", + "^org\\.gnu\\.AquamacsEmacs$", + "^org\\.gnu\\.Aquamacs$", + "^org\\.pqrs\\.unknownapp\\.conkeror$", + "^com\\.microsoft\\.rdc$", + "^com\\.microsoft\\.rdc\\.", + "^net\\.sf\\.cord$", + "^com\\.thinomenon\\.RemoteDesktopConnection$", + "^com\\.itap-mobile\\.qmote$", + "^com\\.nulana\\.remotixmac$", + "^com\\.p5sys\\.jump\\.mac\\.viewer$", + "^com\\.p5sys\\.jump\\.mac\\.viewer\\.", + "^com\\.teamviewer\\.TeamViewer$", + "^com\\.vmware\\.horizon$", + "^com\\.2X\\.Client\\.Mac$", + "^com\\.OpenText\\.Exceed-TurboX-Client$", + "^com\\.realvnc\\.vncviewer$", + "^com\\.citrix\\.receiver\\.icaviewer", + "^com\\.apple\\.Terminal$", + "^com\\.googlecode\\.iterm2$", + "^co\\.zeit\\.hyperterm$", + "^co\\.zeit\\.hyper$", + "^io\\.alacritty$", + "^org\\.alacritty$", + "^net\\.kovidgoyal\\.kitty$", + "^org\\.vim\\.", + "^com\\.qvacua\\.VimR$", + "^com\\.vmware\\.fusion$", + "^com\\.vmware\\.horizon$", + "^com\\.vmware\\.view$", + "^com\\.parallels\\.desktop$", + "^com\\.parallels\\.vm$", + "^com\\.parallels\\.desktop\\.console$", + "^org\\.virtualbox\\.app\\.VirtualBoxVM$", + "^com\\.citrix\\.XenAppViewer$", + "^com\\.vmware\\.proxyApp\\.", + "^com\\.parallels\\.winapp\\.", + "^com\\.utmapp\\.UTM$", + "^org\\.x\\.X11$", + "^com\\.apple\\.x11$", + "^org\\.macosforge\\.xquartz\\.X11$", + "^org\\.macports\\.X11$", + "^com\\.sublimetext\\.", + "^com\\.microsoft\\.VSCode$", + "^com\\.jetbrains\\." ] } ] @@ -2628,7 +4615,7 @@ { "type": "basic", "from": { - "key_code": "t", + "key_code": "w", "modifiers": { "mandatory": [ "option" @@ -2640,24 +4627,67 @@ }, "to": [ { - "key_code": "t", + "key_code": "c", "modifiers": [ "command" ] + }, + { + "set_variable": { + "name": "C-spacebar", + "value": 0 + } } ], "conditions": [ { - "type": "frontmost_application_if", + "type": "frontmost_application_unless", "bundle_identifiers": [ - "^org\\.mozilla\\.firefox$", - "^org\\.mozilla\\.firefoxdeveloperedition$", - "^org\\.mozilla\\.nightly$", - "^com\\.microsoft\\.Edge", - "^com\\.microsoft\\.edgemac", - "^com\\.google\\.Chrome$", - "^com\\.brave\\.Browser$", - "^com\\.apple\\.Safari$" + "^org\\.gnu\\.Emacs$", + "^org\\.gnu\\.AquamacsEmacs$", + "^org\\.gnu\\.Aquamacs$", + "^org\\.pqrs\\.unknownapp\\.conkeror$", + "^com\\.microsoft\\.rdc$", + "^com\\.microsoft\\.rdc\\.", + "^net\\.sf\\.cord$", + "^com\\.thinomenon\\.RemoteDesktopConnection$", + "^com\\.itap-mobile\\.qmote$", + "^com\\.nulana\\.remotixmac$", + "^com\\.p5sys\\.jump\\.mac\\.viewer$", + "^com\\.p5sys\\.jump\\.mac\\.viewer\\.", + "^com\\.teamviewer\\.TeamViewer$", + "^com\\.vmware\\.horizon$", + "^com\\.2X\\.Client\\.Mac$", + "^com\\.OpenText\\.Exceed-TurboX-Client$", + "^com\\.realvnc\\.vncviewer$", + "^com\\.citrix\\.receiver\\.icaviewer", + "^com\\.apple\\.Terminal$", + "^com\\.googlecode\\.iterm2$", + "^co\\.zeit\\.hyperterm$", + "^co\\.zeit\\.hyper$", + "^io\\.alacritty$", + "^org\\.alacritty$", + "^net\\.kovidgoyal\\.kitty$", + "^org\\.vim\\.", + "^com\\.qvacua\\.VimR$", + "^com\\.vmware\\.fusion$", + "^com\\.vmware\\.horizon$", + "^com\\.vmware\\.view$", + "^com\\.parallels\\.desktop$", + "^com\\.parallels\\.vm$", + "^com\\.parallels\\.desktop\\.console$", + "^org\\.virtualbox\\.app\\.VirtualBoxVM$", + "^com\\.citrix\\.XenAppViewer$", + "^com\\.vmware\\.proxyApp\\.", + "^com\\.parallels\\.winapp\\.", + "^com\\.utmapp\\.UTM$", + "^org\\.x\\.X11$", + "^com\\.apple\\.x11$", + "^org\\.macosforge\\.xquartz\\.X11$", + "^org\\.macports\\.X11$", + "^com\\.sublimetext\\.", + "^com\\.microsoft\\.VSCode$", + "^com\\.jetbrains\\." ] } ] @@ -2665,19 +4695,17 @@ { "type": "basic", "from": { - "key_code": "v", + "key_code": "comma", "modifiers": { "mandatory": [ - "option" - ], - "optional": [ + "option", "shift" ] } }, "to": [ { - "key_code": "page_up" + "key_code": "home" } ], "conditions": [ @@ -2736,28 +4764,17 @@ { "type": "basic", "from": { - "key_code": "w", + "key_code": "period", "modifiers": { "mandatory": [ - "option" - ], - "optional": [ - "any" + "option", + "shift" ] } }, "to": [ { - "key_code": "c", - "modifiers": [ - "command" - ] - }, - { - "set_variable": { - "name": "C-spacebar", - "value": 0 - } + "key_code": "end" } ], "conditions": [ diff --git a/src/json/universal_emacs_keybindings.json.js b/src/json/universal_emacs_keybindings.json.js index 533842f2d..41f8adc22 100644 --- a/src/json/universal_emacs_keybindings.json.js +++ b/src/json/universal_emacs_keybindings.json.js @@ -11,7 +11,7 @@ function main() { rules: [ { - description: 'Emacs Emulation in all apps without emacs keybindings (v1)', + description: 'Emacs Emulation in all apps without emacs keybindings (v1.2)', manipulators: manipulators(), }, ], @@ -22,415 +22,561 @@ function main() { ) } -function manipulators() { - const unlessEmacs = { +function ifApp() { + const identifiers = Array.prototype.slice.call(arguments); + return { + type: 'frontmost_application_if', + bundle_identifiers: identifiers + }; +} + +function unlessApp() { + const identifiers = Array.prototype.slice.call(arguments); + return { type: 'frontmost_application_unless', - bundle_identifiers: [].concat(karabiner.bundleIdentifiers.emacsKeyBindingsException, karabiner.bundleIdentifiers.jetbrainsIDE), - } + bundle_identifiers: identifiers + }; +} - return [].concat( - // --- Comment to prevent line combination by Prettier --- - cx(unlessEmacs), - controlKeys(unlessEmacs), - optionKeys(unlessEmacs) - ) +function unlessEmacs() { + return { + type: 'frontmost_application_unless', + bundle_identifiers: [].concat(karabiner.bundleIdentifiers.emacsKeyBindingsException, karabiner.bundleIdentifiers.jetbrainsIDE), + }; } -function cx(unlessEmacs) { - const ifBrowser = { +function ifBrowser() { + return { type: 'frontmost_application_if', bundle_identifiers: karabiner.bundleIdentifiers.browser, - } - const unlessBrowser = { + }; +} + +function unlessBrowser() { + return { type: 'frontmost_application_unless', bundle_identifiers: karabiner.bundleIdentifiers.browser, + }; +} + +function ifFirefox() { + return ifApp('^org\\.mozilla\\.firefox$'); +} + +function unlessFirefox() { + return unlessApp('^org\\.mozilla\\.firefox$'); +} + +function ifTerminal() { + return { + type: 'frontmost_application_if', + bundle_identifiers: karabiner.bundleIdentifiers.terminal, + } +} + +function unlessTerminal() { + return { + type: 'frontmost_application_unless', + bundle_identifiers: karabiner.bundleIdentifiers.terminal, } +} - return [ - // Bind switch buffer to Command+B, then in browsers like chrome you can install a task switcher QuickTabs: - // https://chrome.google.com/extensions/detail/jnjfeinjfmenlddahdjdmgpbokiacbbb - // Then, you need to configure Command+B to activate QuickTabs in chrome://extensions/shortcuts +function withCtrlOrCapsLock() { + return {mandatory: ['control'], optional: ['caps_lock']}; +} + +function ifCxActive() { + return {type: 'variable_if', name: 'C-x', value: 1}; +} + +function ifMarkActive() { + return {type: 'variable_if', name: 'C-spacebar', value: 1}; +} + +function unlessMarkActive() { + return {type: 'variable_unless', name: 'C-spacebar', value: 1}; +} + +function clearMark() { + return {name: 'C-spacebar', value: 0}; +} + +function setMark() { + return {name: 'C-spacebar', value: 1}; +} + +function manipulators() { + return [].concat( + // --- Comment to prevent line combination by Prettier --- + cx(), + controlKeys(), + optionKeys() + ) +} +function cx() { + return [ { type: 'basic', - from: { key_code: 'b', modifiers: { mandatory: ['control'], optional: ['caps_lock'] } }, - to: [{ key_code: 'b', modifiers: ['command'] }], - conditions: [{ type: 'variable_if', name: 'C-x', value: 1 }], + from: {key_code: 'b', modifiers: withCtrlOrCapsLock()}, + to: [{key_code: 'a', modifiers: ['command', 'shift']}], + conditions: [ifCxActive(), unlessEmacs()], + }, + { + type: 'basic', + from: {key_code: 'c', modifiers: withCtrlOrCapsLock()}, + to: [{key_code: 'q', modifiers: ['command']}], + conditions: [ifCxActive(), unlessEmacs()], }, // Launch the dev console in most browsers with C-x/C-d { type: 'basic', - from: { key_code: 'd', modifiers: { mandatory: ['control'], optional: ['caps_lock'] } }, - to: [{ key_code: 'j', modifiers: ['command', 'option'] }], - conditions: [{ type: 'variable_if', name: 'C-x', value: 1 }, ifBrowser], + from: {key_code: 'd', modifiers: withCtrlOrCapsLock()}, + to: [{key_code: 'j', modifiers: ['command', 'option']}], + conditions: [ifCxActive(), unlessEmacs(), ifApp('^com\\.google\\.Chrome$', '^com\\.brave\\.Browser$')] }, { type: 'basic', - from: { key_code: 'c', modifiers: { mandatory: ['control'], optional: ['caps_lock'] } }, - to: [{ key_code: 'q', modifiers: ['command'] }], - conditions: [{ type: 'variable_if', name: 'C-x', value: 1 }], + from: {key_code: 'd', modifiers: withCtrlOrCapsLock()}, + to: [{key_code: 'i', modifiers: ['command', 'option']}], + conditions: [ifCxActive(), unlessEmacs(), ifApp('^org\\.mozilla\\.firefox$', '^com\\.apple\\.Safari$')], }, // No point in opening files in browsers, better to focus the location bar. { type: 'basic', - from: { key_code: 'f', modifiers: { mandatory: ['control'], optional: ['caps_lock'] } }, - to: [{ key_code: 'l', modifiers: ['command'] }], - conditions: [{ type: 'variable_if', name: 'C-x', value: 1 }, ifBrowser], + from: {key_code: 'f', modifiers: withCtrlOrCapsLock()}, + to: [{key_code: 'l', modifiers: ['command']}], + conditions: [ifCxActive(), ifBrowser()], }, { type: 'basic', - from: { key_code: 'f', modifiers: { mandatory: ['control'], optional: ['caps_lock'] } }, - to: [{ key_code: 'o', modifiers: ['command'] }], - conditions: [{ type: 'variable_if', name: 'C-x', value: 1 }, unlessBrowser], + from: {key_code: 'f', modifiers: withCtrlOrCapsLock()}, + to: [{key_code: 'o', modifiers: ['command']}], + conditions: [ifCxActive(), unlessBrowser()], }, { type: 'basic', - from: { key_code: 'h', modifiers: { mandatory: ['control'], optional: ['caps_lock'] } }, - to: [{ key_code: 'a', modifiers: ['command'] }], - conditions: [{ type: 'variable_if', name: 'C-x', value: 1 }], + from: {key_code: 'n', modifiers: withCtrlOrCapsLock()}, + to: [{key_code: 'n', modifiers: ['command']}], + conditions: [ifCxActive(), unlessBrowser(), unlessEmacs()], }, { type: 'basic', - from: { key_code: 'k', modifiers: { mandatory: ['control'], optional: ['caps_lock'] } }, - to: [{ key_code: 'w', modifiers: ['command'] }], - conditions: [{ type: 'variable_if', name: 'C-x', value: 1 }], + from: {key_code: 'n', modifiers: withCtrlOrCapsLock()}, + to: [{key_code: 't', modifiers: ['command']}], + conditions: [ifCxActive(), ifBrowser(), unlessEmacs()], }, { type: 'basic', - from: { key_code: 'r', modifiers: { mandatory: ['control'], optional: ['caps_lock'] } }, - to: [{ key_code: 'r', modifiers: ['command'] }], - conditions: [{ type: 'variable_if', name: 'C-x', value: 1 }, ifBrowser], + from: {key_code: 'h', modifiers: withCtrlOrCapsLock()}, + to: [{key_code: 'a', modifiers: ['command']}], + conditions: [ifCxActive(), unlessEmacs()], }, { type: 'basic', - from: { key_code: 's', modifiers: { mandatory: ['control'], optional: ['caps_lock'] } }, - to: [{ key_code: 's', modifiers: ['command'] }], - conditions: [{ type: 'variable_if', name: 'C-x', value: 1 }], + from: {key_code: 'k', modifiers: withCtrlOrCapsLock()}, + to: [{key_code: 'w', modifiers: ['command']}], + conditions: [ifCxActive(), unlessEmacs()], }, { type: 'basic', - from: { key_code: 'u', modifiers: { mandatory: ['control'], optional: ['caps_lock'] } }, - to: [{ key_code: 'z', modifiers: ['command'] }], - conditions: [{ type: 'variable_if', name: 'C-x', value: 1 }], + from: {key_code: 'o', modifiers: withCtrlOrCapsLock()}, + to: [{key_code: 'grave_accent_and_tilde', modifiers: ['command']}], + conditions: [ifCxActive(), unlessEmacs()], }, - // Ignore other keys after C-x { type: 'basic', - from: { any: 'key_code', modifiers: { optional: ['any'] } }, - conditions: [{ type: 'variable_if', name: 'C-x', value: 1 }], + from: {key_code: 'p', modifiers: withCtrlOrCapsLock()}, + to: [{key_code: 'f', modifiers: ['option', 'command']}], + conditions: [ifCxActive(), unlessEmacs()], + }, + { + type: 'basic', + from: {key_code: 'q', modifiers: withCtrlOrCapsLock()}, + to: [{key_code: 'q', modifiers: ['command']}], + conditions: [ifCxActive(), unlessEmacs()], + }, + { + type: 'basic', + from: {key_code: 'r', modifiers: withCtrlOrCapsLock()}, + to: [{key_code: 'r', modifiers: ['command']}], + conditions: [ifCxActive(), ifBrowser(), unlessEmacs()], + }, + { + type: 'basic', + from: {key_code: 's', modifiers: withCtrlOrCapsLock()}, + to: [{key_code: 's', modifiers: ['command']}], + conditions: [ifCxActive(), unlessEmacs()], + }, + { + type: 'basic', + from: {key_code: 'u', modifiers: withCtrlOrCapsLock()}, + to: [{key_code: 'z', modifiers: ['command']}], + conditions: [ifCxActive(), unlessEmacs()], + }, + { + type: 'basic', + from: {key_code: 'w', modifiers: withCtrlOrCapsLock()}, + to: [{key_code: 's', modifiers: ['command']}], + conditions: [ifCxActive(), unlessEmacs(), unlessBrowser()], + }, + { + type: 'basic', + from: {key_code: '1', modifiers: withCtrlOrCapsLock()}, + to: [{key_code: 'w', modifiers: ['command', 'shift']}], + conditions: [ifCxActive(), unlessEmacs(), unlessFirefox()], + }, + { + type: 'basic', + from: {key_code: '1', modifiers: withCtrlOrCapsLock()}, + to: [{key_code: '1', modifiers: ['option', 'shift']}], + conditions: [ifCxActive(), unlessEmacs(), ifFirefox()], + }, + { + type: 'basic', + from: {key_code: '7', modifiers: withCtrlOrCapsLock()}, + to: [{key_code: '7', modifiers: ['command', 'shift']}], + conditions: [ifCxActive(), unlessEmacs(), unlessFirefox()], + }, + { + type: 'basic', + from: {key_code: '7', modifiers: withCtrlOrCapsLock()}, + to: [{key_code: '7', modifiers: ['option', 'shift']}], + conditions: [ifCxActive(), unlessEmacs(), ifFirefox()], + }, + { + type: 'basic', + from: {key_code: '8', modifiers: withCtrlOrCapsLock()}, + to: [{key_code: '8', modifiers: ['command', 'shift']}], + conditions: [ifCxActive(), unlessEmacs(), unlessFirefox()], + }, + { + type: 'basic', + from: {key_code: '8', modifiers: withCtrlOrCapsLock()}, + to: [{key_code: '8', modifiers: ['option', 'shift']}], + conditions: [ifCxActive(), unlessEmacs(), ifFirefox()], + }, + // Ignore other unassigned C-x shortcuts + { + type: 'basic', + from: {any: 'key_code', modifiers: {optional: ['any']}}, + conditions: [ifCxActive()], }, - // C-x { type: 'basic', - from: { key_code: 'x', modifiers: { mandatory: ['control'], optional: ['caps_lock'] } }, - to: [{ set_variable: { name: 'C-x', value: 1 } }], + from: {key_code: 'x', modifiers: withCtrlOrCapsLock()}, + to: [{set_variable: {name: 'C-x', value: 1}}], to_delayed_action: { - to_if_invoked: [{ set_variable: { name: 'C-x', value: 0 } }], - to_if_canceled: [{ set_variable: { name: 'C-x', value: 0 } }], + to_if_invoked: [{set_variable: {name: 'C-x', value: 0}}], + to_if_canceled: [{set_variable: {name: 'C-x', value: 0}}], }, - conditions: [unlessEmacs], + conditions: [unlessEmacs()], }, ] } -function controlKeys(unlessEmacs) { - const ifTerminal = { - type: 'frontmost_application_if', - bundle_identifiers: karabiner.bundleIdentifiers.terminal, - } - +function controlKeys() { return [ { type: 'basic', - from: { key_code: 'a', modifiers: { mandatory: ['control'], optional: ['caps_lock', 'shift'] } }, + from: {key_code: 'a', modifiers: {mandatory: ['control'], optional: ['caps_lock', 'shift']}}, to: [ { key_code: 'a', modifiers: ['control'], }, { - set_variable: { name: 'C-spacebar', value: 0 }, + set_variable: clearMark(), }, ], - conditions: [{ type: 'variable_unless', name: 'C-spacebar', value: 1 }, unlessEmacs], + conditions: [unlessMarkActive(), unlessEmacs()], }, { type: 'basic', - from: { key_code: 'a', modifiers: { mandatory: ['control'], optional: ['caps_lock', 'shift'] } }, - to: [{ key_code: 'a', modifiers: ['shift', 'control'] }], - conditions: [{ type: 'variable_if', name: 'C-spacebar', value: 1 }, unlessEmacs], + from: {key_code: 'a', modifiers: {mandatory: ['control'], optional: ['caps_lock', 'shift']}}, + to: [{key_code: 'a', modifiers: ['shift', 'control']}], + conditions: [ifMarkActive(), unlessEmacs()], }, { type: 'basic', - from: { key_code: 'b', modifiers: { mandatory: ['control'], optional: ['caps_lock', 'shift'] } }, - to: [{ key_code: 'b', modifiers: ['control'] }], - conditions: [{ type: 'variable_unless', name: 'C-spacebar', value: 1 }, unlessEmacs], + from: {key_code: 'b', modifiers: {mandatory: ['control'], optional: ['caps_lock', 'shift']}}, + to: [{key_code: 'b', modifiers: ['control']}], + conditions: [unlessMarkActive(), unlessEmacs()], }, { type: 'basic', - from: { key_code: 'b', modifiers: { mandatory: ['control'], optional: ['caps_lock', 'shift'] } }, - to: [{ key_code: 'b', modifiers: ['shift', 'control'] }], - conditions: [{ type: 'variable_if', name: 'C-spacebar', value: 1 }, unlessEmacs], + from: {key_code: 'b', modifiers: {mandatory: ['control'], optional: ['caps_lock', 'shift']}}, + to: [{key_code: 'b', modifiers: ['shift', 'control']}], + conditions: [ifMarkActive(), unlessEmacs()], }, { type: 'basic', - from: { key_code: 'd', modifiers: { mandatory: ['control'], optional: ['caps_lock'] } }, - to: [{ key_code: 'delete_forward' }], - conditions: [unlessEmacs], + from: {key_code: 'd', modifiers: withCtrlOrCapsLock()}, + to: [ + {key_code: 'delete_forward'}, + {set_variable: clearMark()} + ], + conditions: [unlessEmacs()], }, { type: 'basic', - from: { key_code: 'e', modifiers: { mandatory: ['control'], optional: ['caps_lock', 'shift'] } }, + from: {key_code: 'e', modifiers: {mandatory: ['control'], optional: ['caps_lock', 'shift']}}, to: [ { key_code: 'e', modifiers: ['control'], }, { - set_variable: { name: 'C-spacebar', value: 0 }, + set_variable: clearMark(), }, ], - conditions: [{ type: 'variable_unless', name: 'C-spacebar', value: 1 }, unlessEmacs], + conditions: [unlessMarkActive(), unlessEmacs()], }, { type: 'basic', - from: { key_code: 'e', modifiers: { mandatory: ['control'], optional: ['caps_lock', 'shift'] } }, - to: [{ key_code: 'e', modifiers: ['shift', 'control'] }], - conditions: [{ type: 'variable_if', name: 'C-spacebar', value: 1 }, unlessEmacs], + from: {key_code: 'e', modifiers: {mandatory: ['control'], optional: ['caps_lock', 'shift']}}, + to: [{key_code: 'e', modifiers: ['shift', 'control']}], + conditions: [ifMarkActive(), unlessEmacs()], }, { type: 'basic', - from: { key_code: 'f', modifiers: { mandatory: ['control'], optional: ['caps_lock', 'shift'] } }, - - to: [{ key_code: 'f', modifiers: ['control'] }], - conditions: [{ type: 'variable_unless', name: 'C-spacebar', value: 1 }, unlessEmacs], + from: {key_code: 'f', modifiers: {mandatory: ['control'], optional: ['caps_lock', 'shift']}}, + to: [{key_code: 'f', modifiers: ['control']}], + conditions: [unlessMarkActive(), unlessEmacs()], }, { type: 'basic', - from: { key_code: 'f', modifiers: { mandatory: ['control'], optional: ['caps_lock', 'shift'] } }, - to: [{ key_code: 'f', modifiers: ['shift', 'control'] }], - conditions: [{ type: 'variable_if', name: 'C-spacebar', value: 1 }, unlessEmacs], + from: {key_code: 'f', modifiers: {mandatory: ['control'], optional: ['caps_lock', 'shift']}}, + to: [{key_code: 'f', modifiers: ['shift', 'control']}], + conditions: [ifMarkActive(), unlessEmacs()], }, { type: 'basic', - from: { key_code: 'g', modifiers: { mandatory: ['control'], optional: ['caps_lock', 'shift'] } }, + from: {key_code: 'g', modifiers: {mandatory: ['control'], optional: ['caps_lock', 'shift']}}, to: [ { - set_variable: { name: 'C-spacebar', value: 0 }, + set_variable: clearMark(), }, { key_code: 'escape', }, ], - conditions: [unlessEmacs], + conditions: [unlessEmacs()], }, { type: 'basic', - from: { key_code: 'h', modifiers: { mandatory: ['control'], optional: ['caps_lock'] } }, - to: [{ key_code: 'delete_or_backspace' }], - conditions: [unlessEmacs], + from: {key_code: 'n', modifiers: {mandatory: ['control'], optional: ['caps_lock', 'shift']}}, + to: [{key_code: 'n', modifiers: ['control']}], + conditions: [unlessMarkActive(), unlessEmacs(), unlessBrowser()], }, { type: 'basic', - from: { key_code: 'n', modifiers: { mandatory: ['control'], optional: ['caps_lock', 'shift'] } }, - to: [{ key_code: 'n', modifiers: ['control'] }], - conditions: [{ type: 'variable_unless', name: 'C-spacebar', value: 1 }, unlessEmacs], + from: {key_code: 'n', modifiers: {mandatory: ['control'], optional: ['caps_lock', 'shift']}}, + to: [{key_code: 'n', modifiers: ['shift', 'control']}], + conditions: [ifMarkActive(), unlessEmacs(), unlessBrowser()], }, { type: 'basic', - from: { key_code: 'n', modifiers: { mandatory: ['control'], optional: ['caps_lock', 'shift'] } }, - to: [{ key_code: 'n', modifiers: ['shift', 'control'] }], - conditions: [{ type: 'variable_if', name: 'C-spacebar', value: 1 }, unlessEmacs], + from: {key_code: 'n', modifiers: {mandatory: ['control'], optional: ['caps_lock', 'shift']}}, + to: [{key_code: 'down_arrow'}], + conditions: [unlessMarkActive(), unlessEmacs(), ifBrowser()], }, { type: 'basic', - from: { key_code: 'p', modifiers: { mandatory: ['control'], optional: ['caps_lock', 'shift'] } }, - to: [{ key_code: 'p', modifiers: ['control'] }], - conditions: [{ type: 'variable_unless', name: 'C-spacebar', value: 1 }, unlessEmacs], + from: {key_code: 'n', modifiers: {mandatory: ['control'], optional: ['caps_lock', 'shift']}}, + to: [{key_code: 'down_arrow', modifiers: ['shift']}], + conditions: [ifMarkActive(), unlessEmacs(), ifBrowser()], }, { type: 'basic', - from: { key_code: 'p', modifiers: { mandatory: ['control'], optional: ['caps_lock', 'shift'] } }, - to: [{ key_code: 'p', modifiers: ['shift', 'control'] }], - conditions: [{ type: 'variable_if', name: 'C-spacebar', value: 1 }, unlessEmacs], + from: {key_code: 'p', modifiers: {mandatory: ['control'], optional: ['caps_lock', 'shift']}}, + to: [{key_code: 'p', modifiers: ['control']}], + conditions: [unlessMarkActive(), unlessEmacs(), unlessBrowser()], }, { type: 'basic', - from: { key_code: 'r', modifiers: { mandatory: ['control'], optional: ['caps_lock'] } }, - to: [{ key_code: 'f', modifiers: 'command' }], - conditions: [unlessEmacs], + from: {key_code: 'p', modifiers: {mandatory: ['control'], optional: ['caps_lock', 'shift']}}, + to: [{key_code: 'p', modifiers: ['shift', 'control']}], + conditions: [ifMarkActive(), unlessEmacs(), unlessBrowser()], }, { type: 'basic', - from: { key_code: 's', modifiers: { mandatory: ['control'], optional: ['caps_lock'] } }, - to: [{ key_code: 'f', modifiers: 'command' }], - conditions: [unlessEmacs], + from: {key_code: 'p', modifiers: {mandatory: ['control'], optional: ['caps_lock', 'shift']}}, + to: [{key_code: 'up_arrow'}], + conditions: [unlessMarkActive(), unlessEmacs(), ifBrowser()], }, { type: 'basic', - from: { key_code: 'v', modifiers: { mandatory: ['control'], optional: ['caps_lock', 'shift'] } }, + from: {key_code: 'p', modifiers: {mandatory: ['control'], optional: ['caps_lock', 'shift']}}, + to: [{key_code: 'up_arrow', modifiers: ['shift']}], + conditions: [ifMarkActive(), unlessEmacs(), ifBrowser()], + }, + { + type: 'basic', + from: {key_code: 'r', modifiers: withCtrlOrCapsLock()}, + to: [{key_code: 'f', modifiers: 'command'}], + conditions: [unlessEmacs()], + }, + { + type: 'basic', + from: {key_code: 's', modifiers: withCtrlOrCapsLock()}, + to: [{key_code: 'f', modifiers: 'command'}], + conditions: [unlessEmacs()], + }, + { + type: 'basic', + from: {key_code: 'v', modifiers: {mandatory: ['control'], optional: ['caps_lock', 'shift']}}, to: [ { key_code: 'page_down', }, { - set_variable: { name: 'C-spacebar', value: 0 }, + set_variable: clearMark(), }, ], - conditions: [{ type: 'variable_unless', name: 'C-spacebar', value: 1 }, unlessEmacs], + conditions: [unlessMarkActive(), unlessEmacs()], }, { type: 'basic', - from: { key_code: 'v', modifiers: { mandatory: ['control'], optional: ['caps_lock', 'shift'] } }, - to: [{ key_code: 'page_down', modifiers: 'shift' }], - conditions: [{ type: 'variable_if', name: 'C-spacebar', value: 1 }, unlessEmacs], + from: {key_code: 'v', modifiers: {mandatory: ['control'], optional: ['caps_lock', 'shift']}}, + to: [{key_code: 'page_down', modifiers: 'shift'}], + conditions: [ifMarkActive(), unlessEmacs()], }, { type: 'basic', - from: { key_code: 'w', modifiers: { mandatory: ['control'], optional: ['caps_lock', 'shift'] } }, + from: {key_code: 'w', modifiers: {mandatory: ['control'], optional: ['caps_lock', 'shift']}}, to: [ { key_code: 'x', modifiers: ['command'], }, { - set_variable: { name: 'C-spacebar', value: 0 }, + set_variable: clearMark(), }, ], - conditions: [{ type: 'variable_if', name: 'C-spacebar', value: 1 }, unlessEmacs], + conditions: [ifMarkActive(), unlessEmacs()], }, { type: 'basic', from: { key_code: 'y', - modifiers: { mandatory: ['control'], optional: ['caps_lock'] }, + modifiers: withCtrlOrCapsLock(), }, - to: [{ key_code: 'v', modifiers: 'command' }], - conditions: [unlessEmacs], + to: [{key_code: 'v', modifiers: 'command'}], + conditions: [unlessEmacs(), unlessTerminal()], }, { type: 'basic', from: { key_code: 'y', - modifiers: { mandatory: ['control'], optional: ['caps_lock'] }, + modifiers: withCtrlOrCapsLock(), }, to: [ - { key_code: 'v', modifiers: 'command' }, - { key_code: 'y', modifiers: 'command' }, // Terminal pass-through + {key_code: 'v', modifiers: 'command'}, + {key_code: 'y', modifiers: 'command'}, // Terminal pass-through ], - conditions: [ifTerminal], + conditions: [unlessEmacs(), ifTerminal()], }, { type: 'basic', from: { key_code: 'slash', - modifiers: { mandatory: ['control'], optional: ['caps_lock'] }, + modifiers: withCtrlOrCapsLock(), }, - to: [{ key_code: 'z', modifiers: 'command' }], - conditions: [unlessEmacs], + to: [{key_code: 'z', modifiers: 'command'}], + conditions: [unlessEmacs()], }, { type: 'basic', from: { key_code: 'spacebar', - modifiers: { mandatory: ['control'], optional: ['caps_lock', 'shift'] }, + modifiers: {mandatory: ['control'], optional: ['caps_lock', 'shift']}, }, - to: [{ set_variable: { name: 'C-spacebar', value: 1 } }], - conditions: [{ type: 'variable_unless', name: 'C-spacebar', value: 1 }, unlessEmacs], + to: [{set_variable: setMark()}], + conditions: [unlessMarkActive(), unlessEmacs()], }, { type: 'basic', from: { key_code: 'spacebar', - modifiers: { mandatory: ['control'], optional: ['caps_lock', 'shift'] }, + modifiers: {mandatory: ['control'], optional: ['caps_lock', 'shift']}, }, - to: [{ set_variable: { name: 'C-spacebar', value: 0 } }], - conditions: [{ type: 'variable_if', name: 'C-spacebar', value: 1 }, unlessEmacs], + to: [{set_variable: clearMark()}], + conditions: [ifMarkActive(), unlessEmacs()], }, ] } -function optionKeys(unlessEmacs) { - const ifJetbrains = { - type: 'frontmost_application_if', - bundle_identifiers: karabiner.bundleIdentifiers.jetbrainsIDE, - } - const unlessJetbrains = { - type: 'frontmost_application_unless', - bundle_identifiers: karabiner.bundleIdentifiers.jetbrainsIDE, - } - const ifBrowser = { - type: 'frontmost_application_if', - bundle_identifiers: karabiner.bundleIdentifiers.browser, - } - const unlessBrowser = { - type: 'frontmost_application_unless', - bundle_identifiers: karabiner.bundleIdentifiers.browser, - } - +function optionKeys() { return [ { type: 'basic', - from: { key_code: 'f', modifiers: { mandatory: ['option'], optional: ['shift'] } }, - to: [{ key_code: 'right_arrow', modifiers: ['option'] }], - conditions: [unlessEmacs], - }, - { - type: 'basic', - from: { key_code: 'n', modifiers: { mandatory: ['option'], optional: ['any'] } }, - to: [{ key_code: 'n', modifiers: ['command'] }], - conditions: [unlessEmacs, unlessJetbrains, unlessBrowser], + from: {key_code: 'd', modifiers: {mandatory: ['option'], optional: ['shift']}}, + to: [{ + key_code: 'delete_or_backspace', + modifiers: ['fn', 'option'] + }], + conditions: [unlessEmacs()], }, { type: 'basic', - from: { key_code: 'n', modifiers: { mandatory: ['option'], optional: ['any'] } }, - to: [{ key_code: 'n', modifiers: ['command'] }], - conditions: [ifJetbrains], + from: {key_code: 'b', modifiers: {mandatory: ['option'], optional: ['shift']}}, + to: [{ + key_code: 'left_arrow', + modifiers: ['option'] + }], + conditions: [unlessEmacs()], }, { type: 'basic', - from: { key_code: 'n', modifiers: { mandatory: ['option'], optional: ['any'] } }, - to: [{ key_code: 't', modifiers: ['command'] }], - conditions: [ifBrowser], + from: {key_code: 'f', modifiers: {mandatory: ['option'], optional: ['shift']}}, + to: [{key_code: 'right_arrow', modifiers: ['option']}], + conditions: [unlessEmacs()], }, { type: 'basic', - from: { key_code: 't', modifiers: { mandatory: ['option'], optional: ['any'] } }, - to: [{ key_code: 't', modifiers: ['command'] }], - conditions: [ifBrowser], + from: {key_code: 'v', modifiers: {mandatory: ['option'], optional: ['shift']}}, + to: [{key_code: 'page_up'}], + conditions: [unlessEmacs()], }, { type: 'basic', - from: { key_code: 'v', modifiers: { mandatory: ['option'], optional: ['shift'] } }, - to: [{ key_code: 'page_up' }], - conditions: [unlessEmacs], - }, - { - type: 'basic', - from: { key_code: 'w', modifiers: { mandatory: ['option'], optional: ['any'] } }, + from: {key_code: 'w', modifiers: {mandatory: ['option'], optional: ['any']}}, to: [ { key_code: 'c', modifiers: ['command'], }, { - set_variable: { name: 'C-spacebar', value: 0 }, + set_variable: clearMark(), }, ], - conditions: [unlessEmacs], + conditions: [unlessEmacs()], + }, + { + type: 'basic', + from: {key_code: 'comma', modifiers: {mandatory: ['option', 'shift']}}, + to: [{key_code: 'home'}], + conditions: [unlessEmacs()], + }, + { + type: 'basic', + from: {key_code: 'period', modifiers: {mandatory: ['option', 'shift']}}, + to: [{key_code: 'end'}], + conditions: [unlessEmacs()], }, { type: 'basic', - from: { key_code: 'y', modifiers: { mandatory: ['option'], optional: ['any'] } }, - to: [{ key_code: 'v', modifiers: ['command'] }], - conditions: [unlessEmacs], + from: {key_code: 'y', modifiers: {mandatory: ['option'], optional: ['any']}}, + to: [{key_code: 'v', modifiers: ['command']}], + conditions: [unlessEmacs()], }, { type: 'basic', - from: { key_code: 'delete_or_backspace', modifiers: { mandatory: ['option'], optional: ['any'] } }, - to: [{ key_code: 'z', modifiers: ['command'] }], - conditions: [unlessEmacs], + from: {key_code: 'delete_or_backspace', modifiers: {mandatory: ['option'], optional: ['any']}}, + to: [{key_code: 'z', modifiers: ['command']}], + conditions: [unlessEmacs()], }, ] }