From feb790953b30d23cbbcacd89d0972997c4ad9ab9 Mon Sep 17 00:00:00 2001 From: Jarkko Koivikko Date: Thu, 13 Feb 2020 08:51:05 +0200 Subject: Fix the long press function on the symbol mode key - Symbol mode key has a function which allows to select a symbol from symbol page by long press of the key and moving the finger to a key on the symbol page. However, if the finger was not moved away from the symbol key, it simulated a click on the symbol key, causing it to switch back to main layout. The simulated click is is needed for the function keys to allow switching between multiple pages (e.g. the 1/2 key) of symbols without lifting the finger. - Fix this bug by not simulating the click on the symbols key. Task-number: QTBUG-77753 Change-Id: I6795cb1bb40435d0d640ad47543e57db0f356dc9 Reviewed-by: Mitch Curtis --- src/virtualkeyboard/content/components/Keyboard.qml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/virtualkeyboard/content/components/Keyboard.qml b/src/virtualkeyboard/content/components/Keyboard.qml index 347f1076..4557b61f 100644 --- a/src/virtualkeyboard/content/components/Keyboard.qml +++ b/src/virtualkeyboard/content/components/Keyboard.qml @@ -1078,8 +1078,12 @@ Item { InputContext.inputEngine.virtualKeyCancel() setActiveKey(key) press(key, false) - if (dragSymbolMode) - pressAndHoldTimer.restart() + if (dragSymbolMode) { + if (key.functionKey && key.key !== Qt.Key_Context1) + pressAndHoldTimer.restart() + else + pressAndHoldTimer.stop() + } } } } -- cgit v1.2.3