The function getKeyState has the next implementation:
// Return key state
bool FXApp::getKeyState(FXuint keysym) const {
#ifdef WIN32
return GetKeyState(keysym)!=0;
#else
KeyCode
keycode=XKeysymToKeycode((Display*)display,keysym);
char keys[32];
if(keycode==NoSymbol) return false;
XQueryKeymap((Display*)display,keys);
return (keys[keycode>>3]>>(keycode&7))&1;
#endif
}
As you see there is no a Keycode translation between
the FOX and the Windows version.
IE: In FOX the left control key has a keycode of
KEY_Control_L = 0xFFE3
But when you pass this to the getKeyState function, it
will not work because in Winsdows it has a different
keycode:
#define VK_LCONTROL 0xA2
It is needed a conversion prior to call the Windows
GetKeyState.