Getting the keyboard state in Linux and OSX
#1
Do Linux and OSX have any function equivalent to the GetKeystate and GetKeyboardState Win32 functions?

I'm looking at tidying up the keyboard handling. At the moment XBMC keeps the state of shift, ctrl, etc by processing the key down and key up messages but this can get confused e.g. alt-Tab in Windows leaves XBMC thinking the Alt key is down. In Windows there's no need to try and keep track of the shift keys because you can get their state at any time and you can put this state in the keysym object before passing it to CApplication::OnEvent. This would allow me to dispense with the CKeyboardStat class completely. However this is only possible if I can get the state of the shift keys in the other operating systems as well.

JR
Reply

Logout Mark Read Team Forum Stats Members Help
Getting the keyboard state in Linux and OSX0