Some background: I look after the key handling code in the Kodi media centre software, and I've been trying to pin down an obscure bug reported by a user. They have a remote control that emulates a keyboard and for a particular button sends the key combination Ctrl+Shift+Alt+b. The trouble is that the keypress Kodi receives is Ctrl+Shift+Meta+b.
I've discovered this also happens when I press that key combination on the keyboard, and in fact any combination involving shift and Alt does similar things. The common factor seems to be having Shift and Alt pressed simultaneously.
I understand that the Meta key was a modifier key on an old keyboard that is no longer used, but that Ubuntu can be configured to generate Meta keypresses. I wonder if there is a setting somewhere in Ubuntu that is causing the Shift+Alt combination to be sent to X clients as a Meta keypress.
This is with Ubuntu 14.04, and I get the same behaviour in the standard shell and when using the LXDE shell.
Please shout if I've missed out any vital info - I'm a Windows developer and am a bit out of my depth with unix. I haven't gone into the details of the system calls Kodi uses to receive the key presses as I suspect that's more suited to a development site. What I'm primarily interested in is some setting that is user tweakable that might be causing this behaviour.
You can disable this behavior by running the following remap command:
xmodmap -e "keycode 64 = Alt_L"
. This defines Alt as simply Alt, and not Meta when shifted.I've noticed that if I press Shift+Alt+X, the system sees Meta+X, but if I press Alt+Shift+X, the system sees Shift+Alt+X, so pressing Alt first and Shift second can work around the problem.