xbmc/xbmc — pull request #2985 by jhsrennie (2013-07-18 17:18:58+00:00)
Title: Add handling of meta aka command key on OSX

Could some friendly OSX dev try this change.

I think the command key on OSX sets the SDL keysym.mod to KMOD_LMETA (or _RMETA) but I don't have a Mac to test with and neither Windows nor Linux have a key that is the same as the Mac command key. If this works then when you press, for example command-U you should get a log entry looking like:

DEBUG: CApplication::OnKey: meta-u (0x20f055) pressed, action is

I've tried fudging the Windows code that generates the keysym to set the _LMETA flag and it does seem to work. If it works on OSX I can modify the key mapping code to allow cmd-whatever keys to be mapped to XBMC actions.

If it doesn't work that's presumably because when the keypress gets to CKeyboardStat::ProcessKeyDown the keysym.mod bitmask doesn't have the KMOD_LMETA bit set.