[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Mapping keyPressEvent() to text
From:       Craig Howard <kde () choward ! ca>
Date:       2005-09-05 17:19:06
Message-ID: 200509051319.07042.kde () choward ! ca
[Download RAW message or body]

I'm writing a GUI for a library and I need to translate key combinations like 
CTRL+Y from the QKeyEvent into the string "<CTRL>y"  

What I'm doing right now is testing the event->keyboardModifier() and adding 
that to the string, then adding event->text().  However, when a key like CTRL 
is down, event->text() for the above CTRL+Y gives me the string "\031", even 
though event->key() == Qt::Key_Y.  

How can I make event->key() and event->text() return the same thing in this 
case?  Thanks.
-- 

Craig Howard
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic