Skip to content

Instantly share code, notes, and snippets.

@kazgoto
Created July 26, 2022 04:15
Show Gist options
  • Save kazgoto/07f26f51568bd5dee53c12666e1bc59d to your computer and use it in GitHub Desktop.
Save kazgoto/07f26f51568bd5dee53c12666e1bc59d to your computer and use it in GitHub Desktop.
macOS の Microsoft Office 向け Karabiner Elements 用 Emacs キーバインド設定(オリジナル https://hattomo.github.io/posts/main/21/q1/0215-karabiner-office/ + Teams追加)
{
"title": "Microsoft Office で Emacs キーバインド",
"rules": [
{
"description": "Microsoft Office で Emacs キーバインド",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "b",
"modifiers": {
"mandatory": [
"control"
]
}
},
"to": [
{
"key_code": "left_arrow"
}
],
"conditions": [
{
"type": "frontmost_application_if",
"bundle_identifiers": [
"^com\\.microsoft\\.Word$",
"^com\\.microsoft\\.Excel$",
"^com\\.microsoft\\.Powerpoint$",
"^com\\.microsoft\\.teams$"
]
}
]
},
{
"type": "basic",
"from": {
"key_code": "f",
"modifiers": {
"mandatory": [
"control"
]
}
},
"to": [
{
"key_code": "right_arrow"
}
],
"conditions": [
{
"type": "frontmost_application_if",
"bundle_identifiers": [
"^com\\.microsoft\\.Word$",
"^com\\.microsoft\\.Excel$",
"^com\\.microsoft\\.Powerpoint$",
"^com\\.microsoft\\.teams$"
]
}
]
},
{
"type": "basic",
"from": {
"key_code": "p",
"modifiers": {
"mandatory": [
"control"
]
}
},
"to": [
{
"key_code": "up_arrow"
}
],
"conditions": [
{
"type": "frontmost_application_if",
"bundle_identifiers": [
"^com\\.microsoft\\.Word$",
"^com\\.microsoft\\.Excel$",
"^com\\.microsoft\\.Powerpoint$",
"^com\\.microsoft\\.teams$"
]
}
]
},
{
"type": "basic",
"from": {
"key_code": "n",
"modifiers": {
"mandatory": [
"control"
]
}
},
"to": [
{
"key_code": "down_arrow"
}
],
"conditions": [
{
"type": "frontmost_application_if",
"bundle_identifiers": [
"^com\\.microsoft\\.Word$",
"^com\\.microsoft\\.Excel$",
"^com\\.microsoft\\.Powerpoint$",
"^com\\.microsoft\\.teams$"
]
}
]
},
{
"type": "basic",
"from": {
"key_code": "a",
"modifiers": {
"mandatory": [
"control"
]
}
},
"to": [
{
"key_code": "home"
}
],
"conditions": [
{
"type": "frontmost_application_if",
"bundle_identifiers": [
"^com\\.microsoft\\.Word$",
"^com\\.microsoft\\.Excel$",
"^com\\.microsoft\\.Powerpoint$",
"^com\\.microsoft\\.teams$"
]
}
]
},
{
"type": "basic",
"from": {
"key_code": "e",
"modifiers": {
"mandatory": [
"control"
]
}
},
"to": [
{
"key_code": "end"
}
],
"conditions": [
{
"type": "frontmost_application_if",
"bundle_identifiers": [
"^com\\.microsoft\\.Word$",
"^com\\.microsoft\\.Excel$",
"^com\\.microsoft\\.Powerpoint$",
"^com\\.microsoft\\.teams$"
]
}
]
},
{
"type": "basic",
"from": {
"key_code": "h",
"modifiers": {
"mandatory": [
"control"
]
}
},
"to": [
{
"key_code": "delete_or_backspace"
}
],
"conditions": [
{
"type": "frontmost_application_if",
"bundle_identifiers": [
"^com\\.microsoft\\.Word$",
"^com\\.microsoft\\.Excel$",
"^com\\.microsoft\\.Powerpoint$",
"^com\\.microsoft\\.teams$"
]
}
]
},
{
"type": "basic",
"from": {
"key_code": "d",
"modifiers": {
"mandatory": [
"control"
]
}
},
"to": [
{
"key_code": "delete_forward"
}
],
"conditions": [
{
"type": "frontmost_application_if",
"bundle_identifiers": [
"^com\\.microsoft\\.Word$",
"^com\\.microsoft\\.Excel$",
"^com\\.microsoft\\.Powerpoint$",
"^com\\.microsoft\\.teams$"
]
}
]
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment