Skip to content

Commit c08febe

Browse files
committed
fix(karabiner): option+delete doesn't work in fzf
fzf doesn't support `option+delete`: junegunn/fzf#1747 but we can map it to `alt-d` to make `option+delete` works.
1 parent 4a18fb9 commit c08febe

File tree

2 files changed

+73
-0
lines changed

2 files changed

+73
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"title": "OPTION+DELETE to work everywhere in the terminal",
3+
"rules": [
4+
{
5+
"description": "Map OPTION+DELETE to OPTION+D (ALT+D)",
6+
"manipulators": [
7+
{
8+
"type": "basic",
9+
"from": {
10+
"key_code": "delete_forward",
11+
"modifiers": {
12+
"mandatory": [
13+
"left_option"
14+
]
15+
}
16+
},
17+
"to": [
18+
{
19+
"key_code": "d",
20+
"modifiers": [
21+
"left_option"
22+
]
23+
}
24+
],
25+
"conditions": [
26+
{
27+
"type": "frontmost_application_if",
28+
"bundle_identifiers": [
29+
"^net\\.kovidgoyal\\.kitty$",
30+
"^com\\.apple\\.Terminal$",
31+
"^com\\.googlecode\\.iterm2$"
32+
]
33+
}
34+
]
35+
}
36+
]
37+
}
38+
]
39+
}

macOS/karabiner/.config/karabiner/karabiner.json

+34
Original file line numberDiff line numberDiff line change
@@ -841,6 +841,40 @@
841841
"type": "basic"
842842
}
843843
]
844+
},
845+
{
846+
"description": "Map OPTION+DELETE to OPTION+D (ALT+D)",
847+
"manipulators": [
848+
{
849+
"conditions": [
850+
{
851+
"bundle_identifiers": [
852+
"^net\\.kovidgoyal\\.kitty$",
853+
"^com\\.apple\\.Terminal$",
854+
"^com\\.googlecode\\.iterm2$"
855+
],
856+
"type": "frontmost_application_if"
857+
}
858+
],
859+
"from": {
860+
"key_code": "delete_forward",
861+
"modifiers": {
862+
"mandatory": [
863+
"left_option"
864+
]
865+
}
866+
},
867+
"to": [
868+
{
869+
"key_code": "d",
870+
"modifiers": [
871+
"left_option"
872+
]
873+
}
874+
],
875+
"type": "basic"
876+
}
877+
]
844878
}
845879
]
846880
},

0 commit comments

Comments
 (0)