Ubuntu – Keyboard shortcuts not working anymore in xfce

shortcut-keysxfcexubuntu

Although everything was working perfectly well, keyboard shortcuts like Alt+F4, Alt+TAB, etc. have suddenly stopped working in my Xubuntu 14/Xfce4 installation.

Nothing happens if I hit them, and oddly, if I try to close a terminal by Alt+F4, the letters ;3S get written in the console.

Of course, the shortcuts in "Settings>Window Manager>Keyboard" are all correctly configured, and I have checked in xev that the keys are still mapped correctly.

Where could this come from ?

EDIT: I localized the problem: it comes from xmodmap:

I have a .Xmodmap file in my home folder, containing only

keycode  21 = asciicircum dead_grave dead_circumflex dead_grave dead_tilde dead_ogonek dead_tilde
keycode  77 = NoSymbol NoSymbol NoSymbol

(so nothing related to Alt). If I remove it, shortcuts work again. Why ? How could I have both working at the same time ?

Best Answer

This looks like it could be bug #1292290 - Window manager keybindings don't work after reboot. A workaround is mentioned there:

I found a workaround: clear before reassign!

To make a shortcut to work ok, select an action you want to reassign and click 'Clear' button until it will really empty. Sometime if there is some (hidden?) duplicates, you will still see some shortcut (the same or different), even you clicked 'Clear' button. In this case just click the button again. Since the action shortcut is really empty, just assign your custom one as usual, and it will work ok :)

and

Someone on #xubuntu or #ubuntustudio (can't remember) mentioned a workaround for this:

You simply have to delete the current key mapping twice before setting a new one. Then the new mapping will be stored in the config.

Related Question