diff options
author | Peter Varga <pvarga@inf.u-szeged.hu> | 2020-01-13 11:22:42 +0100 |
---|---|---|
committer | Peter Varga <pvarga@inf.u-szeged.hu> | 2020-01-15 16:13:49 +0100 |
commit | 9b0be663f82acd2b527615420071ea791cecedc6 (patch) | |
tree | 4844bd4079b10aeb5e013918aa9aea40297cf0fb | |
parent | 7fa87e18e3a1b518ef6b53bd264b7d121a89bbe7 (diff) |
Fix arrow key navigation when shortcuts are set for arrow keys
Fixes: QTBUG-81240
Change-Id: I169307295718ed285c525b82194d30c8197e5d95
Reviewed-by: Jarkko Koivikko <jarkko.koivikko@code-q.fi>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
-rw-r--r-- | src/virtualkeyboard/qvirtualkeyboardinputcontext_p.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/virtualkeyboard/qvirtualkeyboardinputcontext_p.cpp b/src/virtualkeyboard/qvirtualkeyboardinputcontext_p.cpp index 34086ad0..b99b7147 100644 --- a/src/virtualkeyboard/qvirtualkeyboardinputcontext_p.cpp +++ b/src/virtualkeyboard/qvirtualkeyboardinputcontext_p.cpp @@ -511,6 +511,15 @@ bool QVirtualKeyboardInputContextPrivate::filterEvent(const QEvent *event) if (!preeditText.isEmpty()) commit(); } +#ifdef QT_VIRTUALKEYBOARD_ARROW_KEY_NAVIGATION + else if (type == QEvent::ShortcutOverride) { + const QKeyEvent *keyEvent = static_cast<const QKeyEvent *>(event); + int key = keyEvent->key(); + if ((key >= Qt::Key_Left && key <= Qt::Key_Down) || key == Qt::Key_Return) + return true; + } +#endif + return false; } |