From f07ae780be32ec3362cbe49dadd78c8047449a56 Mon Sep 17 00:00:00 2001 From: Munkyu Im Date: Fri, 25 Nov 2016 13:01:31 +0900 Subject: [PATCH] shortcut: release pressed keys before input H/W keycode when user input shortcut key, the last key sequence is replaced with H/W keycode. So the key combination on guest is twisted. Here is an example. This is key sequence of Menu H/W key: "Crtl + Shift + F6" If user press "F6", this key is not delivered to guest but "keycode 169" is delivered. Finally guest gets "Ctrl + Shift" and "keycode 169". It occurs unexpected behavior on guest side. So, if user want to input H/W keycode with shortcut, all keys pressed should be released before send it. Change-Id: I82e1310af577d1ab43d20e2f5a9362ba2f58e59c Signed-off-by: Munkyu Im --- tizen/src/ui/input/keyboardshortcut.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tizen/src/ui/input/keyboardshortcut.cpp b/tizen/src/ui/input/keyboardshortcut.cpp index a5f598c8a3..101d1ff199 100644 --- a/tizen/src/ui/input/keyboardshortcut.cpp +++ b/tizen/src/ui/input/keyboardshortcut.cpp @@ -96,7 +96,12 @@ void KeyboardShortcut::cancelHwKeyShortcuts(QList &list) void KeyboardShortcut::slotHwKeyShortcut(int keycode) { qDebug() << "shortcut: \"HW key\"" << keycode; - + MainView *mainView = win->getMainView(); + if (mainView) { + mainView->getKbdHelper()->autoKeyRelease(); + } else { + qWarning() << "mainView is not ready."; + } do_hw_key_event(KEY_PRESSED, keycode); do_hw_key_event(KEY_RELEASED, keycode); } -- 2.34.1