I'm used to Apple laptops, on which Function + Backspace is mapped to Delete. I'm also okay with Shift + Backspace.

Is there a way to obtain this? Note, I'm using Xmonad and have some keyboard modifications set up with xmodmap but have very little understanding of how it works.

I've tried xmodmap -e "keycode 22 = BackSpace KP_Delete BackSpace BackSpace", which works in some applications but is ignored by my terminal.

I've seen this question but it seems KDE-specific. I would prefer not to have to use some GUI.


Solution 1:

I don't think this is possible. The function key itself doesn’t sent a key code, it modifies the code that is sent by the key it's pressed in combination with. That is, it's implemented by the keyboard, not the OS. There isn't a function-backspace code on most keyboards.

You can check this on your keyboard using the showkey command. Run showkey as root and try pressing various keys with, and without, the function key.