[Qt-interest] Catching multiple key pressed event

Alexandre Beraud aberaud at infflux.com
Wed Mar 25 10:04:32 CET 2009


Hi,

The use of the StandardKey sequences allows you to make portable code 
that will make use of the usual shortcuts that might vary on the 
different systems.
If you want to test a modifyer like Ctrl then the way you do it is good. 
For more complex key sequences you can also create a QKeySequence object 
directly and define the keys you want to put in it.

Regards,

Alex


ri at eeda.denso.co.jp a écrit :
> OK I figured this out.
> like:
> QKeyEvent *event
> if( ( event->modifiers() == Qt::ModifierXXX ) &&
> (event->key() == Qt::Key_YYY) )
> {
> // do my stuff
> }
> just want to share with others
>
> ------------------------------------------------------------------------
> *From:* qt-interest-bounces at trolltech.com 
> [mailto:qt-interest-bounces at trolltech.com] *On Behalf Of 
> *ri at eeda.denso.co.jp
> *Sent:* Wednesday, March 25, 2009 2:52 PM
> *To:* qt-interest at trolltech.com
> *Subject:* Re: [Qt-interest] Catching multiple key pressed event
>
> matches <outbind://47/qkeyevent.html#matches> ( 
> QKeySequence::StandardKey) is available for me
> for example QKeySequence::New is Ctrl + N
> but can I customized the actual key-bindings?
>
> ------------------------------------------------------------------------
> *From:* 黎 新懿
> *Sent:* Wednesday, March 25, 2009 2:39 PM
> *To:* 'qt-interest at trolltech.com'
> *Subject:* Catching multiple key pressed event
>
> Hi list
> Is it possible to catch multiple key pressed event in a keyPressEvent() ??
> If yes how?
> Thanks!
> ------------------------------------------------------------------------
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>   


-- 
BERAUD Alexandre
Ingénieur Développement

Infflux - Informatique & Flux
Tel: 01 49 57 92 00 - Fax : 01 49 57 92 01
Mail: aberaud at infflux.com
Visitez notre site :  www.infflux.com





More information about the Qt-interest-old mailing list