Skip to content

Instantly share code, notes, and snippets.

@hnakamur
Last active February 28, 2023 14:14
Show Gist options
  • Save hnakamur/8ea71c8a724da2194345668fa754a0c6 to your computer and use it in GitHub Desktop.
Save hnakamur/8ea71c8a724da2194345668fa754a0c6 to your computer and use it in GitHub Desktop.
Karabiner-Elements complex modifications takezo + ctrl-k for Microsoft 365
--- 1677487639.json 2023-02-27 17:51:03
+++ with-ctrl-k.json 2023-02-27 17:54:54
@@ -919,6 +919,42 @@
{
"type": "basic",
"from": {
+ "key_code": "k",
+ "modifiers": {
+ "mandatory": [
+ "control"
+ ],
+ "optional": [
+ "caps_lock",
+ "shift"
+ ]
+ }
+ },
+ "to": [
+ {
+ "key_code": "end",
+ "modifiers": [
+ "shift"
+ ]
+ },
+ {
+ "key_code": "delete_forward"
+ }
+ ],
+ "conditions": [
+ {
+ "type": "frontmost_application_if",
+ "bundle_identifiers": [
+ "^com\\.microsoft\\.Excel$",
+ "^com\\.microsoft\\.Powerpoint$",
+ "^com\\.microsoft\\.Word$"
+ ]
+ }
+ ]
+ },
+ {
+ "type": "basic",
+ "from": {
"key_code": "a",
"modifiers": {
"mandatory": [
@hnakamur
Copy link
Author

使い方

  1. MacのMicrosoft Office製品でEmacsライクなキーバインドを実現する - Qiitaを参考に Emacs key bindings (rev 12) (maintained by @takezo をimportします。
  2. ~/.config/karabiner/assets/complex_modifications/1677487639.json (数字は異なるかもしれません)に上記の差分を反映します。
  3. Karabiner-Elementsの設定画面の Complex Modifications でimportして作られた設定を一旦全てゴミ箱ボタンを押して消します。
  4. Add rule ボタンを押し、Emacs key bindings (rev 12) の右下にある Enable All ボタンを押します。

@hnakamur
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment