I used to do in windows:

SHORT key1 = ::GetKeyState(VK_LSHIFT)& 0xF0;

SHORT key2 = ::GetKeyState(VK_RSHIFT)& 0xF0;

SHORT key3 = ::GetKeyState(VK_LCONTROL)& 0xF0;

SHORT key4 = ::GetKeyState(VK_RCONTROL)& 0xF0;


bShift = (key1 != 0) || (key2 != 0);

bCtrl = (key3 != 0) || (key4 != 0);

How to detect if the shift/ctrl keys were pressed in the linux world? Without using GL(it can be pressed not in the graphic window..) or X11.. Is there something general to retrieve it directly form the OS?

Thanks, Vladimir.