I know there were earlier problems with this in < 4.7.4 Qt versions. has this been resolved?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I don’t know any Qt solution.
However this code should work on both windows (not tested) and x11-based os (works on linux)
On X11 don’t forget to add
-lX11to LIBS in your qmake project file.I don’t exactly know how to do this on OS X. If you need it, take a look at IOHIKeyboard and its’s alphaLock() function. Also check this, especially the function
darwinQueryHIDModifiers.