I want to set a keyboard shortcut to close the current window in Ubuntu 16.04. I am aware that alt+f4
already does this and that I can redefine this shortcut if I want to, but what I really want is to add an additional shortcut to perform the same function.
The reason being; I have a keyboard without designated function keys (a 60%). Instead the function keys are activated via a keyboard shortcut that toggles the row of number keys between number and function keys (for example 4
to f4
and vice versa).
I am deep in the habit of quickly closing windows using alt+f4
and want it to work regardless of whether I am in function key or number key mode, but can't seem to find what I should enter in the command field when setting a new keyboard shortcut.
I have found a good workaround to my particular problem and posted it in the answers below. Still open to more elegant solutions.
Edit: To clarify, the machine is running X11.