summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2012-01-25 23:12:39 +0100
committerAndrea Diamantini <adjam7@gmail.com>2012-01-25 23:12:39 +0100
commitb76081e4fb9e70f8012ed83b47451b53e9731e5d (patch)
tree40b1329c67d3b45c27fcbca41c6fa8fe6b3d9e3f
parentaccept CTRL + TAB events (diff)
downloadrekonq-b76081e4fb9e70f8012ed83b47451b53e9731e5d.tar.xz
Access keys handling fixes
Stupid me, I forgot to merge a part from konqueror access keys handling...
-rw-r--r--src/webview.cpp21
1 files changed, 10 insertions, 11 deletions
diff --git a/src/webview.cpp b/src/webview.cpp
index 558f52fc..850229d1 100644
--- a/src/webview.cpp
+++ b/src/webview.cpp
@@ -770,22 +770,21 @@ void WebView::keyReleaseEvent(QKeyEvent *event)
// access keys management
if (ReKonfig::accessKeysEnabled())
{
- m_accessKeysPressed = (event->key() == Qt::Key_Control);
+ if (m_accessKeysPressed && event->key() != Qt::Key_Control)
+ m_accessKeysPressed = false;
- if (!m_accessKeysPressed)
+ if (m_accessKeysPressed && !(event->modifiers() & Qt::ControlModifier))
{
- if (checkForAccessKey(event))
- {
- hideAccessKeys();
- event->accept();
- return;
- }
- hideAccessKeys();
+ kDebug() << "Shotting access keys";
+ QTimer::singleShot(200, this, SLOT(accessKeyShortcut()));
+ event->accept();
+ return;
}
else
{
- kDebug() << "Shotting access keys";
- QTimer::singleShot(200, this, SLOT(accessKeyShortcut()));
+ hideAccessKeys();
+ event->accept();
+ return;
}
}