[Qt-interest] Detect keyboard keys?

John Weeks john at wavemetrics.com
Fri Jun 17 02:26:36 CEST 2011


On Jun 16, 2011, at 3:30 PM, Thiago Macieira wrote:

Thank you, Thiago.

>> Thank you, Nikos. I use that myself. Unfortunately, it doesn't include the
>> caps lock key.
> 
> Because the caps lock being held down isn't a modifier. The Caps Lock state is 
> a modifier, though.

OK. I can see the sense in that.

Since Qt::KeyboardModifier does not contain anything about caps lock, I must assume that setting the caps lock state (presumably by pressing the caps lock key) turns on Qt::ShiftModifier, and Qt doesn't think we need to know that it results from caps lock instead of simply pressing the shift key.

What if I want to test the current state of the 'a' key?

Regards, John Weeks

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110616/3b8f7b45/attachment.html 


More information about the Qt-interest-old mailing list