summaryrefslogtreecommitdiff
path: root/libopie2/opieui/okeyconfigwidget.cpp
Side-by-side diff
Diffstat (limited to 'libopie2/opieui/okeyconfigwidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opieui/okeyconfigwidget.cpp7
1 files changed, 4 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
@@ -1175,38 +1175,39 @@ void OKeyChooserConfigDialog::keyPressEvent( QKeyEvent* ev ) {
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;