From c46531296f71644fc63b988513c80be1aa677a2b Mon Sep 17 00:00:00 2001 From: SamGondelman Date: Tue, 9 Jan 2018 18:28:54 -0800 Subject: [PATCH] move key logic from onClicked to onReleased --- interface/resources/qml/controls-uit/Key.qml | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/interface/resources/qml/controls-uit/Key.qml b/interface/resources/qml/controls-uit/Key.qml index b2c720368d..dd77fc92dc 100644 --- a/interface/resources/qml/controls-uit/Key.qml +++ b/interface/resources/qml/controls-uit/Key.qml @@ -45,18 +45,6 @@ Item { } } - onClicked: { - mouse.accepted = true; - Tablet.playSound(TabletEnums.ButtonClick); - - webEntity.synthesizeKeyPress(glyph); - webEntity.synthesizeKeyPress(glyph, mirrorText); - - if (toggle) { - toggled = !toggled; - } - } - onDoubleClicked: { mouse.accepted = true; } @@ -94,6 +82,14 @@ Item { onReleased: { if (containsMouse) { + Tablet.playSound(TabletEnums.ButtonClick); + + webEntity.synthesizeKeyPress(glyph); + webEntity.synthesizeKeyPress(glyph, mirrorText); + + if (toggle) { + toggled = !toggled; + } keyItem.state = "mouseOver"; } else { if (toggled) {