PDA

View Full Version : Determining key pressed regardless of layout



Pyral
23rd May 2014, 04:45
I'm making an onscreen keyboard to show a user's keypresses as they happen. I want to show the correct key being pressed regardless of the user's current keyboard layout. For instance, the 'N' key in qwerty is the 'B' key in dvorak. So pressing the same key with different keyboard layouts will generate events with different key types. Is there a way in Qt to detect the physical key being pressed, regardless of the user's settings?

Lesiok
23rd May 2014, 06:58
How about QKeyEvent::nativeScanCode ?