Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 2

Qt-interest Archive, August 2007
Windows Virtual Key code from QKeyEvent


Message 1 in thread

Hi all - is the OS-dependent virtual key code what is returned by  
QKeyEvent::nativeVirtualKey() ?

Also - is there some way through Qt to get this code from a  
QKeySequence object?  I'd like to avoid making a translation table if  
possible.

Thanks!
-Bruno

--
 [ signature omitted ] 

Message 2 in thread

Bruno Trindade said the following on 09.08.2007 23:06:
> Hi all - is the OS-dependent virtual key code what is returned by
>  QKeyEvent::nativeVirtualKey() ?

http://doc.trolltech.com/4.3/qkeyevent.html#nativeVirtualKey


> Also - is there some way through Qt to get this code from a 
> QKeySequence object?  I'd like to avoid making a translation table
> if possible.

No, there's not. You see, key sequence translation is a very complex 
task, and is not always a 1-1 connection. You can checkout the magic 
which happens on all the different platforms in
     src/gui/kernel/qkeymapper_*.cpp

-- 
 [ signature omitted ] 

Attachment: signature.asc
Description: OpenPGP digital signature