From ac6bb6b31cf338feb8e9ae53425ec230550d21f9 Mon Sep 17 00:00:00 2001 From: Ji-hoon Lee Date: Wed, 25 Jan 2017 19:23:24 +0900 Subject: [PATCH] Process key events only if the event source is not ime In some profiles such as TV, the libscl-ui processes key events in order to handle remote controller's Arrows/Select keys. But since the remote controller's Select key has the same key value with the Enter key, the Enter key event that was generated by our IME, could be interpreted as remote controller's Select key. So, for preventing this case, we are not going to let libscl-ui to process key events if the key event was generated by ime itself. Change-Id: Ia2719f552adebf1e40a42f19dec924c2f9bb3daf --- src/ise.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ise.cpp b/src/ise.cpp index d0ced22..b7604f5 100644 --- a/src/ise.cpp +++ b/src/ise.cpp @@ -1942,7 +1942,10 @@ void ise_process_key_event(scim::KeyEvent& key, sclu32 &ret) { ret = 0; if (g_ui) { - ret = (sclu32)g_ui->process_key_event(key.get_key_string().c_str()); + /* Process this key event if it was not generated by ime */ + if (key.dev_name.compare("ime") != 0) { + ret = (sclu32)g_ui->process_key_event(key.get_key_string().c_str()); + } } } -- 2.7.4