Karabiner-Elements を使っていたのだが Visual Studio Code で有効になり困っていたので入れ直す。
それでしたら frontmost_application_unless でできます!
— Nyoho (@NeXTSTEP2OSX) 2020年11月7日
オフにしたい機能ごとにこういう条件をmanipulatorsに付けるとできます。bundle_identifiersは https://t.co/jNVsPKVqdq.VSCode なので com\\.microsoft\\.VSCode にされるといいと思います。 https://t.co/xZDdfmev0s
で教えていただいたことを元にきれいにインストールした時のメモ。
現状の問題点
macOS 上で Emacs キーバインドが使えるのは良いが、Visual Studio Code で有効になると困る。なぜならば VS Code では別途 Emacs キーバインドが用意されておりそちらを優先したい。
クリーンインストール
- ~/.config/karabiner を別の場所に退避
- Karabiner-Elements 設定 - Misc - Uninstall Karabiner-Eelements
- mac 再起動
- macOS の素の状態を確認
- Ctrl-W は効かない。
- Ctrl-F や Ctrl-B などは効く。これは macOS の機能?
- Visual Studio Code で Ctrl-X Ctrl-F や Ctrl-X B などが効くことを確認。
- Karabiner-Elements を公式サイトからインストール
設定
- 起動
- Version 13.1.0
- Complex Modifications - Add Rule - Import more rules from the Internet
- Emacs key bindings (rev 12) の上4つを有効にする。
追記
number1cruncher.com にある mark region とか ctrl-y を取り込む。 https://github.com/higepon/dotfiles/commit/c912fdd6624354d373426c8dc3d3920658fc4f2e#diff-0dc7a7cc6b2e4051d7e9ecd928e8af90f31115dc774b182451abf6b496ba3762