Is there a way to define an association of a particular physical key of the keyboard to some action, independently of the letter that this key is associated to in any layout? Example: In most default Gnome shortcut key associations, pressing Alt + Ctrl + T opens a terminal. But only in the Latin keyboard layout. Doing the same physical action while in Greek layout does not work, since the associated letter is then the Greek T, not the Latin T.Therefore, one has first to switch to the Latin layout and then press the shortcut key, which may be frustrating since one is never sure if the key has not been pressed correctly at the first place, so probably tries several times until realizing that the problem was in the layout.A solution could be defining the same association for the same key in all layouts one uses - but then one would have to do this for all shortcuts, so this solution does not scale well.
Shortcut keys that are independent to keyboard layout
x11;keyboard shortcuts;keyboard layout;xkb
I often switch between English and Greek layouts and this has been a minor annoyance for a while. Your question pushed me to solve it, so thanks!I found a program that can do this: xbindkeys. The proceedure I followed (adapted from here) was:Install xbindkeys. On my Debian this is done with sudo apt-get install xbindkeysYou should also be able to install easily enough with the equivalent yum install or pacman -S or whatever commands.Create the default settings file:xbindkeys --defaults > `~/.xbindkeysrc`Get the right keycodes for your keys. Run xbindkeys -k and press your desired shortcut. With my keyboard at least (though this should be standard), xbindkeys -k reports that CtrlT ism:0x14 + c:28Control+Mod2 + tCreate the relevant shortcut, add these lines to ~/.xbindkeysrc:xterm m:0x14 + c:28Run xbindkeys. The shortcut now works even in the Greek layout. To make this permanent, add this to your ~/.Xsession:xbindkeysIMPORTANT NOTE:I would recommend not using CtrlT. This method overrides application specific shortcuts so, for example, CtrlT will no longer open a new tab in your browser. Make sure to use key combinations that are not in use elsewhere.