I'd like to create a shortcut with Ctrl+Backspace or Fn+Backspace or Ctrl+Shift+Backspace which performs a forward delete (the same as the Delete key). I use it (Fn+Backspace) on a Mac and I find it very useful.
Is this feasible?
I'd like to create a shortcut with Ctrl+Backspace or Fn+Backspace or Ctrl+Shift+Backspace which performs a forward delete (the same as the Delete key). I use it (Fn+Backspace) on a Mac and I find it very useful.
Is this feasible?
I don't think this is possible. I tried to do it with xmodmap
, but, apparently, it can't catch Fn, so I tried it with the Ctrl and Ctrl+Shift options.
You can see the current behavior of BackSpace
using:
xmodmap -pke | grep BackSpace
and the output it gives is:
keycode 22 = BackSpace BackSpace BackSpace BackSpace
The different values correspond to the different modifiers:
1st: no modifier
2nd: shift
3rd: ctrl
4th: ctrl-shift
So we would like to change either the 3rd or the 4th value. We can do this by executing:
xmodmap -e "keycode 22 = BackSpace BackSpace Delete BackSpace"
or:
xmodmap -e "keycode 22 = BackSpace BackSpace BackSpace Delete"
respectively, but unfortunately this does not work for me. I think these values are overridden on some deeper level and both Ctrl+Backspace and Ctrl+Shift+Backspace still deletes a word backwards.
So I think you're stuck just using the Delete key...
Very very old question, but just for reference:
In case Fn+Backspace is not working or is not convenient (Fn can be bottom left, backspace top right and two hands are needed) etc:
There is also the affordable solution to Turn Caps Lock key into delete key (as uppercase can be triggered pressing Shift)
in order to create another shortcut for Delete (like Super+Backspace or Shift+Backspace), see this answer (but don't use it simultaneously with settings like at point 2 above!); also, this doesn't seem to work as expected: see this: Remapped Shift+Backspace to Delete works only for some applications, so maybe point 3 is preferable
xdotool
– Pablo Bianchi Nov 21 '19 at 22:49