Macの設定あれこれ¶
キーバインド設定¶
キーボードを打つとき,指の位置は可能な限りホームポジションにおいて置きたいが,back spaceや矢印キーが遠くてついついホームポジションから離れてしまう
これを解決するためにキーバインドの方を変える
キーバインドの変更には
karabiner-elementsを使う
使い方はoffcial Docmentationを見る
日本語記事でスクリプトの書き方がまとめてあるサイトはここ
とりあえず使う分には
open karabiner app
-> complex modifications
-> Add rule
-> import more ...
-> 適当なファイルを選んでimport
でよい.
自分が追加したキーバインドは以下の通り
Ctrl-eisuu
左の操作スペース(ウインドウ)へ (Ctrl ←)
Ctrl-kana
右の操作スペース(ウインドウ)へ (Ctrl →)
この上二つが便利すぎるからみんな使って欲しい
Ctrl-x Ctrl-c
ウインドウを閉じる (command w)
Ctrl-x Ctrl-s
保存 (command s)
Ctrl-f
→
Ctrl-b
←
Ctrl-n
↓
Ctrl-p
↑
Ctrl-j
return
Ctrl-s
検索 (command f)
Ctrl-y
コピー (command c)
Ctrl-y
貼り付け (command v)
Ctrl-_
Undo (command z)
Ctrl-g ctrl-g
Esc
以下に自分の書いたスクリプトを晒す
In [6]:
!cat /Users/fujiie/.config/karabiner/assets/complex_modifications/210420_fujiie.json
{ "title": "My Emacs key bindings 210430", "maintainers": ["fujiie"], "rules": [ ///////////////////////////////////////////////////// // set control-x description ////////////////////////////////////////////////////// { "description": "ctrl-x key list", "manipulators": [ //set C-x C-c to Command-w { "type": "basic", "from": { "key_code": "c", "modifiers": { "mandatory": ["control"], "optional": ["caps_lock"] } }, "to": [ {"key_code": "w", "modifiers": ["command"]} ], "conditions": [ {"type": "variable_if", "name": "C-x", "value": 1} ] }, //set C-x C-s to Command-s { "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} ] }, //set C-x is Control-x { "type": "basic", "from": { "key_code": "x", "modifiers": { "mandatory": ["control"], "optional": ["caps_lock"] } }, "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} } ] }, "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\\.mac$", "^com\\.microsoft\\.rdc\\.macos$", "^com\\.microsoft\\.rdc\\.osx\\.beta$", "^net\\.sf\\.cord$", "^com\\.thinomenon\\.RemoteDesktopConnection$", "^com\\.itap-mobile\\.qmote$", "^com\\.nulana\\.remotixmac$", "^com\\.p5sys\\.jump\\.mac\\.viewer$", "^com\\.p5sys\\.jump\\.mac\\.viewer\\.web$", "^com\\.teamviewer\\.TeamViewer$", "^com\\.vmware\\.horizon$", "^com\\.2X\\.Client\\.Mac$", "^com\\.apple\\.Terminal$", "^com\\.googlecode\\.iterm2$", "^co\\.zeit\\.hyperterm$", "^co\\.zeit\\.hyper$", "^io\\.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\\.", "^org\\.x\\.X11$", "^com\\.apple\\.x11$", "^org\\.macosforge\\.xquartz\\.X11$", "^org\\.macports\\.X11$", "^com\\.sublimetext\\.", "^com\\.microsoft\\.VSCode$" ] } ] }//end of type ]//end of maintainers },//end of description ////////////////////////////////// //set ctrl-key ///////////////////////////////// { "description": "ctrl-key list", "manipulators": [ //set ctrl-f to -> { "type": "basic", "from": { "key_code": "f", "modifiers": { "mandatory": ["control"], "optional": [ "caps_lock", "shift", "option", "command" ] } }, "to": [ {"key_code": "right_arrow"} ], "conditions": [ { "type": "frontmost_application_unless", "bundle_identifiers": [ //"com.apple.Terminal", "^org\\.gnu\\.Emacs$", "^org\\.gnu\\.AquamacsEmacs$", "^org\\.gnu\\.Aquamacs$", "^org\\.pqrs\\.unknownapp.conkeror$", "^com\\.microsoft\\.rdc$", "^com\\.microsoft\\.rdc\\.mac$", "^com\\.microsoft\\.rdc\\.macos$", "^com\\.microsoft\\.rdc\\.osx\\.beta$", "^net\\.sf\\.cord$", "^com\\.thinomenon\\.RemoteDesktopConnection$", "^com\\.itap-mobile\\.qmote$", "^com\\.nulana\\.remotixmac$", "^com\\.p5sys\\.jump\\.mac\\.viewer$", "^com\\.p5sys\\.jump\\.mac\\.viewer\\.web$", "^com\\.teamviewer\\.TeamViewer$", "^com\\.vmware\\.horizon$", "^com\\.2X\\.Client\\.Mac$", "^com\\.apple\\.Terminal$", "^com\\.googlecode\\.iterm2$", "^co\\.zeit\\.hyperterm$", "^co\\.zeit\\.hyper$", "^io\\.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\\.", "^org\\.x\\.X11$", "^com\\.apple\\.x11$", "^org\\.macosforge\\.xquartz\\.X11$", "^org\\.macports\\.X11$", "^com\\.sublimetext\\.", "^com\\.microsoft\\.VSCode$" ] } ] }, //set ctrl-b to <- { "type": "basic", "from": { "key_code": "b", "modifiers": { "mandatory": ["control"], "optional": [ "caps_lock", "shift", "option", "command" ] } }, "to": [ {"key_code": "left_arrow"} ], "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\\.mac$", "^com\\.microsoft\\.rdc\\.macos$", "^com\\.microsoft\\.rdc\\.osx\\.beta$", "^net\\.sf\\.cord$", "^com\\.thinomenon\\.RemoteDesktopConnection$", "^com\\.itap-mobile\\.qmote$", "^com\\.nulana\\.remotixmac$", "^com\\.p5sys\\.jump\\.mac\\.viewer$", "^com\\.p5sys\\.jump\\.mac\\.viewer\\.web$", "^com\\.teamviewer\\.TeamViewer$", "^com\\.vmware\\.horizon$", "^com\\.2X\\.Client\\.Mac$", "^com\\.apple\\.Terminal$", "^com\\.googlecode\\.iterm2$", "^co\\.zeit\\.hyperterm$", "^co\\.zeit\\.hyper$", "^io\\.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\\.", "^org\\.x\\.X11$", //"^com\\.apple\\.x11$", "^org\\.macosforge\\.xquartz\\.X11$", "^org\\.macports\\.X11$", "^com\\.sublimetext\\.", "^com\\.microsoft\\.VSCode$" ] } ] }, //set ctrl-n to down { "type": "basic", "from": { "key_code": "n", "modifiers": { "mandatory": ["control"], "optional": [ "caps_lock", "shift", "option", "command" ] } }, "to": [ {"key_code": "down_arrow"} ], "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\\.mac$", "^com\\.microsoft\\.rdc\\.macos$", "^com\\.microsoft\\.rdc\\.osx\\.beta$", "^net\\.sf\\.cord$", "^com\\.thinomenon\\.RemoteDesktopConnection$", "^com\\.itap-mobile\\.qmote$", "^com\\.nulana\\.remotixmac$", "^com\\.p5sys\\.jump\\.mac\\.viewer$", "^com\\.p5sys\\.jump\\.mac\\.viewer\\.web$", "^com\\.teamviewer\\.TeamViewer$", "^com\\.vmware\\.horizon$", "^com\\.2X\\.Client\\.Mac$", "^com\\.apple\\.Terminal$", "^com\\.googlecode\\.iterm2$", "^co\\.zeit\\.hyperterm$", "^co\\.zeit\\.hyper$", "^io\\.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\\.", "^org\\.x\\.X11$", "^com\\.apple\\.x11$", "^org\\.macosforge\\.xquartz\\.X11$", "^org\\.macports\\.X11$", "^com\\.sublimetext\\.", "^com\\.microsoft\\.VSCode$" ] } ] }, //set ctrl-p to up { "type": "basic", "from": { "key_code": "p", "modifiers": { "mandatory": ["control"], "optional": [ "caps_lock", "shift", "option", "command" ] } }, "to": [ {"key_code": "up_arrow"} ], "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\\.mac$", "^com\\.microsoft\\.rdc\\.macos$", "^com\\.microsoft\\.rdc\\.osx\\.beta$", "^net\\.sf\\.cord$", "^com\\.thinomenon\\.RemoteDesktopConnection$", "^com\\.itap-mobile\\.qmote$", "^com\\.nulana\\.remotixmac$", "^com\\.p5sys\\.jump\\.mac\\.viewer$", "^com\\.p5sys\\.jump\\.mac\\.viewer\\.web$", "^com\\.teamviewer\\.TeamViewer$", "^com\\.vmware\\.horizon$", "^com\\.2X\\.Client\\.Mac$", "^com\\.apple\\.Terminal$", "^com\\.googlecode\\.iterm2$", "^co\\.zeit\\.hyperterm$", "^co\\.zeit\\.hyper$", "^io\\.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\\.", "^org\\.x\\.X11$", "^com\\.apple\\.x11$", "^org\\.macosforge\\.xquartz\\.X11$", "^org\\.macports\\.X11$", "^com\\.sublimetext\\.", "^com\\.microsoft\\.VSCode$" ] } ] }, //set ctrl-j to return { "type": "basic", "from": { "key_code": "j", "modifiers": { "mandatory": ["control"], "optional": [ "caps_lock", "shift", "option", "command" ] } }, "to": [ {"key_code": "return_or_enter"} ], "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\\.mac$", "^com\\.microsoft\\.rdc\\.macos$", "^com\\.microsoft\\.rdc\\.osx\\.beta$", "^net\\.sf\\.cord$", "^com\\.thinomenon\\.RemoteDesktopConnection$", "^com\\.itap-mobile\\.qmote$", "^com\\.nulana\\.remotixmac$", "^com\\.p5sys\\.jump\\.mac\\.viewer$", "^com\\.p5sys\\.jump\\.mac\\.viewer\\.web$", "^com\\.teamviewer\\.TeamViewer$", "^com\\.vmware\\.horizon$", "^com\\.2X\\.Client\\.Mac$", "^com\\.apple\\.Terminal$", "^com\\.googlecode\\.iterm2$", "^co\\.zeit\\.hyperterm$", "^co\\.zeit\\.hyper$", "^io\\.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\\.", "^org\\.x\\.X11$", "^com\\.apple\\.x11$", "^org\\.macosforge\\.xquartz\\.X11$", "^org\\.macports\\.X11$", "^com\\.sublimetext\\.", "^com\\.microsoft\\.VSCode$" ] } ] }, /////////////////////////////////// //set ctrl-s to search { "type": "basic", "from": { "key_code": "s", "modifiers": { "mandatory": ["control"], "optional": [ "caps_lock", "shift", "option" ] } }, "to": [ {"key_code": "f", "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\\.mac$", "^com\\.microsoft\\.rdc\\.macos$", "^com\\.microsoft\\.rdc\\.osx\\.beta$", "^net\\.sf\\.cord$", "^com\\.thinomenon\\.RemoteDesktopConnection$", "^com\\.itap-mobile\\.qmote$", "^com\\.nulana\\.remotixmac$", "^com\\.p5sys\\.jump\\.mac\\.viewer$", "^com\\.p5sys\\.jump\\.mac\\.viewer\\.web$", "^com\\.teamviewer\\.TeamViewer$", "^com\\.vmware\\.horizon$", "^com\\.2X\\.Client\\.Mac$", "^com\\.apple\\.Terminal$", "^com\\.googlecode\\.iterm2$", "^co\\.zeit\\.hyperterm$", "^co\\.zeit\\.hyper$", "^io\\.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\\.", "^org\\.x\\.X11$", "^com\\.apple\\.x11$", "^org\\.macosforge\\.xquartz\\.X11$", "^org\\.macports\\.X11$", "^com\\.sublimetext\\.", "^com\\.microsoft\\.VSCode$" ] } ] },//end of type /////////////////////////////////// //set ctrl-y to yunk { "type": "basic", "from": { "key_code": "y", "modifiers": { "mandatory": ["control"], "optional": ["caps_lock"] } }, "to": [ {"key_code": "v", "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\\.mac$", "^com\\.microsoft\\.rdc\\.macos$", "^com\\.microsoft\\.rdc\\.osx\\.beta$", "^net\\.sf\\.cord$", "^com\\.thinomenon\\.RemoteDesktopConnection$", "^com\\.itap-mobile\\.qmote$", "^com\\.nulana\\.remotixmac$", "^com\\.p5sys\\.jump\\.mac\\.viewer$", "^com\\.p5sys\\.jump\\.mac\\.viewer\\.web$", "^com\\.teamviewer\\.TeamViewer$", "^com\\.vmware\\.horizon$", "^com\\.2X\\.Client\\.Mac$", "^com\\.apple\\.Terminal$", "^com\\.googlecode\\.iterm2$", "^co\\.zeit\\.hyperterm$", "^co\\.zeit\\.hyper$", "^io\\.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\\.", "^org\\.x\\.X11$", "^com\\.apple\\.x11$", "^org\\.macosforge\\.xquartz\\.X11$", "^org\\.macports\\.X11$", "^com\\.sublimetext\\.", "^com\\.microsoft\\.VSCode$" ] } ] },//end of type /////////////////////////////////// //set ctrl-_ to undo { "type": "basic", "from": { "key_code": "_", "modifiers": { "mandatory": ["control"], "optional": ["caps_lock"] } }, "to": [ {"key_code": "z", "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\\.mac$", "^com\\.microsoft\\.rdc\\.macos$", "^com\\.microsoft\\.rdc\\.osx\\.beta$", "^net\\.sf\\.cord$", "^com\\.thinomenon\\.RemoteDesktopConnection$", "^com\\.itap-mobile\\.qmote$", "^com\\.nulana\\.remotixmac$", "^com\\.p5sys\\.jump\\.mac\\.viewer$", "^com\\.p5sys\\.jump\\.mac\\.viewer\\.web$", "^com\\.teamviewer\\.TeamViewer$", "^com\\.vmware\\.horizon$", "^com\\.2X\\.Client\\.Mac$", "^com\\.apple\\.Terminal$", "^com\\.googlecode\\.iterm2$", "^co\\.zeit\\.hyperterm$", "^co\\.zeit\\.hyper$", "^io\\.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\\.", "^org\\.x\\.X11$", "^com\\.apple\\.x11$", "^org\\.macosforge\\.xquartz\\.X11$", "^org\\.macports\\.X11$", "^com\\.sublimetext\\.", "^com\\.microsoft\\.VSCode$" ] } ] },//end of type { "type": "basic", "from": { "key_code": "w", "modifiers": { "mandatory": ["control"], "optional": ["caps_lock"] } }, "to": [ {"key_code": "c", "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\\.mac$", "^com\\.microsoft\\.rdc\\.macos$", "^com\\.microsoft\\.rdc\\.osx\\.beta$", "^net\\.sf\\.cord$", "^com\\.thinomenon\\.RemoteDesktopConnection$", "^com\\.itap-mobile\\.qmote$", "^com\\.nulana\\.remotixmac$", "^com\\.p5sys\\.jump\\.mac\\.viewer$", "^com\\.p5sys\\.jump\\.mac\\.viewer\\.web$", "^com\\.teamviewer\\.TeamViewer$", "^com\\.vmware\\.horizon$", "^com\\.2X\\.Client\\.Mac$", "^com\\.apple\\.Terminal$", "^com\\.googlecode\\.iterm2$", "^co\\.zeit\\.hyperterm$", "^co\\.zeit\\.hyper$", "^io\\.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\\.", "^org\\.x\\.X11$", "^com\\.apple\\.x11$", "^org\\.macosforge\\.xquartz\\.X11$", "^org\\.macports\\.X11$", "^com\\.sublimetext\\.", "^com\\.microsoft\\.VSCode$" ] } ] }//end of type ] }, ///////////////////////////////////// //mission control //////////////////////////////////// { "description": "mission control list", "manipulators": [ //ctrl + eisuu -> mission control { "type": "basic", "from": { "key_code": "japanese_eisuu", "modifiers": { "mandatory": ["control"] } }, "to": [ { "key_code": "left_arrow", "modifiers": ["control"] } ] }, // { "type": "basic", "from": { "key_code": "japanese_kana", "modifiers": { "mandatory": ["control"] } }, "to": [ { "key_code": "right_arrow", "modifiers": ["control"] } ] } ] } ] }
In [7]:
!cat /Users/fujiie/.config/karabiner/assets/complex_modifications/Ctrl-g_to_Esc.json
{ "title": "My Emacs key bindings Ctrl-g to Esc", "maintainers": ["fujiie"], "rules": [ { "description": "Ctrl-g Ctrl-g", "manipulators": [ { "type": "basic", "from": { "key_code": "g", "modifiers": { "mandatory": ["control"] } }, "to": [ { "key_code": "escape" } ], "conditions": [ { "type": "variable_if", "name": "left_control_key", "value": 1 } ] }, { "type": "basic", "from": { "key_code": "g", "modifiers": { "mandatory": [ "control" ] } }, "to": [ { "set_variable": { "name": "left_control_key", "value": 1 } }, { "key_code": "left_control" } ], "to_delayed_action": { "to_if_invoked": [ { "set_variable": { "name": "left_control_key", "value": 0 } } ], "to_if_canceled": [ { "set_variable": { "name": "left_control_key", "value": 0 } } ] }, "conditions": [ { "type": "variable_if", "name": "left_control_key", "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\\.mac$", "^com\\.microsoft\\.rdc\\.macos$", "^com\\.microsoft\\.rdc\\.osx\\.beta$", "^net\\.sf\\.cord$", "^com\\.thinomenon\\.RemoteDesktopConnection$", "^com\\.itap-mobile\\.qmote$", "^com\\.nulana\\.remotixmac$", "^com\\.p5sys\\.jump\\.mac\\.viewer$", "^com\\.p5sys\\.jump\\.mac\\.viewer\\.web$", "^com\\.teamviewer\\.TeamViewer$", "^com\\.vmware\\.horizon$", "^com\\.2X\\.Client\\.Mac$", "^com\\.apple\\.Terminal$", "^com\\.googlecode\\.iterm2$", "^co\\.zeit\\.hyperterm$", "^co\\.zeit\\.hyper$", "^io\\.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\\.", "^org\\.x\\.X11$", "^com\\.apple\\.x11$", "^org\\.macosforge\\.xquartz\\.X11$", "^org\\.macports\\.X11$", "^com\\.sublimetext\\.", "^com\\.microsoft\\.VSCode$" ] } ] } ] } ] }
In [1]:
#final update
!date '+%b %d %Y (%a)'
5 23 2021 (日)
In [ ]: