-rw-r--r-- | libopie2/opieui/okeyconfigwidget.cpp | 7 | ||||
-rw-r--r-- | libopie2/opieui/opieui.pro | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/libopie2/opieui/okeyconfigwidget.cpp b/libopie2/opieui/okeyconfigwidget.cpp index 8967d77..ef6d713 100644 --- a/libopie2/opieui/okeyconfigwidget.cpp +++ b/libopie2/opieui/okeyconfigwidget.cpp @@ -1167,54 +1167,55 @@ void OKeyChooserConfigDialog::keyPressEvent( QKeyEvent* ev ) { int mod, key; Opie::Ui::Private::fixupKeys( key,mod, ev ); /* either we used software keyboard * or we've true support */ if ( !m_virtKey && !ev->key()) { m_virtKey = true; m_keyPair = OKeyPair( key, mod ); }else{ mod = 0; switch( key ) { case Qt::Key_Control: mod = Qt::ControlButton; break; case Qt::Key_Shift: mod = Qt::ShiftButton; break; case Qt::Key_Alt: mod = Qt::AltButton; break; default: break; } - if (mod ) + if (mod ) { m_mod |= mod; - else + key = 0; + }else m_key = key; - if ( ( !mod || m_key ) && !m_timer->isActive() ) + if ( ( !mod || m_key || key ) && !m_timer->isActive() ) m_timer->start( 150, true ); m_keyPair = OKeyPair( m_key, m_mod ); } m_lbl->setText( Opie::Ui::Private::keyToString( m_keyPair ) ); } void OKeyChooserConfigDialog::keyReleaseEvent( QKeyEvent* ev ) { m_timer->stop(); QDialog::keyPressEvent( ev ); if ( ev->isAutoRepeat() ) return; if ( m_virtKey && !ev->key()) { m_virtKey = false; slotTimeUp(); }else { int mod = 0; int key = ev->key(); switch( key ) { diff --git a/libopie2/opieui/opieui.pro b/libopie2/opieui/opieui.pro index 0749f7d..e97e82c 100644 --- a/libopie2/opieui/opieui.pro +++ b/libopie2/opieui/opieui.pro @@ -1,51 +1,53 @@ TEMPLATE = lib CONFIG += qt warn_on DESTDIR = $(OPIEDIR)/lib HEADERS = oclickablelabel.h \ odialog.h \ ofontselector.h \ oimageeffect.h \ + okeyconfigwidget.h \ olistview.h \ opixmapeffect.h \ opopupmenu.h \ opixmapprovider.h \ oselector.h \ oseparator.h \ otabinfo.h \ otabbar.h \ otabwidget.h \ otaskbarapplet.h \ oticker.h \ otimepicker.h \ oversatileview.h \ oversatileviewitem.h \ owait.h SOURCES = oclickablelabel.cpp \ odialog.cpp \ ofontselector.cpp \ oimageeffect.cpp \ + okeyconfigwidget.cpp \ olistview.cpp \ opixmapeffect.cpp \ opopupmenu.cpp \ opixmapprovider.cpp \ oselector.cpp \ oseparator.cpp \ otabbar.cpp \ otabwidget.cpp \ otaskbarapplet.cpp \ oticker.cpp \ otimepicker.cpp \ oversatileview.cpp \ oversatileviewitem.cpp \ owait.cpp include ( big-screen/big-screen.pro ) include ( fileselector/fileselector.pro ) INTERFACES = otimepickerbase.ui TARGET = opieui2 VERSION = 1.8.5 INCLUDEPATH += $(OPIEDIR)/include |