4

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?

cipricus
  • 3,444
  • 2
  • 34
  • 85
Cubiq
  • 1,455

2 Answers2

2

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...

0

Very very old question, but just for reference:

  1. in later Linux/Ubuntu/Kubuntu: Fn+Backspace works as delete just like on OSX

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:

  1. some applications, like in Plasma, have their own editable shortcuts to delete next character (Kate text editor) or to delete files (Dolphin file manager):

enter image description here

enter image description here

  1. There is also the affordable solution to Turn Caps Lock key into delete key (as uppercase can be triggered pressing Shift)

  2. 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

cipricus
  • 3,444
  • 2
  • 34
  • 85