GLUT Keys with VK Keys


I'm looking for a way to make the GLUT key functions to work simultaneously with VK Keys (GetAsyncKeyState) so the other special keys that GLUT cannot detect such as the Lock keys (Scroll,Num,Caps) will be detected.

Obviously this can be done with just using Win32 VK Keys, but the main focus is cross-platform and other special keys would be OS specific and Windows only for now.

If you want a cross-platform solution, then cross-platform Frameworks like Qt can do this:
* https://doc.qt.io/qt-6/qkeyevent.html#details
* https://doc.qt.io/qt-6/qkeyevent.html#modifiers
* https://doc.qt.io/qt-6/qt.html#KeyboardModifier-enum
* https://doc.qt.io/qt-6/qobject.html#installEventFilter

If you are looking for an equivalent to GetAsyncKeyState() for Linux/Unix (pretty much everything that uses X11), maybe look at:
https://www.x.org/releases/X11R7.7/doc/libX11/XKB/xkblib.html#Determining_Keyboard_State

...or, more love-level:
https://thehackerdiary.wordpress.com/2017/04/21/exploring-devinput-1/
Last edited on
Thanks kilgar, but actually not involving any external library.

And as I mentioned, windows only for now to detect the other special keys.
Last edited on
Topic archived. No new replies allowed.