From: Ji-hoon Lee Date: Fri, 17 Feb 2017 08:05:12 +0000 (+0900) Subject: Send all key events to IMMODULE first and then process when requested X-Git-Tag: submit/tizen/20170217.113316^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cdabd84fef149387e8fe285ccb660f518b23ab40;p=platform%2Fcore%2Fuifw%2Fisf.git Send all key events to IMMODULE first and then process when requested The previous implementation had whitelist of key events that could be sent to IMMODULE, and other key events were sent to IMEngine directly. Modified scim_helper to send all key events to IMMODULE, and added code for processing events starting with u/U. Change-Id: Id5df610cfaade917a3cefc20c933da71da0e97b7 --- diff --git a/ism/src/scim_event.cpp b/ism/src/scim_event.cpp index 31d4bba6..ace9a458 100644 --- a/ism/src/scim_event.cpp +++ b/ism/src/scim_event.cpp @@ -300,6 +300,9 @@ scim_string_to_key (KeyEvent &key, const String & str) key.code = p->value; } else if (it->length () >= 6 && (*it)[0] == '0' && ((*it)[1] == 'x' || (*it)[1] == 'X')){ key.code = strtol (it->c_str () + 2, NULL, 16); + } else if (it->length () >= 5 && ((*it)[0] == 'u' || (*it)[0] == 'U')){ + key.code = strtol (it->c_str () + 1, NULL, 16); + key.code |= 0x1000000; } else if (p && p->name && strcmp (p->name, "VoidSymbol") == 0) { key.code = SCIM_KEY_VoidSymbol; } diff --git a/ism/src/scim_helper.cpp b/ism/src/scim_helper.cpp index 00771949..bb3ca9dc 100644 --- a/ism/src/scim_helper.cpp +++ b/ism/src/scim_helper.cpp @@ -1525,27 +1525,7 @@ HelperAgent::send_key_event (int ic, return; } - bool ret = false; - -#if ENABLE_GRAB_KEYBOARD - if (!m_impl->si.null ()) { -#else - if (key.code <= 0x7F || - (key.code >= SCIM_KEY_BackSpace && key.code <= SCIM_KEY_Delete) || - (key.code >= SCIM_KEY_Home && key.code <= SCIM_KEY_Hyper_R)) { - // ascii code and function keys - ret = false; - } else { - ret = true; - } - - if (ret && (!m_impl->si.null ())) { -#endif - ret = m_impl->si->process_key_event (key); - LOGD ("imengine(%s) process key %d return %d", m_impl->si->get_factory_uuid().c_str(), key.code, ret); - } - - if (ret == false && m_impl->socket_active.is_connected ()) { + if (m_impl->socket_active.is_connected ()) { m_impl->send.clear (); m_impl->send.put_command (SCIM_TRANS_CMD_REQUEST); m_impl->send.put_data (m_impl->magic_active);