LoginSignup
1
0

【Karabiner】MacのOutlookでEmacsキーバインディング

Last updated at Posted at 2023-08-30

対象読者

  • Emacser
    • (Vimのキーバインディングも同様の手続きでできるはず。シランケド)
  • MacでOutlookを使っている人
  • Karabinerを使っているけどOutlookに反映されなくて(´·ω·`)ショボーンな人

免責

  • Web版/PWA版は本記事の対象外です

Emacs Key bindingsのインポート

注意

  • 既にインポートしている人は必要なし
  • 以下の手順でEmacs Key bindings(rev xx)のxxは最新版(現時点で13)を選択しておけば問題ないはず
手順(クリックして表示)

Karabiner-Elements Settings

Complex Modifications

Add rule

Import more rules from the Internet (Open a web browser)

Emacs key bindings(rev xx)

Enable All

JSONファイルに追記

1.
インポートしたEmacs key bindingsに対応する以下のJSONファイルを開く

~/.config/karabiner/assets/complex_modifications/xxxxxxxxxx.json

  • complex_modificationsディレクトリにはインポートしたルールごとに複数のJSONファイルが存在する。その内、Emacs key bindingsに対応するファイルを開く
  • 個々のJSONファイルはxxxxxxxxxx(10桁の数字).jsonという名前で保存されているため、ファイル名だけで特定するのは難しいはず
  • JSONファイルの冒頭部分に"title": "Emacs key bindings(rev xx)",という記述があるかどうかで判断できる

2.
bundle_identifiersキーのペアであるリストの要素に以下を追記

"^com\\.microsoft\\.Outlook$"

  • リストなので直前の要素の後ろに,を付けるのを忘れずに
"conditions": [
                {
                    "type": "frontmost_application_if",
                    "bundle_identifiers": [
                        "^com\\.microsoft\\.Excel$",
                        "^com\\.microsoft\\.Powerpoint$",
-                       "^com\\.microsoft\\.Word$"
+                       "^com\\.microsoft\\.Word$",
+                       "^com\\.microsoft\\.Outlook$"
                      ]
                  }
              ]

bundle_identifiersキーはこのJSONファイル内で設定されているキーバインドごとに存在するため、Outlookで有効にしたい任意のキーバインドに対して同様の操作を行う(基本的にbundle_identifiersキーが出てくるファイル内の全ての箇所に対して行えばよい)。

3.
ファイルを閉じる

Karabinerを再起動

チェック

Outlookを開く

以下を試す
^ + a (行頭移動)
^ + e (行末移動)
^ + k (kill-line)
etc.

🍺

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0