Process key events only if the event source is not ime 28/112028/2
authorJi-hoon Lee <dalton.lee@samsung.com>
Wed, 25 Jan 2017 10:23:24 +0000 (19:23 +0900)
committerJi-hoon Lee <dalton.lee@samsung.com>
Wed, 25 Jan 2017 11:19:20 +0000 (03:19 -0800)
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

index d0ced22..b7604f5 100644 (file)
@@ -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());
+        }
     }
 }