I use Karabiner to modify backslash to be forward delete. Works great but if I ever need to type a backslash how do I do that?
-
Does the keyboard you are using not have a fn key in order to do a fn+Backspace for a Forward Delete?– agarzaCommented Sep 8, 2022 at 22:40
-
Yes but that needs two hands. I much prefer to have a dedicated forward delete like any full size keyboard including my IMac keyboard.– peter munnCommented Sep 9, 2022 at 8:50
2 Answers
There are a lot of complex_modifications rules for forward delete, I installed both Shift-Delete and Equals + Delete(can be used by one hand).
To use backslash, you need create a customize rule:
Download the JSON file of Equals + Delete.
Edit it with with a plan text editor, remove the block of
delete_or_backspace
, and add replaceequal_sign
withbackslash
.Install and test the rule.
The customized JSON file content:
{
"title": "Equals + Delete to Forward Delete",
"rules": [
{
"description": "Simultaneously press Equals + Del to get a ForwardDel",
"manipulators": [
{
"type": "basic",
"from": {
"simultaneous": [
{
"key_code": "backslash"
}
],
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "delete_forward"
}
]
}
]
}
]
}
I don't know if you figured this out, but I use backslash as forward delete the same way you do, so I wrote this complex mod that maps fn+backslash to backslash as well
{
"title": "Backslash to Forward Delete",
"rules": [
{
"description": "Change backslash to forward delete, fn+backslash to backslash",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "backslash",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "delete_forward"
}
]
},
{
"type": "basic",
"from": {
"key_code": "backslash",
"modifiers": {
"mandatory": [
"fn"
]
}
},
"to": [
{
"key_code": "backslash"
}
]
}
]
}
]
}
Now if I could just figure out why command+delete_forward doesn't delete to the end of the line...