Initial codes 28/40928/1
authorSungmin Kwak <sungmin.kwak@samsung.com>
Tue, 3 Feb 2015 07:26:17 +0000 (16:26 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Wed, 10 Jun 2015 09:12:39 +0000 (18:12 +0900)
Change-Id: If2c97c958349ffaa4593defc7114c371da301142

AUTHORS [new file with mode: 0644]
CMakeLists.txt [new file with mode: 0644]
LICENSE [new file with mode: 0755]
capi-ui-inputmethod.manifest [new file with mode: 0644]
capi-ui-inputmethod.pc.in [new file with mode: 0644]
include/inputmethod.h [new file with mode: 0755]
include/inputmethod_keydef.h [new file with mode: 0755]
packaging/capi-ui-inputmethod.spec [new file with mode: 0755]
src/inputmethod.cpp [new file with mode: 0644]

diff --git a/AUTHORS b/AUTHORS
new file mode 100644 (file)
index 0000000..6fbb84d
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1,4 @@
+Sungmin Kwak <sungmin.kwak@samsung.com>
+Ji-hoon Lee <dalton.lee@samsung.com>
+Jihoon Kim <jihoon48.kim@samsung.com>
+Jae Yong Lee <jaeyong911.lee@samsung.com>
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644 (file)
index 0000000..cb15238
--- /dev/null
@@ -0,0 +1,136 @@
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+
+SET(project_prefix "capi")
+SET(prefix "/usr")
+SET(version "0.0.1")
+SET(maintainer "Ji-hoon Lee <dalton.lee@samsung.com>")
+SET(description "Input Method APIs")
+SET(service "ui")
+SET(submodule "inputmethod")
+SET(dependents "dlog elementary libscl-core isf")
+
+SET(Services
+        "application"
+        "base"
+        "content"
+        "location"
+        "media"
+        "messaging"
+        "network"
+        "social"
+        "telephony"
+        "system"
+        "ui"
+   )
+
+#FILE(STRINGS config.cfg configs REGEX "^ *[^#]")
+FOREACH(lines ${configs})
+#    MESSAGE(${lines})
+    IF(${lines} MATCHES "([^=]*)=['\"](.*)['\"]")
+        SET(key ${CMAKE_MATCH_1})
+        SET(value ${CMAKE_MATCH_2})
+#        MESSAGE("${key} -> ${value}")
+        SET(${key} "${value}")
+    ENDIF()
+ENDFOREACH(lines ${configs})
+
+LIST(FIND Services ${service} sfind)
+
+IF( ${sfind} EQUAL -1 )
+    MESSAGE(FATAL_ERROR "Service must be one of ")
+    FOREACH( s IN ${Services} )
+        MESSAGE(FATAL_ERROR "[${s}]")
+    ENDFOREACH( s IN ${Services} )
+ENDIF( ${sfind} EQUAL -1 )
+
+SET(fw_name "${project_prefix}-${service}-${submodule}")
+
+PROJECT(${fw_name} CXX)
+
+SET(CMAKE_INSTALL_PREFIX ${prefix})
+SET(PREFIX ${CMAKE_INSTALL_PREFIX})
+SET(VERSION ${version})
+
+SET(INC_DIR include)
+INCLUDE_DIRECTORIES(${INC_DIR})
+
+INCLUDE(FindPkgConfig)
+pkg_check_modules(${fw_name} REQUIRED ${dependents})
+FOREACH(flag ${${fw_name}_CFLAGS})
+    SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
+ENDFOREACH(flag)
+
+SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_CFLAGS} -fPIC -Wall")
+SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -g")
+
+IF("${ARCH}" STREQUAL "arm")
+    ADD_DEFINITIONS("-DTARGET")
+ENDIF("${ARCH}" STREQUAL "arm")
+
+ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
+ADD_DEFINITIONS("-DTIZEN_DEBUG")
+
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib")
+
+aux_source_directory(src SOURCES)
+ADD_LIBRARY(${fw_name} SHARED ${SOURCES})
+
+TARGET_LINK_LIBRARIES(${fw_name} ${${fw_name}_LDFLAGS})
+
+SET_TARGET_PROPERTIES(${fw_name}
+     PROPERTIES
+     VERSION ${FULLVER}
+     SOVERSION ${MAJORVER}
+     CLEAN_DIRECT_OUTPUT 1
+)
+
+INSTALL(TARGETS ${fw_name} DESTINATION lib)
+INSTALL(
+        DIRECTORY ${INC_DIR}/ DESTINATION include
+        FILES_MATCHING
+        PATTERN "*_private.h" EXCLUDE
+        PATTERN "${INC_DIR}/*.h"
+        )
+
+SET(PC_NAME ${fw_name})
+SET(PC_REQUIRED ${pc_dependents})
+SET(PC_LDFLAGS -l${fw_name})
+
+CONFIGURE_FILE(
+    capi-ui-inputmethod.pc.in
+    ${CMAKE_CURRENT_SOURCE_DIR}/${fw_name}.pc
+    @ONLY
+)
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${fw_name}.pc DESTINATION lib/pkgconfig)
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/LICENSE DESTINATION /usr/share/license RENAME capi-ui-inputmethod)
+
+IF(UNIX)
+
+ADD_CUSTOM_TARGET (distclean @echo cleaning for source distribution)
+ADD_CUSTOM_COMMAND(
+        DEPENDS clean
+        COMMENT "distribution clean"
+        COMMAND find
+        ARGS    .
+        -not -name config.cmake -and \(
+        -name tester.c -or
+        -name Testing -or
+        -name CMakeFiles -or
+        -name cmake.depends -or
+        -name cmake.check_depends -or
+        -name CMakeCache.txt -or
+        -name cmake.check_cache -or
+        -name *.cmake -or
+        -name Makefile -or
+        -name core -or
+        -name core.* -or
+        -name gmon.out -or
+        -name install_manifest.txt -or
+        -name *.pc -or
+        -name *~ \)
+        | grep -v TC | xargs rm -rf
+        TARGET  distclean
+        VERBATIM
+)
+
+ENDIF(UNIX)
diff --git a/LICENSE b/LICENSE
new file mode 100755 (executable)
index 0000000..de266fb
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,204 @@
+Copyright (c) 2014 - 2015 Samsung Electronics Co., Ltd. All rights reserved.
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
diff --git a/capi-ui-inputmethod.manifest b/capi-ui-inputmethod.manifest
new file mode 100644 (file)
index 0000000..dfdc35c
--- /dev/null
@@ -0,0 +1,5 @@
+<manifest>
+ <request>
+  <domain name="_"/>
+ </request>
+</manifest>
diff --git a/capi-ui-inputmethod.pc.in b/capi-ui-inputmethod.pc.in
new file mode 100644 (file)
index 0000000..76f4d7e
--- /dev/null
@@ -0,0 +1,14 @@
+# Package Information for pkg-config
+
+prefix=@PREFIX@
+exec_prefix=/usr
+libdir=/usr/lib
+includedir=/usr/include
+
+Name: @PC_NAME@
+Description: @PACKAGE_DESCRIPTION@
+Version: @VERSION@
+Requires: @PC_REQUIRED@
+Libs: -L${libdir} @PC_LDFLAGS@
+Cflags: -I${includedir}
+
diff --git a/include/inputmethod.h b/include/inputmethod.h
new file mode 100755 (executable)
index 0000000..6d5f80e
--- /dev/null
@@ -0,0 +1,706 @@
+/*
+ * Copyright (c) 2014-2015 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __TIZEN_UI_INPUTMETHOD_H__
+#define __TIZEN_UI_INPUTMETHOD_H__
+
+/**
+ * @file inputmethod.h
+ * @brief This file contains inputmethod APIs and related enumeration.
+ */
+
+#include <tizen.h>
+#include "inputmethod_keydef.h"
+
+#include <Ecore_IMF.h>
+#include <Evas.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @addtogroup CAPI_UI_INPUTMETHOD_MODULE
+ * @{
+ */
+
+/**
+ * @brief Enumeration for inputmethod function error.
+ *
+ * @since_tizen 2.4
+ */
+typedef enum
+{
+    INPUTMETHOD_ERROR_NONE = TIZEN_ERROR_NONE, /**< Successful */
+    INPUTMETHOD_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory */
+    INPUTMETHOD_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid parameter */
+    INPUTMETHOD_ERROR_OPERATION_FAILED = TIZEN_ERROR_UI_CLASS | 0x0001, /**< Operation failed */
+} inputmethod_error_e;
+
+/**
+ * @brief Enumeration of the option window type.
+ *
+ * @since_tizen 2.4
+ */
+typedef enum
+{
+    INPUTMETHOD_OPTION_WINDOW_TYPE_KEYBOARD,  /**< Open from Keyboard */
+    INPUTMETHOD_OPTION_WINDOW_TYPE_SETTING_APPLICATION, /**< Open from Setting application */
+} inputmethod_option_window_type_e;
+
+/**
+ * @brief Structure of the edit field's input context.
+ *
+ * @details This is one of parameters of inputmethod_show_cb() callback function. IME application
+ * should configure its keyboard panel with this structure information.
+ *
+ * @since_tizen 2.4
+ */
+typedef struct
+{
+    Ecore_IMF_Input_Panel_Layout layout;    /**< Input panel (keyboard) layout types */
+    int layout_variation;                   /**< Layout variation */
+    Ecore_IMF_Input_Panel_Return_Key_Type return_key_type;  /**< "Return" key types */
+    Eina_Bool return_key_disabled;          /**< The state of "Return" key */
+    Ecore_IMF_Autocapital_Type autocapital_type;    /**< Auto capital mode */
+    int cursor_pos;                         /**< Cursor position in edit field */
+    Eina_Bool prediction_allow;             /**< Boolean to allow predictive text */
+    Eina_Bool password_mode;                /**< Password input mode of edit field */
+    int imdata_size;                        /**< The size of application specific data to input panel */
+    Ecore_IMF_Input_Hints input_hint;       /**< Edit field hint */
+    Ecore_IMF_BiDi_Direction bidi_direction;/**< Bidirectional mode */
+    Ecore_IMF_Input_Panel_Lang language;    /**< Preferred input language */
+    unsigned int client_window;             /**< Client application window object */
+} input_context_s;
+
+/**
+ * @brief Called when keyboard is created.
+ *
+ * @since_tizen 2.4
+ *
+ * @pre The callback must be registered using inputmethod_set_primitive_cb().
+ *
+ * @see inputmethod_set_primitive_cb, inputmethod_unset_primitive_cb
+ */
+typedef void (*inputmethod_create_cb)(void);
+
+/**
+ * @brief Called when keyboard is terminated.
+ *
+ * @since_tizen 2.4
+ *
+ * @pre The callback must be registered using inputmethod_set_primitive_cb().
+ *
+ * @see inputmethod_set_primitive_cb, inputmethod_unset_primitive_cb
+ */
+typedef void (*inputmethod_terminate_cb)(void);
+
+/**
+ * @brief Called when keyboard appears.
+ *
+ * @remarks IME application should configure its keyboard panel with #input_context_s structure information.
+ *
+ * @since_tizen 2.4
+ *
+ * @param[in] ic The input context identification value of each client edit field
+ * @param[in] context The input context information
+ *
+ * @pre The callback must be registered using inputmethod_set_primitive_cb().
+ *
+ * @see inputmethod_set_primitive_cb, inputmethod_unset_primitive_cb
+ */
+typedef void (*inputmethod_show_cb)(int ic, input_context_s context);
+
+/**
+ * @brief Called when keyboard information requested.
+ *
+ * @since_tizen 2.4
+ *
+ * @param[in] ic The input context identification value of each client edit field
+ *
+ * @pre The callback must be registered using inputmethod_set_primitive_cb().
+ *
+ * @see inputmethod_set_primitive_cb, inputmethod_unset_primitive_cb
+ */
+typedef void (*inputmethod_hide_cb)(int ic);
+
+/**
+ * @brief Called when the input context has focus.
+ *
+ * @since_tizen 2.4
+ *
+ * @param[in] ic The input context identification value of each client edit field
+ *
+ * @pre The callback must be registered using inputmethod_set_extended_cb().
+ *
+ * @see inputmethod_set_extended_cb, inputmethod_unset_extended_cb
+ */
+typedef void (*inputmethod_focus_in_cb)(int ic);
+
+/**
+ * @brief Called when the input context loses focus.
+ *
+ * @since_tizen 2.4
+ *
+ * @param[in] ic The input context identification value of each client edit field
+ *
+ * @pre The callback must be registered using inputmethod_set_extended_cb().
+ *
+ * @see inputmethod_set_extended_cb, inputmethod_unset_extended_cb
+ */
+typedef void (*inputmethod_focus_out_cb)(int ic);
+
+/**
+ * @brief Called when the surrounding text is requested, asynchronously.
+ *
+ * @since_tizen 2.4
+ *
+ * @param[in] ic The input context identification value of each client edit field
+ * @param[in] text The UTF-8 string requested
+ * @param[in] cursor The cursor position
+ *
+ * @pre The callback must be registered using inputmethod_set_extended_cb().
+ * inputmethod_get_surrounding_text() must be called to invoke this callback, asynchronously.
+ *
+ * @see inputmethod_set_extended_cb, inputmethod_unset_extended_cb, inputmethod_get_surrounding_text
+ */
+typedef void (*inputmethod_update_surrounding_text_cb)(int ic, const char *text, int cursor);
+
+/**
+ * @brief Called to reset input context.
+ *
+ * @since_tizen 2.4
+ *
+ * @pre The callback must be registered using inputmethod_set_extended_cb().
+ *
+ * @see inputmethod_set_extended_cb, inputmethod_unset_extended_cb
+ */
+typedef void (*inputmethod_reset_input_context_cb)(void);
+
+/**
+ * @brief Called when cursor position is updated.
+ *
+ * @since_tizen 2.4
+ *
+ * @param[in] cursor_pos The cursor position
+ *
+ * @pre The callback must be registered using inputmethod_set_extended_cb().
+ *
+ * @see inputmethod_set_extended_cb, inputmethod_unset_extended_cb
+ */
+typedef void (*inputmethod_update_cursor_position_cb)(int cursor_pos);
+
+/**
+ * @brief Called to get input language locale from the input panel.
+ *
+ * @since_tizen 2.4
+ *
+ * @param[out] locale Input panel's current input language code
+ *
+ * @pre The callback must be registered using inputmethod_set_extended_cb().
+ *
+ * @see inputmethod_set_extended_cb, inputmethod_unset_extended_cb
+ */
+typedef void (*inputmethod_get_language_locale_cb)(char **locale);
+
+/**
+ * @brief Called to set the preferred language
+ *
+ * @remarks @language information is already set to the input panel when it is shown
+ * through #input_context_s. This callback function will be only called when the client
+ * application changes the edit field's language attribute after the input panel is shown.
+ *
+ * @since_tizen 2.4
+ *
+ * @param[in] language The preferred language that the client wants
+ *
+ * @pre The callback must be registered using inputmethod_set_extended_cb().
+ *
+ * @see inputmethod_set_extended_cb, inputmethod_unset_extended_cb
+ */
+typedef void (*inputmethod_set_language_cb)(Ecore_IMF_Input_Panel_Lang language);
+
+/**
+ * @brief Called to set the application specific data to deliver to the input panel.
+ *
+ * @details This API is used by applications to deliver specific data to the input panel.
+ * The data format MUST be negotiated by both application and the input panel.
+ *
+ * @since_tizen 2.4
+ *
+ * @param[in] data The specific data to be set to the input panel
+ * @param[in] len The length of data, in bytes, to send to the input panel
+ *
+ * @pre The callback must be registered using inputmethod_set_extended_cb().
+ *
+ * @see inputmethod_set_extended_cb, inputmethod_unset_extended_cb
+ */
+typedef void (*inputmethod_set_imdata_cb)(void *data, unsigned int len);
+
+/**
+ * @brief Called to set the layout of the input panel.
+ *
+ * @remarks @layout information is already set to the input panel when it is shown
+ * through #input_context_s. This callback function will be only called when the client
+ * application changes the edit field's layout attribute after the input panel is shown.
+ *
+ * @since_tizen 2.4
+ *
+ * @param[in] layout The input panel layout
+ *
+ * @pre The callback must be registered using inputmethod_set_extended_cb().
+ *
+ * @see inputmethod_set_extended_cb, inputmethod_unset_extended_cb
+ */
+typedef void (*inputmethod_set_layout_cb)(Ecore_IMF_Input_Panel_Layout layout);
+
+/**
+ * @brief Called to set return key type to the input panel.
+ *
+ * @remarks @type information is already set to the input panel when it is shown
+ * through #input_context_s. This callback function will be only called when the client
+ * application changes the edit field's return key type attribute after the input panel
+ * is shown.
+ *
+ * @since_tizen 2.4
+ *
+ * @param[in] type The type of "return" key on the input panel
+ *
+ * @pre The callback must be registered using inputmethod_set_extended_cb().
+ *
+ * @see inputmethod_set_extended_cb, inputmethod_unset_extended_cb
+ */
+typedef void (*inputmethod_set_return_key_type_cb)(Ecore_IMF_Input_Panel_Return_Key_Type type);
+
+/**
+ * @brief Called to disable or enable return key to the input panel.
+ *
+ * @remarks @disabled information is already set to the input panel when it is shown
+ * through #input_context_s. This callback function will be only called when the client
+ * application changes the edit field's return key disable attribute after the input panel
+ * is shown.
+ *
+ * @since_tizen 2.4
+ *
+ * @param[in] disabled The Boolean state to disable "return" key. The "return" key is enabled by default
+ *
+ * @pre The callback must be registered using inputmethod_set_extended_cb().
+ *
+ * @see inputmethod_set_extended_cb, inputmethod_unset_extended_cb
+ */
+typedef void (*inputmethod_set_return_key_disable_cb)(bool disabled);
+
+/**
+ * @brief Called to get the input panel window geometry.
+ *
+ * @since_tizen 2.4
+ *
+ * @param[in] x The x position in screen
+ * @param[in] y The y position in screen
+ * @param[in] w The window width
+ * @param[in] h The window height
+ *
+ * @pre The callback must be registered using inputmethod_set_extended_cb().
+ *
+ * @see inputmethod_set_extended_cb, inputmethod_unset_extended_cb
+ */
+typedef void (*inputmethod_get_geometry_cb)(int *x, int *y, int *w, int *h);
+
+/**
+ * @brief Called when the system display language is changed.
+ *
+ * @since_tizen 2.4
+ *
+ * @param[in] language The language code
+ *
+ * @pre The callback must be registered using inputmethod_set_extended_cb().
+ *
+ * @see inputmethod_set_extended_cb, inputmethod_unset_extended_cb
+ */
+typedef void (*inputmethod_set_display_language_cb)(const char *language);
+
+/**
+ * @brief Called when the device is rotated.
+ *
+ * @since_tizen 2.4
+ *
+ * @param[in] degree The rotation degree
+ *
+ * @pre The callback must be registered using inputmethod_set_extended_cb().
+ *
+ * @see inputmethod_set_extended_cb, inputmethod_unset_extended_cb
+ */
+typedef void (*inputmethod_set_rotation_degree_cb)(int degree);
+
+/**
+ * @brief Called when Accessibility in Settings application is on or off.
+ *
+ * @since_tizen 2.4
+ *
+ * @pre The callback must be registered using inputmethod_set_extended_cb().
+ *
+ * @see inputmethod_set_extended_cb, inputmethod_unset_extended_cb
+ */
+typedef void (*inputmethod_set_accessibility_state_cb)(bool state);
+
+/**
+ * @brief Called to create keyboard option menu if available.
+ *
+ * @since_tizen 2.4
+ *
+ * @param[in] window The created window object
+ * @param[in] type The type of option window
+ *
+ * @pre The callback must be registered using inputmethod_set_extended_cb().
+ * inputmethod_create_option_window() calls this callback.
+ *
+ * @see inputmethod_set_extended_cb, inputmethod_unset_extended_cb, inputmethod_create_option_window
+ */
+typedef void (*inputmethod_create_option_window_cb)(Evas_Object *window, inputmethod_option_window_type_e type);
+
+/**
+ * @brief Called to destroy keyboard option menu.
+ *
+ * @since_tizen 2.4
+ *
+ * @param[in] window The window object to destroy
+ *
+ * @pre The callback must be registered using inputmethod_set_extended_cb().
+ * inputmethod_destroy_option_window() calls this callback.
+ *
+ * @see inputmethod_set_extended_cb, inputmethod_unset_extended_cb
+ */
+typedef void (*inputmethod_destroy_option_window_cb)(Evas_Object *window);
+
+/**
+ * @brief The structure type to contain the set of callback functions for handling application events.
+ *
+ * @since_tizen 2.4
+ *
+ * @pre The callback must be registered using inputmethod_set_extended_cb().
+ *
+ * @see inputmethod_set_primitive_cb, inputmethod_unset_primitive_cb
+ */
+typedef struct
+{
+    inputmethod_create_cb create;
+    inputmethod_terminate_cb terminate;
+    inputmethod_show_cb show;
+    inputmethod_hide_cb hide;
+} inputmethod_primitive_callback_s;
+
+/**
+ * @brief The structure type to contain the set of callback functions for handling application events.
+ *
+ * @since_tizen 2.4
+ *
+ * @pre It is one of the input parameters of the inputmethod_set_extended_cb() function.
+ *
+ * @see inputmethod_set_extended_cb, inputmethod_unset_extended_cb
+ */
+typedef struct
+{
+    inputmethod_focus_in_cb focus_in;
+    inputmethod_focus_out_cb focus_out;
+    inputmethod_update_surrounding_text_cb update_surrounding_text;
+    inputmethod_reset_input_context_cb reset_input_context;
+    inputmethod_update_cursor_position_cb update_cursor_position;
+    inputmethod_get_language_locale_cb get_language_locale;
+    inputmethod_set_language_cb set_language;
+    inputmethod_set_imdata_cb set_imdata;
+    inputmethod_set_layout_cb set_layout;
+    inputmethod_set_return_key_type_cb set_return_key_type;
+    inputmethod_set_return_key_disable_cb set_return_key_disable;
+    inputmethod_get_geometry_cb get_geometry;
+    inputmethod_set_display_language_cb set_display_language;
+    inputmethod_set_rotation_degree_cb set_rotation_degree;
+    inputmethod_set_accessibility_state_cb set_accessibility_state;
+    inputmethod_create_option_window_cb create_option_window;
+    inputmethod_destroy_option_window_cb destroy_option_window;
+} inputmethod_extended_callback_s;
+
+/**
+ * @brief This function is the main entry point of the Tizen Native IME application.
+ *
+ * @details IME application should implement this function. In this function, the necessary
+ * inputmethod callback functions need to be set by inputmethod_set_primitive_cb() and
+ * inputmethod_set_extended_cb(), then inputmethod_run() must be called to start the main
+ * loop of IME application.
+ *
+ * @remarks The inputmethod_create_cb() callback function is called by inputmethod_run()
+ * before starting the main loop.
+ *
+ * @since_tizen 2.4
+ *
+ * @param[in] argc The argument count
+ * @param[in] argv The argument vector
+ *
+ * @see inputmethod_run, inputmethod_set_primitive_cb, inputmethod_set_extended_cb, inputmethod_unset_primitive_cb, inputmethod_unset_extended_cb
+ * @code
+ static void ime_create_cb(void);
+ static void ime_terminate_cb(void);
+ static void ime_show_cb(int ic, input_context_s context);
+ static void ime_hide_cb(int ic);
+ static void ime_focus_out_cb(int ic);
+ static void ime_focus_in_cb(int ic);
+
+ inputmethod_primitive_callback_s inputmethod_primitive_callback = {
+     ime_create_cb,
+     ime_terminate_cb,
+     ime_show_cb,
+     ime_hide_cb
+ };
+
+ inputmethod_extended_callback_s inputmethod_extended_callback = {
+     ime_focus_in_cb,
+     ime_focus_out_cb,
+     NULL,
+     NULL,
+     NULL,
+     NULL,
+     NULL,
+     NULL,
+     NULL,
+     NULL,
+     NULL,
+     NULL,
+     NULL,
+     NULL,
+     NULL,
+     NULL,
+     NULL
+ };
+
+ void inputmethod_efl_main(int argc, char **argv)
+ {
+     inputmethod_set_primitive_cb(inputmethod_primitive_callback);
+     inputmethod_set_extended_cb(inputmethod_extended_callback);
+
+     inputmethod_run();
+
+     inputmethod_unset_primitive_cb();
+     inputmethod_unset_extended_cb();
+ }
+ * @endcode
+ */
+extern void inputmethod_efl_main(int argc, char **argv);
+
+/**
+ * @brief Registers primitive callback functions to be invoked when the inputmethod state changes.
+ *
+ * @remarks This function must be called before inputmethod_run(). The registered callback
+ * functions can be unregistered by inputmethod_unset_primitive_cb().
+ *
+ * @since_tizen 2.4
+ *
+ * @param[in] callback The callback function to register
+ *
+ * @see inputmethod_unset_primitive_cb
+ */
+EXPORT_API void inputmethod_set_primitive_cb(inputmethod_primitive_callback_s callback);
+
+/**
+ * @brief Unregisters the primitive callback functions.
+ *
+ * @remarks This function must be called after inputmethod_run() and unregisters the callback
+ * functions by inputmethod_set_primitive_cb().
+ *
+ * @since_tizen 2.4
+ *
+ * @see inputmethod_set_primitive_cb
+ */
+EXPORT_API void inputmethod_unset_primitive_cb(void);
+
+/**
+ * @brief Registers extended callback functions to be invoked when the inputmethod state changes.
+ *
+ * @remarks This function must be called before inputmethod_run(). The registered callback
+ * functions can be unregistered by inputmethod_unset_extended_cb().
+ *
+ * @since_tizen 2.4
+ *
+ * @param[in] callback The callback function to register
+ *
+ * @see inputmethod_unset_extended_cb
+ */
+EXPORT_API void inputmethod_set_extended_cb(inputmethod_extended_callback_s callback);
+
+/**
+ * @brief Unregisters the extended callback function.
+ *
+ * @remarks This function must be called after inputmethod_run() and unregisters the callback
+ * functions by inputmethod_set_extended_cb().
+ *
+ * @since_tizen 2.4
+ *
+ * @see inputmethod_set_extended_cb
+ */
+EXPORT_API void inputmethod_unset_extended_cb(void);
+
+/**
+ * @brief Runs the main loop.
+ *
+ * @details This function should be called just after all necessary callback functions are set by
+ * inputmethod_set_primitive_cb() and inputmethod_set_extended_cb(). Then inputmethod_create_cb()
+ * callback function will be called to initialize and inputmethod_terminate_cb() callback function
+ * will be called when IME application is terminated.
+ *
+ * @since_tizen 2.4
+ *
+ * @see inputmethod_create_cb, inputmethod_terminate_cb, inputmethod_set_primitive_cb, inputmethod_set_extended_cb
+ */
+EXPORT_API void inputmethod_run(void);
+
+/**
+ * @brief Sends a KeyEvent to client application.
+ *
+ * @since_tizen 2.4
+ *
+ * @param[in] keycode The key event to be sent
+ * @param[in] keymask The modifier key mask
+ */
+EXPORT_API void inputmethod_send_key_event(inputmethod_key_code_e keycode, inputmethod_key_mask_e keymask);
+
+/**
+ * @brief Commits a string to client application directly.
+ *
+ * @since_tizen 2.4
+ *
+ * @param[in] str The UTF-8 string to be committed
+ */
+EXPORT_API void inputmethod_commit_string(const char *str);
+
+/**
+ * @brief Requests to show preedit string.
+ *
+ * @since_tizen 2.4
+ *
+ * @see inputmethod_hide_preedit_string, inputmethod_update_preedit_string
+ */
+EXPORT_API void inputmethod_show_preedit_string(void);
+
+/**
+ * @brief Requests to hide preedit string.
+ *
+ * @since_tizen 2.4
+ *
+ * @see inputmethod_show_preedit_string, inputmethod_update_preedit_string
+ */
+EXPORT_API void inputmethod_hide_preedit_string(void);
+
+/**
+ * @brief Updates a new preedit string.
+ *
+ * @since_tizen 2.4
+ *
+ * @param[in] str The UTF-8 string to be updated in preedit
+ *
+ * @see inputmethod_show_preedit_string, inputmethod_hide_preedit_string
+ */
+EXPORT_API void inputmethod_update_preedit_string(const char *str);
+
+/**
+ * @brief Requests to get surrounding text, asynchronously.
+ *
+ * @since_tizen 2.4
+ *
+ * @param[in] maxlen_before The maximum length of context string to be retrieved before the cursor
+ * @param[in] maxlen_after The maximum length of context string to be retrieved after the cursor
+ *
+ * @post inputmethod_update_surrounding_text_cb() callback function will be called with the requested text.
+ *
+ * @see inputmethod_delete_surrounding_text, inputmethod_update_surrounding_text_cb
+ */
+EXPORT_API void inputmethod_get_surrounding_text(int maxlen_before, int maxlen_after);
+
+/**
+ * @brief Requests to delete surrounding text.
+ *
+ * @since_tizen 2.4
+ *
+ * @param[in] offset The offset for cursor position
+ * @param[in] len The length for delete text
+ *
+ * @see inputmethod_get_surrounding_text
+ */
+EXPORT_API void inputmethod_delete_surrounding_text(int offset, int len);
+
+/**
+ * @brief This API returns the pointer to main keyboard window
+ *
+ * @since_tizen 2.4
+ *
+ * @return The keyboard main window object on success, otherwise NULL
+ */
+EXPORT_API Evas_Object* inputmethod_get_main_window(void);
+
+/**
+ * @brief This API updates the keyboard window's geometry information
+ *
+ * @since_tizen 2.4
+ *
+ * @param[in] portrait_width The width in portrait mode
+ * @param[in] portrait_height The height in portrait mode
+ * @param[in] landscape_width The width in landscape mode
+ * @param[in] landscape_height The height in landscape mode
+ */
+EXPORT_API void inputmethod_set_size_hints(int portrait_width, int portrait_height, int landscape_width, int landscape_height);
+
+/**
+ * @brief Requests to create an option window
+ *
+ * @details The input panel can call this function to open the option window. This
+ * function calls inputmethod_create_option_window_cb() callback function with
+ * #INPUTMETHOD_OPTION_WINDOW_TYPE_KEYBOARD parameter.
+ *
+ * @since_tizen 2.4
+ *
+ * @return The option window on success, otherwise NULL
+ *
+ * @post inputmethod_destroy_option_window() function can be called to close the
+ * option window.
+ *
+ * @see inputmethod_destroy_option_window, inputmethod_create_option_window_cb
+ */
+EXPORT_API Evas_Object* inputmethod_create_option_window(void);
+
+/**
+ * @brief Requests to destroy an option window
+ *
+ * @details The input panel can call this function to close the option window which
+ * is created from both the input panel and Settings application.
+ *
+ * @since_tizen 2.4
+ *
+ * @param[in] window The option window to destroy
+ *
+ * @post This function calls inputmethod_destroy_option_window_cb() callback function
+ * to destroy the option window.
+ *
+ * @see inputmethod_create_option_window, inputmethod_destroy_option_window_cb
+ */
+EXPORT_API void inputmethod_destroy_option_window(Evas_Object *window);
+
+/**
+ * @}
+ */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // __TIZEN_UI_INPUTMETHOD_H__
+
diff --git a/include/inputmethod_keydef.h b/include/inputmethod_keydef.h
new file mode 100755 (executable)
index 0000000..b758404
--- /dev/null
@@ -0,0 +1,1852 @@
+/*
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __TIZEN_UI_INPUTMETHOD_KEYDEF_H__
+#define __TIZEN_UI_INPUTMETHOD_KEYDEF_H__
+
+/**
+ * @file inputmethod_keydef.h
+ * @brief This file contains key code and mask enumeration.
+ */
+
+/**
+ * @addtogroup CAPI_UI_INPUTMETHOD_MODULE
+ * @{
+ */
+
+/**
+ * @brief Enumeration of the key codes.
+ *
+ * @since_tizen 2.4
+ */
+typedef enum
+{
+    INPUTMETHOD_KEY_BackSpace                          = 0xFF08,    /* back space, back char */
+    INPUTMETHOD_KEY_Tab                                = 0xFF09,
+    INPUTMETHOD_KEY_Linefeed                           = 0xFF0A,    /* Linefeed, LF */
+    INPUTMETHOD_KEY_Clear                              = 0xFF0B,
+    INPUTMETHOD_KEY_Return                             = 0xFF0D,    /* Return, enter */
+    INPUTMETHOD_KEY_Pause                              = 0xFF13,    /* Pause, hold */
+    INPUTMETHOD_KEY_Scroll_Lock                        = 0xFF14,
+    INPUTMETHOD_KEY_Sys_Req                            = 0xFF15,
+    INPUTMETHOD_KEY_Escape                             = 0xFF1B,
+    INPUTMETHOD_KEY_Delete                             = 0xFFFF,    /* Delete, rubout */
+
+    /* International & multi-key character composition */
+    INPUTMETHOD_KEY_Multi_key                          = 0xFF20,    /* Multi-key character compose */
+    INPUTMETHOD_KEY_Codeinput                          = 0xFF37,
+    INPUTMETHOD_KEY_SingleCandidate                    = 0xFF3C,
+    INPUTMETHOD_KEY_MultipleCandidate                  = 0xFF3D,
+    INPUTMETHOD_KEY_PreviousCandidate                  = 0xFF3E,
+
+    /* Japanese keyboard support */
+    INPUTMETHOD_KEY_Kanji                              = 0xFF21,    /* Kanji, Kanji convert */
+    INPUTMETHOD_KEY_Muhenkan                           = 0xFF22,    /* Cancel Conversion */
+    INPUTMETHOD_KEY_Henkan_Mode                        = 0xFF23,    /* Start/Stop Conversion */
+    INPUTMETHOD_KEY_Henkan                             = 0xFF23,    /* Alias for Henkan_Mode */
+    INPUTMETHOD_KEY_Romaji                             = 0xFF24,    /* to Romaji */
+    INPUTMETHOD_KEY_Hiragana                           = 0xFF25,    /* to Hiragana */
+    INPUTMETHOD_KEY_Katakana                           = 0xFF26,    /* to Katakana */
+    INPUTMETHOD_KEY_Hiragana_Katakana                  = 0xFF27,    /* Hiragana/Katakana toggle */
+    INPUTMETHOD_KEY_Zenkaku                            = 0xFF28,    /* to Zenkaku */
+    INPUTMETHOD_KEY_Hankaku                            = 0xFF29,    /* to Hankaku */
+    INPUTMETHOD_KEY_Zenkaku_Hankaku                    = 0xFF2A,    /* Zenkaku/Hankaku toggle */
+    INPUTMETHOD_KEY_Touroku                            = 0xFF2B,    /* Add to Dictionary */
+    INPUTMETHOD_KEY_Massyo                             = 0xFF2C,    /* Delete from Dictionary */
+    INPUTMETHOD_KEY_Kana_Lock                          = 0xFF2D,    /* Kana Lock */
+    INPUTMETHOD_KEY_Kana_Shift                         = 0xFF2E,    /* Kana Shift */
+    INPUTMETHOD_KEY_Eisu_Shift                         = 0xFF2F,    /* Alphanumeric Shift */
+    INPUTMETHOD_KEY_Eisu_toggle                        = 0xFF30,    /* Alphanumeric toggle */
+    INPUTMETHOD_KEY_Kanji_Bangou                       = 0xFF37,    /* Codeinput */
+    INPUTMETHOD_KEY_Zen_Koho                           = 0xFF3D,    /* Multiple/All Candidate(s) */
+    INPUTMETHOD_KEY_Mae_Koho                           = 0xFF3E,    /* Previous Candidate */
+
+    /* Cursor control & motion */
+    INPUTMETHOD_KEY_Home                               = 0xFF50,
+    INPUTMETHOD_KEY_Left                               = 0xFF51,    /* Move left, left arrow */
+    INPUTMETHOD_KEY_Up                                 = 0xFF52,    /* Move up, up arrow */
+    INPUTMETHOD_KEY_Right                              = 0xFF53,    /* Move right, right arrow */
+    INPUTMETHOD_KEY_Down                               = 0xFF54,    /* Move down, down arrow */
+    INPUTMETHOD_KEY_Prior                              = 0xFF55,    /* Prior, previous */
+    INPUTMETHOD_KEY_Page_Up                            = 0xFF55,
+    INPUTMETHOD_KEY_Next                               = 0xFF56,    /* Next */
+    INPUTMETHOD_KEY_Page_Down                          = 0xFF56,
+    INPUTMETHOD_KEY_End                                = 0xFF57,    /* EOL */
+    INPUTMETHOD_KEY_Begin                              = 0xFF58,    /* BOL */
+
+    /* Misc Functions */
+    INPUTMETHOD_KEY_Select                             = 0xFF60,    /* Select, mark */
+    INPUTMETHOD_KEY_Print                              = 0xFF61,
+    INPUTMETHOD_KEY_Execute                            = 0xFF62,    /* Execute, run, do */
+    INPUTMETHOD_KEY_Insert                             = 0xFF63,    /* Insert, insert here */
+    INPUTMETHOD_KEY_Undo                               = 0xFF65,    /* Undo, oops */
+    INPUTMETHOD_KEY_Redo                               = 0xFF66,    /* redo, again */
+    INPUTMETHOD_KEY_Menu                               = 0xFF67,
+    INPUTMETHOD_KEY_Find                               = 0xFF68,    /* Find, search */
+    INPUTMETHOD_KEY_Cancel                             = 0xFF69,    /* Cancel, stop, abort, exit */
+    INPUTMETHOD_KEY_Help                               = 0xFF6A,    /* Help */
+    INPUTMETHOD_KEY_Break                              = 0xFF6B,
+    INPUTMETHOD_KEY_Mode_switch                        = 0xFF7E,    /* Character set switch */
+    INPUTMETHOD_KEY_Num_Lock                           = 0xFF7F,
+
+    /* keypad */
+    INPUTMETHOD_KEY_KP_Space                           = 0xFF80,    /* space */
+    INPUTMETHOD_KEY_KP_Tab                             = 0xFF89,
+    INPUTMETHOD_KEY_KP_Enter                           = 0xFF8D,    /* enter */
+    INPUTMETHOD_KEY_KP_F1                              = 0xFF91,    /* PF1, KP_A, ... */
+    INPUTMETHOD_KEY_KP_F2                              = 0xFF92,
+    INPUTMETHOD_KEY_KP_F3                              = 0xFF93,
+    INPUTMETHOD_KEY_KP_F4                              = 0xFF94,
+    INPUTMETHOD_KEY_KP_Home                            = 0xFF95,
+    INPUTMETHOD_KEY_KP_Left                            = 0xFF96,
+    INPUTMETHOD_KEY_KP_Up                              = 0xFF97,
+    INPUTMETHOD_KEY_KP_Right                           = 0xFF98,
+    INPUTMETHOD_KEY_KP_Down                            = 0xFF99,
+    INPUTMETHOD_KEY_KP_Prior                           = 0xFF9A,
+    INPUTMETHOD_KEY_KP_Page_Up                         = 0xFF9A,
+    INPUTMETHOD_KEY_KP_Next                            = 0xFF9B,
+    INPUTMETHOD_KEY_KP_Page_Down                       = 0xFF9B,
+    INPUTMETHOD_KEY_KP_End                             = 0xFF9C,
+    INPUTMETHOD_KEY_KP_Begin                           = 0xFF9D,
+    INPUTMETHOD_KEY_KP_Insert                          = 0xFF9E,
+    INPUTMETHOD_KEY_KP_Delete                          = 0xFF9F,
+    INPUTMETHOD_KEY_KP_Equal                           = 0xFFBD,    /* equals */
+    INPUTMETHOD_KEY_KP_Multiply                        = 0xFFAA,
+    INPUTMETHOD_KEY_KP_Add                             = 0xFFAB,
+    INPUTMETHOD_KEY_KP_Separator                       = 0xFFAC,    /* separator, often comma */
+    INPUTMETHOD_KEY_KP_Subtract                        = 0xFFAD,
+    INPUTMETHOD_KEY_KP_Decimal                         = 0xFFAE,
+    INPUTMETHOD_KEY_KP_Divide                          = 0xFFAF,
+
+    INPUTMETHOD_KEY_KP_0                               = 0xFFB0,
+    INPUTMETHOD_KEY_KP_1                               = 0xFFB1,
+    INPUTMETHOD_KEY_KP_2                               = 0xFFB2,
+    INPUTMETHOD_KEY_KP_3                               = 0xFFB3,
+    INPUTMETHOD_KEY_KP_4                               = 0xFFB4,
+    INPUTMETHOD_KEY_KP_5                               = 0xFFB5,
+    INPUTMETHOD_KEY_KP_6                               = 0xFFB6,
+    INPUTMETHOD_KEY_KP_7                               = 0xFFB7,
+    INPUTMETHOD_KEY_KP_8                               = 0xFFB8,
+    INPUTMETHOD_KEY_KP_9                               = 0xFFB9,
+
+    /* Auxilliary Functions */
+    INPUTMETHOD_KEY_F1                                 = 0xFFBE,
+    INPUTMETHOD_KEY_F2                                 = 0xFFBF,
+    INPUTMETHOD_KEY_F3                                 = 0xFFC0,
+    INPUTMETHOD_KEY_F4                                 = 0xFFC1,
+    INPUTMETHOD_KEY_F5                                 = 0xFFC2,
+    INPUTMETHOD_KEY_F6                                 = 0xFFC3,
+    INPUTMETHOD_KEY_F7                                 = 0xFFC4,
+    INPUTMETHOD_KEY_F8                                 = 0xFFC5,
+    INPUTMETHOD_KEY_F9                                 = 0xFFC6,
+    INPUTMETHOD_KEY_F10                                = 0xFFC7,
+    INPUTMETHOD_KEY_F11                                = 0xFFC8,
+    INPUTMETHOD_KEY_F12                                = 0xFFC9,
+    INPUTMETHOD_KEY_F13                                = 0xFFCA,
+    INPUTMETHOD_KEY_F14                                = 0xFFCB,
+    INPUTMETHOD_KEY_F15                                = 0xFFCC,
+    INPUTMETHOD_KEY_F16                                = 0xFFCD,
+    INPUTMETHOD_KEY_F17                                = 0xFFCE,
+    INPUTMETHOD_KEY_F18                                = 0xFFCF,
+    INPUTMETHOD_KEY_F19                                = 0xFFD0,
+    INPUTMETHOD_KEY_F20                                = 0xFFD1,
+    INPUTMETHOD_KEY_F21                                = 0xFFD2,
+    INPUTMETHOD_KEY_F22                                = 0xFFD3,
+    INPUTMETHOD_KEY_F23                                = 0xFFD4,
+    INPUTMETHOD_KEY_F24                                = 0xFFD5,
+    INPUTMETHOD_KEY_F25                                = 0xFFD6,
+    INPUTMETHOD_KEY_F26                                = 0xFFD7,
+    INPUTMETHOD_KEY_F27                                = 0xFFD8,
+    INPUTMETHOD_KEY_F28                                = 0xFFD9,
+    INPUTMETHOD_KEY_F29                                = 0xFFDA,
+    INPUTMETHOD_KEY_F30                                = 0xFFDB,
+    INPUTMETHOD_KEY_F31                                = 0xFFDC,
+    INPUTMETHOD_KEY_F32                                = 0xFFDD,
+    INPUTMETHOD_KEY_F33                                = 0xFFDE,
+    INPUTMETHOD_KEY_F34                                = 0xFFDF,
+    INPUTMETHOD_KEY_F35                                = 0xFFE0,
+
+    /* modifier keys */
+    INPUTMETHOD_KEY_Shift_L                            = 0xFFE1,    /* Left shift */
+    INPUTMETHOD_KEY_Shift_R                            = 0xFFE2,    /* Right shift */
+    INPUTMETHOD_KEY_Control_L                          = 0xFFE3,    /* Left control */
+    INPUTMETHOD_KEY_Control_R                          = 0xFFE4,    /* Right control */
+    INPUTMETHOD_KEY_Caps_Lock                          = 0xFFE5,    /* Caps lock */
+    INPUTMETHOD_KEY_Shift_Lock                         = 0xFFE6,    /* Shift lock */
+
+    INPUTMETHOD_KEY_Meta_L                             = 0xFFE7,    /* Left meta */
+    INPUTMETHOD_KEY_Meta_R                             = 0xFFE8,    /* Right meta */
+    INPUTMETHOD_KEY_Alt_L                              = 0xFFE9,    /* Left alt */
+    INPUTMETHOD_KEY_Alt_R                              = 0xFFEA,    /* Right alt */
+    INPUTMETHOD_KEY_Super_L                            = 0xFFEB,    /* Left super */
+    INPUTMETHOD_KEY_Super_R                            = 0xFFEC,    /* Right super */
+    INPUTMETHOD_KEY_Hyper_L                            = 0xFFED,    /* Left hyper */
+    INPUTMETHOD_KEY_Hyper_R                            = 0xFFEE,    /* Right hyper */
+
+    /*
+     * ISO 9995 Function and Modifier Keys
+     * Byte 3 = 0xFE
+     */
+    INPUTMETHOD_KEY_ISO_Lock                           = 0xFE01,
+    INPUTMETHOD_KEY_ISO_Level2_Latch                   = 0xFE02,
+    INPUTMETHOD_KEY_ISO_Level3_Shift                   = 0xFE03,
+    INPUTMETHOD_KEY_ISO_Level3_Latch                   = 0xFE04,
+    INPUTMETHOD_KEY_ISO_Level3_Lock                    = 0xFE05,
+    INPUTMETHOD_KEY_ISO_Group_Shift                    = 0xFF7E,    /* Alias for mode_switch */
+    INPUTMETHOD_KEY_ISO_Group_Latch                    = 0xFE06,
+    INPUTMETHOD_KEY_ISO_Group_Lock                     = 0xFE07,
+    INPUTMETHOD_KEY_ISO_Next_Group                     = 0xFE08,
+    INPUTMETHOD_KEY_ISO_Next_Group_Lock                = 0xFE09,
+    INPUTMETHOD_KEY_ISO_Prev_Group                     = 0xFE0A,
+    INPUTMETHOD_KEY_ISO_Prev_Group_Lock                = 0xFE0B,
+    INPUTMETHOD_KEY_ISO_First_Group                    = 0xFE0C,
+    INPUTMETHOD_KEY_ISO_First_Group_Lock               = 0xFE0D,
+    INPUTMETHOD_KEY_ISO_Last_Group                     = 0xFE0E,
+    INPUTMETHOD_KEY_ISO_Last_Group_Lock                = 0xFE0F,
+
+    INPUTMETHOD_KEY_ISO_Left_Tab                       = 0xFE20,
+    INPUTMETHOD_KEY_ISO_Move_Line_Up                   = 0xFE21,
+    INPUTMETHOD_KEY_ISO_Move_Line_Down                 = 0xFE22,
+    INPUTMETHOD_KEY_ISO_Partial_Line_Up                = 0xFE23,
+    INPUTMETHOD_KEY_ISO_Partial_Line_Down              = 0xFE24,
+    INPUTMETHOD_KEY_ISO_Partial_Space_Left             = 0xFE25,
+    INPUTMETHOD_KEY_ISO_Partial_Space_Right            = 0xFE26,
+    INPUTMETHOD_KEY_ISO_Set_Margin_Left                = 0xFE27,
+    INPUTMETHOD_KEY_ISO_Set_Margin_Right               = 0xFE28,
+    INPUTMETHOD_KEY_ISO_Release_Margin_Left            = 0xFE29,
+    INPUTMETHOD_KEY_ISO_Release_Margin_Right           = 0xFE2A,
+    INPUTMETHOD_KEY_ISO_Release_Both_Margins           = 0xFE2B,
+    INPUTMETHOD_KEY_ISO_Fast_Cursor_Left               = 0xFE2C,
+    INPUTMETHOD_KEY_ISO_Fast_Cursor_Right              = 0xFE2D,
+    INPUTMETHOD_KEY_ISO_Fast_Cursor_Up                 = 0xFE2E,
+    INPUTMETHOD_KEY_ISO_Fast_Cursor_Down               = 0xFE2F,
+    INPUTMETHOD_KEY_ISO_Continuous_Underline           = 0xFE30,
+    INPUTMETHOD_KEY_ISO_Discontinuous_Underline        = 0xFE31,
+    INPUTMETHOD_KEY_ISO_Emphasize                      = 0xFE32,
+    INPUTMETHOD_KEY_ISO_Center_Object                  = 0xFE33,
+    INPUTMETHOD_KEY_ISO_Enter                          = 0xFE34,
+
+    INPUTMETHOD_KEY_dead_grave                         = 0xFE50,
+    INPUTMETHOD_KEY_dead_acute                         = 0xFE51,
+    INPUTMETHOD_KEY_dead_circumflex                    = 0xFE52,
+    INPUTMETHOD_KEY_dead_tilde                         = 0xFE53,
+    INPUTMETHOD_KEY_dead_macron                        = 0xFE54,
+    INPUTMETHOD_KEY_dead_breve                         = 0xFE55,
+    INPUTMETHOD_KEY_dead_abovedot                      = 0xFE56,
+    INPUTMETHOD_KEY_dead_diaeresis                     = 0xFE57,
+    INPUTMETHOD_KEY_dead_abovering                     = 0xFE58,
+    INPUTMETHOD_KEY_dead_doubleacute                   = 0xFE59,
+    INPUTMETHOD_KEY_dead_caron                         = 0xFE5A,
+    INPUTMETHOD_KEY_dead_cedilla                       = 0xFE5B,
+    INPUTMETHOD_KEY_dead_ogonek                        = 0xFE5C,
+    INPUTMETHOD_KEY_dead_iota                          = 0xFE5D,
+    INPUTMETHOD_KEY_dead_voiced_sound                  = 0xFE5E,
+    INPUTMETHOD_KEY_dead_semivoiced_sound              = 0xFE5F,
+    INPUTMETHOD_KEY_dead_belowdot                      = 0xFE60,
+    INPUTMETHOD_KEY_dead_hook                          = 0xFE61,
+    INPUTMETHOD_KEY_dead_horn                          = 0xFE62,
+
+    INPUTMETHOD_KEY_First_Virtual_Screen               = 0xFED0,
+    INPUTMETHOD_KEY_Prev_Virtual_Screen                = 0xFED1,
+    INPUTMETHOD_KEY_Next_Virtual_Screen                = 0xFED2,
+    INPUTMETHOD_KEY_Last_Virtual_Screen                = 0xFED4,
+    INPUTMETHOD_KEY_Terminate_Server                   = 0xFED5,
+
+    INPUTMETHOD_KEY_AccessX_Enable                     = 0xFE70,
+    INPUTMETHOD_KEY_AccessX_Feedback_Enable            = 0xFE71,
+    INPUTMETHOD_KEY_RepeatKeys_Enable                  = 0xFE72,
+    INPUTMETHOD_KEY_SlowKeys_Enable                    = 0xFE73,
+    INPUTMETHOD_KEY_BounceKeys_Enable                  = 0xFE74,
+    INPUTMETHOD_KEY_StickyKeys_Enable                  = 0xFE75,
+    INPUTMETHOD_KEY_MouseKeys_Enable                   = 0xFE76,
+    INPUTMETHOD_KEY_MouseKeys_Accel_Enable             = 0xFE77,
+    INPUTMETHOD_KEY_Overlay1_Enable                    = 0xFE78,
+    INPUTMETHOD_KEY_Overlay2_Enable                    = 0xFE79,
+    INPUTMETHOD_KEY_AudibleBell_Enable                 = 0xFE7A,
+
+    INPUTMETHOD_KEY_Pointer_Left                       = 0xFEE0,
+    INPUTMETHOD_KEY_Pointer_Right                      = 0xFEE1,
+    INPUTMETHOD_KEY_Pointer_Up                         = 0xFEE2,
+    INPUTMETHOD_KEY_Pointer_Down                       = 0xFEE3,
+    INPUTMETHOD_KEY_Pointer_UpLeft                     = 0xFEE4,
+    INPUTMETHOD_KEY_Pointer_UpRight                    = 0xFEE5,
+    INPUTMETHOD_KEY_Pointer_DownLeft                   = 0xFEE6,
+    INPUTMETHOD_KEY_Pointer_DownRight                  = 0xFEE7,
+    INPUTMETHOD_KEY_Pointer_Button_Dflt                = 0xFEE8,
+    INPUTMETHOD_KEY_Pointer_Button1                    = 0xFEE9,
+    INPUTMETHOD_KEY_Pointer_Button2                    = 0xFEEA,
+    INPUTMETHOD_KEY_Pointer_Button3                    = 0xFEEB,
+    INPUTMETHOD_KEY_Pointer_Button4                    = 0xFEEC,
+    INPUTMETHOD_KEY_Pointer_Button5                    = 0xFEED,
+    INPUTMETHOD_KEY_Pointer_DblClick_Dflt              = 0xFEEE,
+    INPUTMETHOD_KEY_Pointer_DblClick1                  = 0xFEEF,
+    INPUTMETHOD_KEY_Pointer_DblClick2                  = 0xFEF0,
+    INPUTMETHOD_KEY_Pointer_DblClick3                  = 0xFEF1,
+    INPUTMETHOD_KEY_Pointer_DblClick4                  = 0xFEF2,
+    INPUTMETHOD_KEY_Pointer_DblClick5                  = 0xFEF3,
+    INPUTMETHOD_KEY_Pointer_Drag_Dflt                  = 0xFEF4,
+    INPUTMETHOD_KEY_Pointer_Drag1                      = 0xFEF5,
+    INPUTMETHOD_KEY_Pointer_Drag2                      = 0xFEF6,
+    INPUTMETHOD_KEY_Pointer_Drag3                      = 0xFEF7,
+    INPUTMETHOD_KEY_Pointer_Drag4                      = 0xFEF8,
+    INPUTMETHOD_KEY_Pointer_Drag5                      = 0xFEFD,
+
+    INPUTMETHOD_KEY_Pointer_EnableKeys                 = 0xFEF9,
+    INPUTMETHOD_KEY_Pointer_Accelerate                 = 0xFEFA,
+    INPUTMETHOD_KEY_Pointer_DfltBtnNext                = 0xFEFB,
+    INPUTMETHOD_KEY_Pointer_DfltBtnPrev                = 0xFEFC,
+
+    /*
+     * 3270 Terminal Keys
+     * Byte 3 = 0xFD
+     */
+    INPUTMETHOD_KEY_3270_Duplicate                     = 0xFD01,
+    INPUTMETHOD_KEY_3270_FieldMark                     = 0xFD02,
+    INPUTMETHOD_KEY_3270_Right2                        = 0xFD03,
+    INPUTMETHOD_KEY_3270_Left2                         = 0xFD04,
+    INPUTMETHOD_KEY_3270_BackTab                       = 0xFD05,
+    INPUTMETHOD_KEY_3270_EraseEOF                      = 0xFD06,
+    INPUTMETHOD_KEY_3270_EraseInput                    = 0xFD07,
+    INPUTMETHOD_KEY_3270_Reset                         = 0xFD08,
+    INPUTMETHOD_KEY_3270_Quit                          = 0xFD09,
+    INPUTMETHOD_KEY_3270_PA1                           = 0xFD0A,
+    INPUTMETHOD_KEY_3270_PA2                           = 0xFD0B,
+    INPUTMETHOD_KEY_3270_PA3                           = 0xFD0C,
+    INPUTMETHOD_KEY_3270_Test                          = 0xFD0D,
+    INPUTMETHOD_KEY_3270_Attn                          = 0xFD0E,
+    INPUTMETHOD_KEY_3270_CursorBlink                   = 0xFD0F,
+    INPUTMETHOD_KEY_3270_AltCursor                     = 0xFD10,
+    INPUTMETHOD_KEY_3270_KeyClick                      = 0xFD11,
+    INPUTMETHOD_KEY_3270_Jump                          = 0xFD12,
+    INPUTMETHOD_KEY_3270_Ident                         = 0xFD13,
+    INPUTMETHOD_KEY_3270_Rule                          = 0xFD14,
+    INPUTMETHOD_KEY_3270_Copy                          = 0xFD15,
+    INPUTMETHOD_KEY_3270_Play                          = 0xFD16,
+    INPUTMETHOD_KEY_3270_Setup                         = 0xFD17,
+    INPUTMETHOD_KEY_3270_Record                        = 0xFD18,
+    INPUTMETHOD_KEY_3270_ChangeScreen                  = 0xFD19,
+    INPUTMETHOD_KEY_3270_DeleteWord                    = 0xFD1A,
+    INPUTMETHOD_KEY_3270_ExSelect                      = 0xFD1B,
+    INPUTMETHOD_KEY_3270_CursorSelect                  = 0xFD1C,
+    INPUTMETHOD_KEY_3270_PrintScreen                   = 0xFD1D,
+    INPUTMETHOD_KEY_3270_Enter                         = 0xFD1E,
+
+    /* Latin 1 */
+    INPUTMETHOD_KEY_space                              = 0x020,
+    INPUTMETHOD_KEY_exclam                             = 0x021,
+    INPUTMETHOD_KEY_quotedbl                           = 0x022,
+    INPUTMETHOD_KEY_numbersign                         = 0x023,
+    INPUTMETHOD_KEY_dollar                             = 0x024,
+    INPUTMETHOD_KEY_percent                            = 0x025,
+    INPUTMETHOD_KEY_ampersand                          = 0x026,
+    INPUTMETHOD_KEY_apostrophe                         = 0x027,
+    INPUTMETHOD_KEY_parenleft                          = 0x028,
+    INPUTMETHOD_KEY_parenright                         = 0x029,
+    INPUTMETHOD_KEY_asterisk                           = 0x02a,
+    INPUTMETHOD_KEY_plus                               = 0x02b,
+    INPUTMETHOD_KEY_comma                              = 0x02c,
+    INPUTMETHOD_KEY_minus                              = 0x02d,
+    INPUTMETHOD_KEY_period                             = 0x02e,
+    INPUTMETHOD_KEY_slash                              = 0x02f,
+    INPUTMETHOD_KEY_0                                  = 0x030,
+    INPUTMETHOD_KEY_1                                  = 0x031,
+    INPUTMETHOD_KEY_2                                  = 0x032,
+    INPUTMETHOD_KEY_3                                  = 0x033,
+    INPUTMETHOD_KEY_4                                  = 0x034,
+    INPUTMETHOD_KEY_5                                  = 0x035,
+    INPUTMETHOD_KEY_6                                  = 0x036,
+    INPUTMETHOD_KEY_7                                  = 0x037,
+    INPUTMETHOD_KEY_8                                  = 0x038,
+    INPUTMETHOD_KEY_9                                  = 0x039,
+    INPUTMETHOD_KEY_colon                              = 0x03a,
+    INPUTMETHOD_KEY_semicolon                          = 0x03b,
+    INPUTMETHOD_KEY_less                               = 0x03c,
+    INPUTMETHOD_KEY_equal                              = 0x03d,
+    INPUTMETHOD_KEY_greater                            = 0x03e,
+    INPUTMETHOD_KEY_question                           = 0x03f,
+    INPUTMETHOD_KEY_at                                 = 0x040,
+    INPUTMETHOD_KEY_A                                  = 0x041,
+    INPUTMETHOD_KEY_B                                  = 0x042,
+    INPUTMETHOD_KEY_C                                  = 0x043,
+    INPUTMETHOD_KEY_D                                  = 0x044,
+    INPUTMETHOD_KEY_E                                  = 0x045,
+    INPUTMETHOD_KEY_F                                  = 0x046,
+    INPUTMETHOD_KEY_G                                  = 0x047,
+    INPUTMETHOD_KEY_H                                  = 0x048,
+    INPUTMETHOD_KEY_I                                  = 0x049,
+    INPUTMETHOD_KEY_J                                  = 0x04a,
+    INPUTMETHOD_KEY_K                                  = 0x04b,
+    INPUTMETHOD_KEY_L                                  = 0x04c,
+    INPUTMETHOD_KEY_M                                  = 0x04d,
+    INPUTMETHOD_KEY_N                                  = 0x04e,
+    INPUTMETHOD_KEY_O                                  = 0x04f,
+    INPUTMETHOD_KEY_P                                  = 0x050,
+    INPUTMETHOD_KEY_Q                                  = 0x051,
+    INPUTMETHOD_KEY_R                                  = 0x052,
+    INPUTMETHOD_KEY_S                                  = 0x053,
+    INPUTMETHOD_KEY_T                                  = 0x054,
+    INPUTMETHOD_KEY_U                                  = 0x055,
+    INPUTMETHOD_KEY_V                                  = 0x056,
+    INPUTMETHOD_KEY_W                                  = 0x057,
+    INPUTMETHOD_KEY_X                                  = 0x058,
+    INPUTMETHOD_KEY_Y                                  = 0x059,
+    INPUTMETHOD_KEY_Z                                  = 0x05a,
+    INPUTMETHOD_KEY_bracketleft                        = 0x05b,
+    INPUTMETHOD_KEY_backslash                          = 0x05c,
+    INPUTMETHOD_KEY_bracketright                       = 0x05d,
+    INPUTMETHOD_KEY_asciicircum                        = 0x05e,
+    INPUTMETHOD_KEY_underscore                         = 0x05f,
+    INPUTMETHOD_KEY_grave                              = 0x060,
+    INPUTMETHOD_KEY_a                                  = 0x061,
+    INPUTMETHOD_KEY_b                                  = 0x062,
+    INPUTMETHOD_KEY_c                                  = 0x063,
+    INPUTMETHOD_KEY_d                                  = 0x064,
+    INPUTMETHOD_KEY_e                                  = 0x065,
+    INPUTMETHOD_KEY_f                                  = 0x066,
+    INPUTMETHOD_KEY_g                                  = 0x067,
+    INPUTMETHOD_KEY_h                                  = 0x068,
+    INPUTMETHOD_KEY_i                                  = 0x069,
+    INPUTMETHOD_KEY_j                                  = 0x06a,
+    INPUTMETHOD_KEY_k                                  = 0x06b,
+    INPUTMETHOD_KEY_l                                  = 0x06c,
+    INPUTMETHOD_KEY_m                                  = 0x06d,
+    INPUTMETHOD_KEY_n                                  = 0x06e,
+    INPUTMETHOD_KEY_o                                  = 0x06f,
+    INPUTMETHOD_KEY_p                                  = 0x070,
+    INPUTMETHOD_KEY_q                                  = 0x071,
+    INPUTMETHOD_KEY_r                                  = 0x072,
+    INPUTMETHOD_KEY_s                                  = 0x073,
+    INPUTMETHOD_KEY_t                                  = 0x074,
+    INPUTMETHOD_KEY_u                                  = 0x075,
+    INPUTMETHOD_KEY_v                                  = 0x076,
+    INPUTMETHOD_KEY_w                                  = 0x077,
+    INPUTMETHOD_KEY_x                                  = 0x078,
+    INPUTMETHOD_KEY_y                                  = 0x079,
+    INPUTMETHOD_KEY_z                                  = 0x07a,
+    INPUTMETHOD_KEY_braceleft                          = 0x07b,
+    INPUTMETHOD_KEY_bar                                = 0x07c,
+    INPUTMETHOD_KEY_braceright                         = 0x07d,
+    INPUTMETHOD_KEY_asciitilde                         = 0x07e,
+
+    INPUTMETHOD_KEY_nobreakspace                       = 0x0a0,
+    INPUTMETHOD_KEY_exclamdown                         = 0x0a1,
+    INPUTMETHOD_KEY_cent                               = 0x0a2,
+    INPUTMETHOD_KEY_sterling                           = 0x0a3,
+    INPUTMETHOD_KEY_currency                           = 0x0a4,
+    INPUTMETHOD_KEY_yen                                = 0x0a5,
+    INPUTMETHOD_KEY_brokenbar                          = 0x0a6,
+    INPUTMETHOD_KEY_section                            = 0x0a7,
+    INPUTMETHOD_KEY_diaeresis                          = 0x0a8,
+    INPUTMETHOD_KEY_copyright                          = 0x0a9,
+    INPUTMETHOD_KEY_ordfeminine                        = 0x0aa,
+    INPUTMETHOD_KEY_guillemotleft                      = 0x0ab,     /* left angle quotation mark */
+    INPUTMETHOD_KEY_notsign                            = 0x0ac,
+    INPUTMETHOD_KEY_hyphen                             = 0x0ad,
+    INPUTMETHOD_KEY_registered                         = 0x0ae,
+    INPUTMETHOD_KEY_macron                             = 0x0af,
+    INPUTMETHOD_KEY_degree                             = 0x0b0,
+    INPUTMETHOD_KEY_plusminus                          = 0x0b1,
+    INPUTMETHOD_KEY_twosuperior                        = 0x0b2,
+    INPUTMETHOD_KEY_threesuperior                      = 0x0b3,
+    INPUTMETHOD_KEY_acute                              = 0x0b4,
+    INPUTMETHOD_KEY_mu                                 = 0x0b5,
+    INPUTMETHOD_KEY_paragraph                          = 0x0b6,
+    INPUTMETHOD_KEY_periodcentered                     = 0x0b7,
+    INPUTMETHOD_KEY_cedilla                            = 0x0b8,
+    INPUTMETHOD_KEY_onesuperior                        = 0x0b9,
+    INPUTMETHOD_KEY_masculine                          = 0x0ba,
+    INPUTMETHOD_KEY_guillemotright                     = 0x0bb,     /* right angle quotation mark */
+    INPUTMETHOD_KEY_onequarter                         = 0x0bc,
+    INPUTMETHOD_KEY_onehalf                            = 0x0bd,
+    INPUTMETHOD_KEY_threequarters                      = 0x0be,
+    INPUTMETHOD_KEY_questiondown                       = 0x0bf,
+    INPUTMETHOD_KEY_Agrave                             = 0x0c0,
+    INPUTMETHOD_KEY_Aacute                             = 0x0c1,
+    INPUTMETHOD_KEY_Acircumflex                        = 0x0c2,
+    INPUTMETHOD_KEY_Atilde                             = 0x0c3,
+    INPUTMETHOD_KEY_Adiaeresis                         = 0x0c4,
+    INPUTMETHOD_KEY_Aring                              = 0x0c5,
+    INPUTMETHOD_KEY_AE                                 = 0x0c6,
+    INPUTMETHOD_KEY_Ccedilla                           = 0x0c7,
+    INPUTMETHOD_KEY_Egrave                             = 0x0c8,
+    INPUTMETHOD_KEY_Eacute                             = 0x0c9,
+    INPUTMETHOD_KEY_Ecircumflex                        = 0x0ca,
+    INPUTMETHOD_KEY_Ediaeresis                         = 0x0cb,
+    INPUTMETHOD_KEY_Igrave                             = 0x0cc,
+    INPUTMETHOD_KEY_Iacute                             = 0x0cd,
+    INPUTMETHOD_KEY_Icircumflex                        = 0x0ce,
+    INPUTMETHOD_KEY_Idiaeresis                         = 0x0cf,
+    INPUTMETHOD_KEY_ETH                                = 0x0d0,
+    INPUTMETHOD_KEY_Ntilde                             = 0x0d1,
+    INPUTMETHOD_KEY_Ograve                             = 0x0d2,
+    INPUTMETHOD_KEY_Oacute                             = 0x0d3,
+    INPUTMETHOD_KEY_Ocircumflex                        = 0x0d4,
+    INPUTMETHOD_KEY_Otilde                             = 0x0d5,
+    INPUTMETHOD_KEY_Odiaeresis                         = 0x0d6,
+    INPUTMETHOD_KEY_multiply                           = 0x0d7,
+    INPUTMETHOD_KEY_Oslash                             = 0x0d8,
+    INPUTMETHOD_KEY_Ugrave                             = 0x0d9,
+    INPUTMETHOD_KEY_Uacute                             = 0x0da,
+    INPUTMETHOD_KEY_Ucircumflex                        = 0x0db,
+    INPUTMETHOD_KEY_Udiaeresis                         = 0x0dc,
+    INPUTMETHOD_KEY_Yacute                             = 0x0dd,
+    INPUTMETHOD_KEY_THORN                              = 0x0de,
+    INPUTMETHOD_KEY_ssharp                             = 0x0df,
+    INPUTMETHOD_KEY_agrave                             = 0x0e0,
+    INPUTMETHOD_KEY_aacute                             = 0x0e1,
+    INPUTMETHOD_KEY_acircumflex                        = 0x0e2,
+    INPUTMETHOD_KEY_atilde                             = 0x0e3,
+    INPUTMETHOD_KEY_adiaeresis                         = 0x0e4,
+    INPUTMETHOD_KEY_aring                              = 0x0e5,
+    INPUTMETHOD_KEY_ae                                 = 0x0e6,
+    INPUTMETHOD_KEY_ccedilla                           = 0x0e7,
+    INPUTMETHOD_KEY_egrave                             = 0x0e8,
+    INPUTMETHOD_KEY_eacute                             = 0x0e9,
+    INPUTMETHOD_KEY_ecircumflex                        = 0x0ea,
+    INPUTMETHOD_KEY_ediaeresis                         = 0x0eb,
+    INPUTMETHOD_KEY_igrave                             = 0x0ec,
+    INPUTMETHOD_KEY_iacute                             = 0x0ed,
+    INPUTMETHOD_KEY_icircumflex                        = 0x0ee,
+    INPUTMETHOD_KEY_idiaeresis                         = 0x0ef,
+    INPUTMETHOD_KEY_eth                                = 0x0f0,
+    INPUTMETHOD_KEY_ntilde                             = 0x0f1,
+    INPUTMETHOD_KEY_ograve                             = 0x0f2,
+    INPUTMETHOD_KEY_oacute                             = 0x0f3,
+    INPUTMETHOD_KEY_ocircumflex                        = 0x0f4,
+    INPUTMETHOD_KEY_otilde                             = 0x0f5,
+    INPUTMETHOD_KEY_odiaeresis                         = 0x0f6,
+    INPUTMETHOD_KEY_division                           = 0x0f7,
+    INPUTMETHOD_KEY_oslash                             = 0x0f8,
+    INPUTMETHOD_KEY_ugrave                             = 0x0f9,
+    INPUTMETHOD_KEY_uacute                             = 0x0fa,
+    INPUTMETHOD_KEY_ucircumflex                        = 0x0fb,
+    INPUTMETHOD_KEY_udiaeresis                         = 0x0fc,
+    INPUTMETHOD_KEY_yacute                             = 0x0fd,
+    INPUTMETHOD_KEY_thorn                              = 0x0fe,
+    INPUTMETHOD_KEY_ydiaeresis                         = 0x0ff,
+
+    /*
+     *   Latin 2
+     *   Byte 3 = 1
+     */
+    INPUTMETHOD_KEY_Aogonek                            = 0x1a1,
+    INPUTMETHOD_KEY_breve                              = 0x1a2,
+    INPUTMETHOD_KEY_Lstroke                            = 0x1a3,
+    INPUTMETHOD_KEY_Lcaron                             = 0x1a5,
+    INPUTMETHOD_KEY_Sacute                             = 0x1a6,
+    INPUTMETHOD_KEY_Scaron                             = 0x1a9,
+    INPUTMETHOD_KEY_Scedilla                           = 0x1aa,
+    INPUTMETHOD_KEY_Tcaron                             = 0x1ab,
+    INPUTMETHOD_KEY_Zacute                             = 0x1ac,
+    INPUTMETHOD_KEY_Zcaron                             = 0x1ae,
+    INPUTMETHOD_KEY_Zabovedot                          = 0x1af,
+    INPUTMETHOD_KEY_aogonek                            = 0x1b1,
+    INPUTMETHOD_KEY_ogonek                             = 0x1b2,
+    INPUTMETHOD_KEY_lstroke                            = 0x1b3,
+    INPUTMETHOD_KEY_lcaron                             = 0x1b5,
+    INPUTMETHOD_KEY_sacute                             = 0x1b6,
+    INPUTMETHOD_KEY_caron                              = 0x1b7,
+    INPUTMETHOD_KEY_scaron                             = 0x1b9,
+    INPUTMETHOD_KEY_scedilla                           = 0x1ba,
+    INPUTMETHOD_KEY_tcaron                             = 0x1bb,
+    INPUTMETHOD_KEY_zacute                             = 0x1bc,
+    INPUTMETHOD_KEY_doubleacute                        = 0x1bd,
+    INPUTMETHOD_KEY_zcaron                             = 0x1be,
+    INPUTMETHOD_KEY_zabovedot                          = 0x1bf,
+    INPUTMETHOD_KEY_Racute                             = 0x1c0,
+    INPUTMETHOD_KEY_Abreve                             = 0x1c3,
+    INPUTMETHOD_KEY_Lacute                             = 0x1c5,
+    INPUTMETHOD_KEY_Cacute                             = 0x1c6,
+    INPUTMETHOD_KEY_Ccaron                             = 0x1c8,
+    INPUTMETHOD_KEY_Eogonek                            = 0x1ca,
+    INPUTMETHOD_KEY_Ecaron                             = 0x1cc,
+    INPUTMETHOD_KEY_Dcaron                             = 0x1cf,
+    INPUTMETHOD_KEY_Dstroke                            = 0x1d0,
+    INPUTMETHOD_KEY_Nacute                             = 0x1d1,
+    INPUTMETHOD_KEY_Ncaron                             = 0x1d2,
+    INPUTMETHOD_KEY_Odoubleacute                       = 0x1d5,
+    INPUTMETHOD_KEY_Rcaron                             = 0x1d8,
+    INPUTMETHOD_KEY_Uring                              = 0x1d9,
+    INPUTMETHOD_KEY_Udoubleacute                       = 0x1db,
+    INPUTMETHOD_KEY_Tcedilla                           = 0x1de,
+    INPUTMETHOD_KEY_racute                             = 0x1e0,
+    INPUTMETHOD_KEY_abreve                             = 0x1e3,
+    INPUTMETHOD_KEY_lacute                             = 0x1e5,
+    INPUTMETHOD_KEY_cacute                             = 0x1e6,
+    INPUTMETHOD_KEY_ccaron                             = 0x1e8,
+    INPUTMETHOD_KEY_eogonek                            = 0x1ea,
+    INPUTMETHOD_KEY_ecaron                             = 0x1ec,
+    INPUTMETHOD_KEY_dcaron                             = 0x1ef,
+    INPUTMETHOD_KEY_dstroke                            = 0x1f0,
+    INPUTMETHOD_KEY_nacute                             = 0x1f1,
+    INPUTMETHOD_KEY_ncaron                             = 0x1f2,
+    INPUTMETHOD_KEY_odoubleacute                       = 0x1f5,
+    INPUTMETHOD_KEY_udoubleacute                       = 0x1fb,
+    INPUTMETHOD_KEY_rcaron                             = 0x1f8,
+    INPUTMETHOD_KEY_uring                              = 0x1f9,
+    INPUTMETHOD_KEY_tcedilla                           = 0x1fe,
+    INPUTMETHOD_KEY_abovedot                           = 0x1ff,
+
+    /*
+     *   Latin 3
+     *   Byte 3 = 2
+     */
+    INPUTMETHOD_KEY_Hstroke                            = 0x2a1,
+    INPUTMETHOD_KEY_Hcircumflex                        = 0x2a6,
+    INPUTMETHOD_KEY_Iabovedot                          = 0x2a9,
+    INPUTMETHOD_KEY_Gbreve                             = 0x2ab,
+    INPUTMETHOD_KEY_Jcircumflex                        = 0x2ac,
+    INPUTMETHOD_KEY_hstroke                            = 0x2b1,
+    INPUTMETHOD_KEY_hcircumflex                        = 0x2b6,
+    INPUTMETHOD_KEY_idotless                           = 0x2b9,
+    INPUTMETHOD_KEY_gbreve                             = 0x2bb,
+    INPUTMETHOD_KEY_jcircumflex                        = 0x2bc,
+    INPUTMETHOD_KEY_Cabovedot                          = 0x2c5,
+    INPUTMETHOD_KEY_Ccircumflex                        = 0x2c6,
+    INPUTMETHOD_KEY_Gabovedot                          = 0x2d5,
+    INPUTMETHOD_KEY_Gcircumflex                        = 0x2d8,
+    INPUTMETHOD_KEY_Ubreve                             = 0x2dd,
+    INPUTMETHOD_KEY_Scircumflex                        = 0x2de,
+    INPUTMETHOD_KEY_cabovedot                          = 0x2e5,
+    INPUTMETHOD_KEY_ccircumflex                        = 0x2e6,
+    INPUTMETHOD_KEY_gabovedot                          = 0x2f5,
+    INPUTMETHOD_KEY_gcircumflex                        = 0x2f8,
+    INPUTMETHOD_KEY_ubreve                             = 0x2fd,
+    INPUTMETHOD_KEY_scircumflex                        = 0x2fe,
+
+    /*
+     *   Latin 4
+     *   Byte 3 = 3
+     */
+    INPUTMETHOD_KEY_kra                                = 0x3a2,
+    INPUTMETHOD_KEY_Rcedilla                           = 0x3a3,
+    INPUTMETHOD_KEY_Itilde                             = 0x3a5,
+    INPUTMETHOD_KEY_Lcedilla                           = 0x3a6,
+    INPUTMETHOD_KEY_Emacron                            = 0x3aa,
+    INPUTMETHOD_KEY_Gcedilla                           = 0x3ab,
+    INPUTMETHOD_KEY_Tslash                             = 0x3ac,
+    INPUTMETHOD_KEY_rcedilla                           = 0x3b3,
+    INPUTMETHOD_KEY_itilde                             = 0x3b5,
+    INPUTMETHOD_KEY_lcedilla                           = 0x3b6,
+    INPUTMETHOD_KEY_emacron                            = 0x3ba,
+    INPUTMETHOD_KEY_gcedilla                           = 0x3bb,
+    INPUTMETHOD_KEY_tslash                             = 0x3bc,
+    INPUTMETHOD_KEY_ENG                                = 0x3bd,
+    INPUTMETHOD_KEY_eng                                = 0x3bf,
+    INPUTMETHOD_KEY_Amacron                            = 0x3c0,
+    INPUTMETHOD_KEY_Iogonek                            = 0x3c7,
+    INPUTMETHOD_KEY_Eabovedot                          = 0x3cc,
+    INPUTMETHOD_KEY_Imacron                            = 0x3cf,
+    INPUTMETHOD_KEY_Ncedilla                           = 0x3d1,
+    INPUTMETHOD_KEY_Omacron                            = 0x3d2,
+    INPUTMETHOD_KEY_Kcedilla                           = 0x3d3,
+    INPUTMETHOD_KEY_Uogonek                            = 0x3d9,
+    INPUTMETHOD_KEY_Utilde                             = 0x3dd,
+    INPUTMETHOD_KEY_Umacron                            = 0x3de,
+    INPUTMETHOD_KEY_amacron                            = 0x3e0,
+    INPUTMETHOD_KEY_iogonek                            = 0x3e7,
+    INPUTMETHOD_KEY_eabovedot                          = 0x3ec,
+    INPUTMETHOD_KEY_imacron                            = 0x3ef,
+    INPUTMETHOD_KEY_ncedilla                           = 0x3f1,
+    INPUTMETHOD_KEY_omacron                            = 0x3f2,
+    INPUTMETHOD_KEY_kcedilla                           = 0x3f3,
+    INPUTMETHOD_KEY_uogonek                            = 0x3f9,
+    INPUTMETHOD_KEY_utilde                             = 0x3fd,
+    INPUTMETHOD_KEY_umacron                            = 0x3fe,
+
+    /*
+     * Latin-8
+     * Byte 3 = 18
+     */
+    INPUTMETHOD_KEY_Babovedot                          = 0x12a1,
+    INPUTMETHOD_KEY_babovedot                          = 0x12a2,
+    INPUTMETHOD_KEY_Dabovedot                          = 0x12a6,
+    INPUTMETHOD_KEY_Wgrave                             = 0x12a8,
+    INPUTMETHOD_KEY_Wacute                             = 0x12aa,
+    INPUTMETHOD_KEY_dabovedot                          = 0x12ab,
+    INPUTMETHOD_KEY_Ygrave                             = 0x12ac,
+    INPUTMETHOD_KEY_Fabovedot                          = 0x12b0,
+    INPUTMETHOD_KEY_fabovedot                          = 0x12b1,
+    INPUTMETHOD_KEY_Mabovedot                          = 0x12b4,
+    INPUTMETHOD_KEY_mabovedot                          = 0x12b5,
+    INPUTMETHOD_KEY_Pabovedot                          = 0x12b7,
+    INPUTMETHOD_KEY_wgrave                             = 0x12b8,
+    INPUTMETHOD_KEY_pabovedot                          = 0x12b9,
+    INPUTMETHOD_KEY_wacute                             = 0x12ba,
+    INPUTMETHOD_KEY_Sabovedot                          = 0x12bb,
+    INPUTMETHOD_KEY_ygrave                             = 0x12bc,
+    INPUTMETHOD_KEY_Wdiaeresis                         = 0x12bd,
+    INPUTMETHOD_KEY_wdiaeresis                         = 0x12be,
+    INPUTMETHOD_KEY_sabovedot                          = 0x12bf,
+    INPUTMETHOD_KEY_Wcircumflex                        = 0x12d0,
+    INPUTMETHOD_KEY_Tabovedot                          = 0x12d7,
+    INPUTMETHOD_KEY_Ycircumflex                        = 0x12de,
+    INPUTMETHOD_KEY_wcircumflex                        = 0x12f0,
+    INPUTMETHOD_KEY_tabovedot                          = 0x12f7,
+    INPUTMETHOD_KEY_ycircumflex                        = 0x12fe,
+
+    /*
+     * Latin-9 (a.k.a. Latin-0)
+     * Byte 3 = 19
+     */
+    INPUTMETHOD_KEY_OE                                 = 0x13bc,
+    INPUTMETHOD_KEY_oe                                 = 0x13bd,
+    INPUTMETHOD_KEY_Ydiaeresis                         = 0x13be,
+
+    /*
+     * Katakana
+     * Byte 3 = 4
+     */
+    INPUTMETHOD_KEY_overline                           = 0x47e,
+    INPUTMETHOD_KEY_kana_fullstop                      = 0x4a1,
+    INPUTMETHOD_KEY_kana_openingbracket                = 0x4a2,
+    INPUTMETHOD_KEY_kana_closingbracket                = 0x4a3,
+    INPUTMETHOD_KEY_kana_comma                         = 0x4a4,
+    INPUTMETHOD_KEY_kana_conjunctive                   = 0x4a5,
+    INPUTMETHOD_KEY_kana_WO                            = 0x4a6,
+    INPUTMETHOD_KEY_kana_a                             = 0x4a7,
+    INPUTMETHOD_KEY_kana_i                             = 0x4a8,
+    INPUTMETHOD_KEY_kana_u                             = 0x4a9,
+    INPUTMETHOD_KEY_kana_e                             = 0x4aa,
+    INPUTMETHOD_KEY_kana_o                             = 0x4ab,
+    INPUTMETHOD_KEY_kana_ya                            = 0x4ac,
+    INPUTMETHOD_KEY_kana_yu                            = 0x4ad,
+    INPUTMETHOD_KEY_kana_yo                            = 0x4ae,
+    INPUTMETHOD_KEY_kana_tsu                           = 0x4af,
+    INPUTMETHOD_KEY_prolongedsound                     = 0x4b0,
+    INPUTMETHOD_KEY_kana_A                             = 0x4b1,
+    INPUTMETHOD_KEY_kana_I                             = 0x4b2,
+    INPUTMETHOD_KEY_kana_U                             = 0x4b3,
+    INPUTMETHOD_KEY_kana_E                             = 0x4b4,
+    INPUTMETHOD_KEY_kana_O                             = 0x4b5,
+    INPUTMETHOD_KEY_kana_KA                            = 0x4b6,
+    INPUTMETHOD_KEY_kana_KI                            = 0x4b7,
+    INPUTMETHOD_KEY_kana_KU                            = 0x4b8,
+    INPUTMETHOD_KEY_kana_KE                            = 0x4b9,
+    INPUTMETHOD_KEY_kana_KO                            = 0x4ba,
+    INPUTMETHOD_KEY_kana_SA                            = 0x4bb,
+    INPUTMETHOD_KEY_kana_SHI                           = 0x4bc,
+    INPUTMETHOD_KEY_kana_SU                            = 0x4bd,
+    INPUTMETHOD_KEY_kana_SE                            = 0x4be,
+    INPUTMETHOD_KEY_kana_SO                            = 0x4bf,
+    INPUTMETHOD_KEY_kana_TA                            = 0x4c0,
+    INPUTMETHOD_KEY_kana_CHI                           = 0x4c1,
+    INPUTMETHOD_KEY_kana_TSU                           = 0x4c2,
+    INPUTMETHOD_KEY_kana_TE                            = 0x4c3,
+    INPUTMETHOD_KEY_kana_TO                            = 0x4c4,
+    INPUTMETHOD_KEY_kana_NA                            = 0x4c5,
+    INPUTMETHOD_KEY_kana_NI                            = 0x4c6,
+    INPUTMETHOD_KEY_kana_NU                            = 0x4c7,
+    INPUTMETHOD_KEY_kana_NE                            = 0x4c8,
+    INPUTMETHOD_KEY_kana_NO                            = 0x4c9,
+    INPUTMETHOD_KEY_kana_HA                            = 0x4ca,
+    INPUTMETHOD_KEY_kana_HI                            = 0x4cb,
+    INPUTMETHOD_KEY_kana_FU                            = 0x4cc,
+    INPUTMETHOD_KEY_kana_HE                            = 0x4cd,
+    INPUTMETHOD_KEY_kana_HO                            = 0x4ce,
+    INPUTMETHOD_KEY_kana_MA                            = 0x4cf,
+    INPUTMETHOD_KEY_kana_MI                            = 0x4d0,
+    INPUTMETHOD_KEY_kana_MU                            = 0x4d1,
+    INPUTMETHOD_KEY_kana_ME                            = 0x4d2,
+    INPUTMETHOD_KEY_kana_MO                            = 0x4d3,
+    INPUTMETHOD_KEY_kana_YA                            = 0x4d4,
+    INPUTMETHOD_KEY_kana_YU                            = 0x4d5,
+    INPUTMETHOD_KEY_kana_YO                            = 0x4d6,
+    INPUTMETHOD_KEY_kana_RA                            = 0x4d7,
+    INPUTMETHOD_KEY_kana_RI                            = 0x4d8,
+    INPUTMETHOD_KEY_kana_RU                            = 0x4d9,
+    INPUTMETHOD_KEY_kana_RE                            = 0x4da,
+    INPUTMETHOD_KEY_kana_RO                            = 0x4db,
+    INPUTMETHOD_KEY_kana_WA                            = 0x4dc,
+    INPUTMETHOD_KEY_kana_N                             = 0x4dd,
+    INPUTMETHOD_KEY_voicedsound                        = 0x4de,
+    INPUTMETHOD_KEY_semivoicedsound                    = 0x4df,
+    INPUTMETHOD_KEY_kana_switch                        = 0xFF7E,    /* Alias for mode_switch */
+
+    /*
+     *  Arabic
+     *  Byte 3 = 5
+     */
+    INPUTMETHOD_KEY_Farsi_0                            = 0x590,
+    INPUTMETHOD_KEY_Farsi_1                            = 0x591,
+    INPUTMETHOD_KEY_Farsi_2                            = 0x592,
+    INPUTMETHOD_KEY_Farsi_3                            = 0x593,
+    INPUTMETHOD_KEY_Farsi_4                            = 0x594,
+    INPUTMETHOD_KEY_Farsi_5                            = 0x595,
+    INPUTMETHOD_KEY_Farsi_6                            = 0x596,
+    INPUTMETHOD_KEY_Farsi_7                            = 0x597,
+    INPUTMETHOD_KEY_Farsi_8                            = 0x598,
+    INPUTMETHOD_KEY_Farsi_9                            = 0x599,
+    INPUTMETHOD_KEY_Arabic_percent                     = 0x5a5,
+    INPUTMETHOD_KEY_Arabic_superscript_alef            = 0x5a6,
+    INPUTMETHOD_KEY_Arabic_tteh                        = 0x5a7,
+    INPUTMETHOD_KEY_Arabic_peh                         = 0x5a8,
+    INPUTMETHOD_KEY_Arabic_tcheh                       = 0x5a9,
+    INPUTMETHOD_KEY_Arabic_ddal                        = 0x5aa,
+    INPUTMETHOD_KEY_Arabic_rreh                        = 0x5ab,
+    INPUTMETHOD_KEY_Arabic_comma                       = 0x5ac,
+    INPUTMETHOD_KEY_Arabic_fullstop                    = 0x5ae,
+    INPUTMETHOD_KEY_Arabic_0                           = 0x5b0,
+    INPUTMETHOD_KEY_Arabic_1                           = 0x5b1,
+    INPUTMETHOD_KEY_Arabic_2                           = 0x5b2,
+    INPUTMETHOD_KEY_Arabic_3                           = 0x5b3,
+    INPUTMETHOD_KEY_Arabic_4                           = 0x5b4,
+    INPUTMETHOD_KEY_Arabic_5                           = 0x5b5,
+    INPUTMETHOD_KEY_Arabic_6                           = 0x5b6,
+    INPUTMETHOD_KEY_Arabic_7                           = 0x5b7,
+    INPUTMETHOD_KEY_Arabic_8                           = 0x5b8,
+    INPUTMETHOD_KEY_Arabic_9                           = 0x5b9,
+    INPUTMETHOD_KEY_Arabic_semicolon                   = 0x5bb,
+    INPUTMETHOD_KEY_Arabic_question_mark               = 0x5bf,
+    INPUTMETHOD_KEY_Arabic_hamza                       = 0x5c1,
+    INPUTMETHOD_KEY_Arabic_maddaonalef                 = 0x5c2,
+    INPUTMETHOD_KEY_Arabic_hamzaonalef                 = 0x5c3,
+    INPUTMETHOD_KEY_Arabic_hamzaonwaw                  = 0x5c4,
+    INPUTMETHOD_KEY_Arabic_hamzaunderalef              = 0x5c5,
+    INPUTMETHOD_KEY_Arabic_hamzaonyeh                  = 0x5c6,
+    INPUTMETHOD_KEY_Arabic_alef                        = 0x5c7,
+    INPUTMETHOD_KEY_Arabic_beh                         = 0x5c8,
+    INPUTMETHOD_KEY_Arabic_tehmarbuta                  = 0x5c9,
+    INPUTMETHOD_KEY_Arabic_teh                         = 0x5ca,
+    INPUTMETHOD_KEY_Arabic_theh                        = 0x5cb,
+    INPUTMETHOD_KEY_Arabic_jeem                        = 0x5cc,
+    INPUTMETHOD_KEY_Arabic_hah                         = 0x5cd,
+    INPUTMETHOD_KEY_Arabic_khah                        = 0x5ce,
+    INPUTMETHOD_KEY_Arabic_dal                         = 0x5cf,
+    INPUTMETHOD_KEY_Arabic_thal                        = 0x5d0,
+    INPUTMETHOD_KEY_Arabic_ra                          = 0x5d1,
+    INPUTMETHOD_KEY_Arabic_zain                        = 0x5d2,
+    INPUTMETHOD_KEY_Arabic_seen                        = 0x5d3,
+    INPUTMETHOD_KEY_Arabic_sheen                       = 0x5d4,
+    INPUTMETHOD_KEY_Arabic_sad                         = 0x5d5,
+    INPUTMETHOD_KEY_Arabic_dad                         = 0x5d6,
+    INPUTMETHOD_KEY_Arabic_tah                         = 0x5d7,
+    INPUTMETHOD_KEY_Arabic_zah                         = 0x5d8,
+    INPUTMETHOD_KEY_Arabic_ain                         = 0x5d9,
+    INPUTMETHOD_KEY_Arabic_ghain                       = 0x5da,
+    INPUTMETHOD_KEY_Arabic_tatweel                     = 0x5e0,
+    INPUTMETHOD_KEY_Arabic_feh                         = 0x5e1,
+    INPUTMETHOD_KEY_Arabic_qaf                         = 0x5e2,
+    INPUTMETHOD_KEY_Arabic_kaf                         = 0x5e3,
+    INPUTMETHOD_KEY_Arabic_lam                         = 0x5e4,
+    INPUTMETHOD_KEY_Arabic_meem                        = 0x5e5,
+    INPUTMETHOD_KEY_Arabic_noon                        = 0x5e6,
+    INPUTMETHOD_KEY_Arabic_ha                          = 0x5e7,
+    INPUTMETHOD_KEY_Arabic_waw                         = 0x5e8,
+    INPUTMETHOD_KEY_Arabic_alefmaksura                 = 0x5e9,
+    INPUTMETHOD_KEY_Arabic_yeh                         = 0x5ea,
+    INPUTMETHOD_KEY_Arabic_fathatan                    = 0x5eb,
+    INPUTMETHOD_KEY_Arabic_dammatan                    = 0x5ec,
+    INPUTMETHOD_KEY_Arabic_kasratan                    = 0x5ed,
+    INPUTMETHOD_KEY_Arabic_fatha                       = 0x5ee,
+    INPUTMETHOD_KEY_Arabic_damma                       = 0x5ef,
+    INPUTMETHOD_KEY_Arabic_kasra                       = 0x5f0,
+    INPUTMETHOD_KEY_Arabic_shadda                      = 0x5f1,
+    INPUTMETHOD_KEY_Arabic_sukun                       = 0x5f2,
+    INPUTMETHOD_KEY_Arabic_madda_above                 = 0x5f3,
+    INPUTMETHOD_KEY_Arabic_hamza_above                 = 0x5f4,
+    INPUTMETHOD_KEY_Arabic_hamza_below                 = 0x5f5,
+    INPUTMETHOD_KEY_Arabic_jeh                         = 0x5f6,
+    INPUTMETHOD_KEY_Arabic_veh                         = 0x5f7,
+    INPUTMETHOD_KEY_Arabic_keheh                       = 0x5f8,
+    INPUTMETHOD_KEY_Arabic_gaf                         = 0x5f9,
+    INPUTMETHOD_KEY_Arabic_noon_ghunna                 = 0x5fa,
+    INPUTMETHOD_KEY_Arabic_heh_doachashmee             = 0x5fb,
+    INPUTMETHOD_KEY_Farsi_yeh                          = 0x5fc,
+    INPUTMETHOD_KEY_Arabic_farsi_yeh                   = INPUTMETHOD_KEY_Farsi_yeh,
+    INPUTMETHOD_KEY_Arabic_yeh_baree                   = 0x5fd,
+    INPUTMETHOD_KEY_Arabic_heh_goal                    = 0x5fe,
+    INPUTMETHOD_KEY_Arabic_switch                      = 0xFF7E,    /* Alias for mode_switch */
+
+    /*
+     * Cyrillic
+     * Byte 3 = 6
+     */
+    INPUTMETHOD_KEY_Cyrillic_GHE_bar                   = 0x680,
+    INPUTMETHOD_KEY_Cyrillic_ghe_bar                   = 0x690,
+    INPUTMETHOD_KEY_Cyrillic_ZHE_descender             = 0x681,
+    INPUTMETHOD_KEY_Cyrillic_zhe_descender             = 0x691,
+    INPUTMETHOD_KEY_Cyrillic_KA_descender              = 0x682,
+    INPUTMETHOD_KEY_Cyrillic_ka_descender              = 0x692,
+    INPUTMETHOD_KEY_Cyrillic_KA_vertstroke             = 0x683,
+    INPUTMETHOD_KEY_Cyrillic_ka_vertstroke             = 0x693,
+    INPUTMETHOD_KEY_Cyrillic_EN_descender              = 0x684,
+    INPUTMETHOD_KEY_Cyrillic_en_descender              = 0x694,
+    INPUTMETHOD_KEY_Cyrillic_U_straight                = 0x685,
+    INPUTMETHOD_KEY_Cyrillic_u_straight                = 0x695,
+    INPUTMETHOD_KEY_Cyrillic_U_straight_bar            = 0x686,
+    INPUTMETHOD_KEY_Cyrillic_u_straight_bar            = 0x696,
+    INPUTMETHOD_KEY_Cyrillic_HA_descender              = 0x687,
+    INPUTMETHOD_KEY_Cyrillic_ha_descender              = 0x697,
+    INPUTMETHOD_KEY_Cyrillic_CHE_descender             = 0x688,
+    INPUTMETHOD_KEY_Cyrillic_che_descender             = 0x698,
+    INPUTMETHOD_KEY_Cyrillic_CHE_vertstroke            = 0x689,
+    INPUTMETHOD_KEY_Cyrillic_che_vertstroke            = 0x699,
+    INPUTMETHOD_KEY_Cyrillic_SHHA                      = 0x68a,
+    INPUTMETHOD_KEY_Cyrillic_shha                      = 0x69a,
+
+    INPUTMETHOD_KEY_Cyrillic_SCHWA                     = 0x68c,
+    INPUTMETHOD_KEY_Cyrillic_schwa                     = 0x69c,
+    INPUTMETHOD_KEY_Cyrillic_I_macron                  = 0x68d,
+    INPUTMETHOD_KEY_Cyrillic_i_macron                  = 0x69d,
+    INPUTMETHOD_KEY_Cyrillic_O_bar                     = 0x68e,
+    INPUTMETHOD_KEY_Cyrillic_o_bar                     = 0x69e,
+    INPUTMETHOD_KEY_Cyrillic_U_macron                  = 0x68f,
+    INPUTMETHOD_KEY_Cyrillic_u_macron                  = 0x69f,
+
+    INPUTMETHOD_KEY_Serbian_dje                        = 0x6a1,
+    INPUTMETHOD_KEY_Macedonia_gje                      = 0x6a2,
+    INPUTMETHOD_KEY_Cyrillic_io                        = 0x6a3,
+    INPUTMETHOD_KEY_Ukrainian_ie                       = 0x6a4,
+    INPUTMETHOD_KEY_Macedonia_dse                      = 0x6a5,
+    INPUTMETHOD_KEY_Ukrainian_i                        = 0x6a6,
+    INPUTMETHOD_KEY_Ukrainian_yi                       = 0x6a7,
+    INPUTMETHOD_KEY_Cyrillic_je                        = 0x6a8,
+    INPUTMETHOD_KEY_Cyrillic_lje                       = 0x6a9,
+    INPUTMETHOD_KEY_Cyrillic_nje                       = 0x6aa,
+    INPUTMETHOD_KEY_Serbian_tshe                       = 0x6ab,
+    INPUTMETHOD_KEY_Macedonia_kje                      = 0x6ac,
+    INPUTMETHOD_KEY_Ukrainian_ghe_with_upturn          = 0x6ad,
+    INPUTMETHOD_KEY_Byelorussian_shortu                = 0x6ae,
+    INPUTMETHOD_KEY_Cyrillic_dzhe                      = 0x6af,
+    INPUTMETHOD_KEY_numerosign                         = 0x6b0,
+    INPUTMETHOD_KEY_Serbian_DJE                        = 0x6b1,
+    INPUTMETHOD_KEY_Macedonia_GJE                      = 0x6b2,
+    INPUTMETHOD_KEY_Cyrillic_IO                        = 0x6b3,
+    INPUTMETHOD_KEY_Ukrainian_IE                       = 0x6b4,
+    INPUTMETHOD_KEY_Macedonia_DSE                      = 0x6b5,
+    INPUTMETHOD_KEY_Ukrainian_I                        = 0x6b6,
+    INPUTMETHOD_KEY_Ukrainian_YI                       = 0x6b7,
+    INPUTMETHOD_KEY_Cyrillic_JE                        = 0x6b8,
+    INPUTMETHOD_KEY_Cyrillic_LJE                       = 0x6b9,
+    INPUTMETHOD_KEY_Cyrillic_NJE                       = 0x6ba,
+    INPUTMETHOD_KEY_Serbian_TSHE                       = 0x6bb,
+    INPUTMETHOD_KEY_Macedonia_KJE                      = 0x6bc,
+    INPUTMETHOD_KEY_Ukrainian_GHE_WITH_UPTURN          = 0x6bd,
+    INPUTMETHOD_KEY_Byelorussian_SHORTU                = 0x6be,
+    INPUTMETHOD_KEY_Cyrillic_DZHE                      = 0x6bf,
+    INPUTMETHOD_KEY_Cyrillic_yu                        = 0x6c0,
+    INPUTMETHOD_KEY_Cyrillic_a                         = 0x6c1,
+    INPUTMETHOD_KEY_Cyrillic_be                        = 0x6c2,
+    INPUTMETHOD_KEY_Cyrillic_tse                       = 0x6c3,
+    INPUTMETHOD_KEY_Cyrillic_de                        = 0x6c4,
+    INPUTMETHOD_KEY_Cyrillic_ie                        = 0x6c5,
+    INPUTMETHOD_KEY_Cyrillic_ef                        = 0x6c6,
+    INPUTMETHOD_KEY_Cyrillic_ghe                       = 0x6c7,
+    INPUTMETHOD_KEY_Cyrillic_ha                        = 0x6c8,
+    INPUTMETHOD_KEY_Cyrillic_i                         = 0x6c9,
+    INPUTMETHOD_KEY_Cyrillic_shorti                    = 0x6ca,
+    INPUTMETHOD_KEY_Cyrillic_ka                        = 0x6cb,
+    INPUTMETHOD_KEY_Cyrillic_el                        = 0x6cc,
+    INPUTMETHOD_KEY_Cyrillic_em                        = 0x6cd,
+    INPUTMETHOD_KEY_Cyrillic_en                        = 0x6ce,
+    INPUTMETHOD_KEY_Cyrillic_o                         = 0x6cf,
+    INPUTMETHOD_KEY_Cyrillic_pe                        = 0x6d0,
+    INPUTMETHOD_KEY_Cyrillic_ya                        = 0x6d1,
+    INPUTMETHOD_KEY_Cyrillic_er                        = 0x6d2,
+    INPUTMETHOD_KEY_Cyrillic_es                        = 0x6d3,
+    INPUTMETHOD_KEY_Cyrillic_te                        = 0x6d4,
+    INPUTMETHOD_KEY_Cyrillic_u                         = 0x6d5,
+    INPUTMETHOD_KEY_Cyrillic_zhe                       = 0x6d6,
+    INPUTMETHOD_KEY_Cyrillic_ve                        = 0x6d7,
+    INPUTMETHOD_KEY_Cyrillic_softsign                  = 0x6d8,
+    INPUTMETHOD_KEY_Cyrillic_yeru                      = 0x6d9,
+    INPUTMETHOD_KEY_Cyrillic_ze                        = 0x6da,
+    INPUTMETHOD_KEY_Cyrillic_sha                       = 0x6db,
+    INPUTMETHOD_KEY_Cyrillic_e                         = 0x6dc,
+    INPUTMETHOD_KEY_Cyrillic_shcha                     = 0x6dd,
+    INPUTMETHOD_KEY_Cyrillic_che                       = 0x6de,
+    INPUTMETHOD_KEY_Cyrillic_hardsign                  = 0x6df,
+    INPUTMETHOD_KEY_Cyrillic_YU                        = 0x6e0,
+    INPUTMETHOD_KEY_Cyrillic_A                         = 0x6e1,
+    INPUTMETHOD_KEY_Cyrillic_BE                        = 0x6e2,
+    INPUTMETHOD_KEY_Cyrillic_TSE                       = 0x6e3,
+    INPUTMETHOD_KEY_Cyrillic_DE                        = 0x6e4,
+    INPUTMETHOD_KEY_Cyrillic_IE                        = 0x6e5,
+    INPUTMETHOD_KEY_Cyrillic_EF                        = 0x6e6,
+    INPUTMETHOD_KEY_Cyrillic_GHE                       = 0x6e7,
+    INPUTMETHOD_KEY_Cyrillic_HA                        = 0x6e8,
+    INPUTMETHOD_KEY_Cyrillic_I                         = 0x6e9,
+    INPUTMETHOD_KEY_Cyrillic_SHORTI                    = 0x6ea,
+    INPUTMETHOD_KEY_Cyrillic_KA                        = 0x6eb,
+    INPUTMETHOD_KEY_Cyrillic_EL                        = 0x6ec,
+    INPUTMETHOD_KEY_Cyrillic_EM                        = 0x6ed,
+    INPUTMETHOD_KEY_Cyrillic_EN                        = 0x6ee,
+    INPUTMETHOD_KEY_Cyrillic_O                         = 0x6ef,
+    INPUTMETHOD_KEY_Cyrillic_PE                        = 0x6f0,
+    INPUTMETHOD_KEY_Cyrillic_YA                        = 0x6f1,
+    INPUTMETHOD_KEY_Cyrillic_ER                        = 0x6f2,
+    INPUTMETHOD_KEY_Cyrillic_ES                        = 0x6f3,
+    INPUTMETHOD_KEY_Cyrillic_TE                        = 0x6f4,
+    INPUTMETHOD_KEY_Cyrillic_U                         = 0x6f5,
+    INPUTMETHOD_KEY_Cyrillic_ZHE                       = 0x6f6,
+    INPUTMETHOD_KEY_Cyrillic_VE                        = 0x6f7,
+    INPUTMETHOD_KEY_Cyrillic_SOFTSIGN                  = 0x6f8,
+    INPUTMETHOD_KEY_Cyrillic_YERU                      = 0x6f9,
+    INPUTMETHOD_KEY_Cyrillic_ZE                        = 0x6fa,
+    INPUTMETHOD_KEY_Cyrillic_SHA                       = 0x6fb,
+    INPUTMETHOD_KEY_Cyrillic_E                         = 0x6fc,
+    INPUTMETHOD_KEY_Cyrillic_SHCHA                     = 0x6fd,
+    INPUTMETHOD_KEY_Cyrillic_CHE                       = 0x6fe,
+    INPUTMETHOD_KEY_Cyrillic_HARDSIGN                  = 0x6ff,
+
+    /*
+     * Greek
+     * Byte 3 = 7
+     */
+    INPUTMETHOD_KEY_Greek_ALPHAaccent                  = 0x7a1,
+    INPUTMETHOD_KEY_Greek_EPSILONaccent                = 0x7a2,
+    INPUTMETHOD_KEY_Greek_ETAaccent                    = 0x7a3,
+    INPUTMETHOD_KEY_Greek_IOTAaccent                   = 0x7a4,
+    INPUTMETHOD_KEY_Greek_IOTAdieresis                 = 0x7a5,
+    INPUTMETHOD_KEY_Greek_OMICRONaccent                = 0x7a7,
+    INPUTMETHOD_KEY_Greek_UPSILONaccent                = 0x7a8,
+    INPUTMETHOD_KEY_Greek_UPSILONdieresis              = 0x7a9,
+    INPUTMETHOD_KEY_Greek_OMEGAaccent                  = 0x7ab,
+    INPUTMETHOD_KEY_Greek_accentdieresis               = 0x7ae,
+    INPUTMETHOD_KEY_Greek_horizbar                     = 0x7af,
+    INPUTMETHOD_KEY_Greek_alphaaccent                  = 0x7b1,
+    INPUTMETHOD_KEY_Greek_epsilonaccent                = 0x7b2,
+    INPUTMETHOD_KEY_Greek_etaaccent                    = 0x7b3,
+    INPUTMETHOD_KEY_Greek_iotaaccent                   = 0x7b4,
+    INPUTMETHOD_KEY_Greek_iotadieresis                 = 0x7b5,
+    INPUTMETHOD_KEY_Greek_iotaaccentdieresis           = 0x7b6,
+    INPUTMETHOD_KEY_Greek_omicronaccent                = 0x7b7,
+    INPUTMETHOD_KEY_Greek_upsilonaccent                = 0x7b8,
+    INPUTMETHOD_KEY_Greek_upsilondieresis              = 0x7b9,
+    INPUTMETHOD_KEY_Greek_upsilonaccentdieresis        = 0x7ba,
+    INPUTMETHOD_KEY_Greek_omegaaccent                  = 0x7bb,
+    INPUTMETHOD_KEY_Greek_ALPHA                        = 0x7c1,
+    INPUTMETHOD_KEY_Greek_BETA                         = 0x7c2,
+    INPUTMETHOD_KEY_Greek_GAMMA                        = 0x7c3,
+    INPUTMETHOD_KEY_Greek_DELTA                        = 0x7c4,
+    INPUTMETHOD_KEY_Greek_EPSILON                      = 0x7c5,
+    INPUTMETHOD_KEY_Greek_ZETA                         = 0x7c6,
+    INPUTMETHOD_KEY_Greek_ETA                          = 0x7c7,
+    INPUTMETHOD_KEY_Greek_THETA                        = 0x7c8,
+    INPUTMETHOD_KEY_Greek_IOTA                         = 0x7c9,
+    INPUTMETHOD_KEY_Greek_KAPPA                        = 0x7ca,
+    INPUTMETHOD_KEY_Greek_LAMDA                        = 0x7cb,
+    INPUTMETHOD_KEY_Greek_LAMBDA                       = 0x7cb,
+    INPUTMETHOD_KEY_Greek_MU                           = 0x7cc,
+    INPUTMETHOD_KEY_Greek_NU                           = 0x7cd,
+    INPUTMETHOD_KEY_Greek_XI                           = 0x7ce,
+    INPUTMETHOD_KEY_Greek_OMICRON                      = 0x7cf,
+    INPUTMETHOD_KEY_Greek_PI                           = 0x7d0,
+    INPUTMETHOD_KEY_Greek_RHO                          = 0x7d1,
+    INPUTMETHOD_KEY_Greek_SIGMA                        = 0x7d2,
+    INPUTMETHOD_KEY_Greek_TAU                          = 0x7d4,
+    INPUTMETHOD_KEY_Greek_UPSILON                      = 0x7d5,
+    INPUTMETHOD_KEY_Greek_PHI                          = 0x7d6,
+    INPUTMETHOD_KEY_Greek_CHI                          = 0x7d7,
+    INPUTMETHOD_KEY_Greek_PSI                          = 0x7d8,
+    INPUTMETHOD_KEY_Greek_OMEGA                        = 0x7d9,
+    INPUTMETHOD_KEY_Greek_alpha                        = 0x7e1,
+    INPUTMETHOD_KEY_Greek_beta                         = 0x7e2,
+    INPUTMETHOD_KEY_Greek_gamma                        = 0x7e3,
+    INPUTMETHOD_KEY_Greek_delta                        = 0x7e4,
+    INPUTMETHOD_KEY_Greek_epsilon                      = 0x7e5,
+    INPUTMETHOD_KEY_Greek_zeta                         = 0x7e6,
+    INPUTMETHOD_KEY_Greek_eta                          = 0x7e7,
+    INPUTMETHOD_KEY_Greek_theta                        = 0x7e8,
+    INPUTMETHOD_KEY_Greek_iota                         = 0x7e9,
+    INPUTMETHOD_KEY_Greek_kappa                        = 0x7ea,
+    INPUTMETHOD_KEY_Greek_lamda                        = 0x7eb,
+    INPUTMETHOD_KEY_Greek_lambda                       = 0x7eb,
+    INPUTMETHOD_KEY_Greek_mu                           = 0x7ec,
+    INPUTMETHOD_KEY_Greek_nu                           = 0x7ed,
+    INPUTMETHOD_KEY_Greek_xi                           = 0x7ee,
+    INPUTMETHOD_KEY_Greek_omicron                      = 0x7ef,
+    INPUTMETHOD_KEY_Greek_pi                           = 0x7f0,
+    INPUTMETHOD_KEY_Greek_rho                          = 0x7f1,
+    INPUTMETHOD_KEY_Greek_sigma                        = 0x7f2,
+    INPUTMETHOD_KEY_Greek_finalsmallsigma              = 0x7f3,
+    INPUTMETHOD_KEY_Greek_tau                          = 0x7f4,
+    INPUTMETHOD_KEY_Greek_upsilon                      = 0x7f5,
+    INPUTMETHOD_KEY_Greek_phi                          = 0x7f6,
+    INPUTMETHOD_KEY_Greek_chi                          = 0x7f7,
+    INPUTMETHOD_KEY_Greek_psi                          = 0x7f8,
+    INPUTMETHOD_KEY_Greek_omega                        = 0x7f9,
+    INPUTMETHOD_KEY_Greek_switch                       = 0xFF7E,    /* Alias for mode_switch */
+
+    /*
+     * Technical
+     * Byte 3 = 8
+     */
+    INPUTMETHOD_KEY_leftradical                        = 0x8a1,
+    INPUTMETHOD_KEY_topleftradical                     = 0x8a2,
+    INPUTMETHOD_KEY_horizconnector                     = 0x8a3,
+    INPUTMETHOD_KEY_topintegral                        = 0x8a4,
+    INPUTMETHOD_KEY_botintegral                        = 0x8a5,
+    INPUTMETHOD_KEY_vertconnector                      = 0x8a6,
+    INPUTMETHOD_KEY_topleftsqbracket                   = 0x8a7,
+    INPUTMETHOD_KEY_botleftsqbracket                   = 0x8a8,
+    INPUTMETHOD_KEY_toprightsqbracket                  = 0x8a9,
+    INPUTMETHOD_KEY_botrightsqbracket                  = 0x8aa,
+    INPUTMETHOD_KEY_topleftparens                      = 0x8ab,
+    INPUTMETHOD_KEY_botleftparens                      = 0x8ac,
+    INPUTMETHOD_KEY_toprightparens                     = 0x8ad,
+    INPUTMETHOD_KEY_botrightparens                     = 0x8ae,
+    INPUTMETHOD_KEY_leftmiddlecurlybrace               = 0x8af,
+    INPUTMETHOD_KEY_rightmiddlecurlybrace              = 0x8b0,
+    INPUTMETHOD_KEY_topleftsummation                   = 0x8b1,
+    INPUTMETHOD_KEY_botleftsummation                   = 0x8b2,
+    INPUTMETHOD_KEY_topvertsummationconnector          = 0x8b3,
+    INPUTMETHOD_KEY_botvertsummationconnector          = 0x8b4,
+    INPUTMETHOD_KEY_toprightsummation                  = 0x8b5,
+    INPUTMETHOD_KEY_botrightsummation                  = 0x8b6,
+    INPUTMETHOD_KEY_rightmiddlesummation               = 0x8b7,
+    INPUTMETHOD_KEY_lessthanequal                      = 0x8bc,
+    INPUTMETHOD_KEY_notequal                           = 0x8bd,
+    INPUTMETHOD_KEY_greaterthanequal                   = 0x8be,
+    INPUTMETHOD_KEY_integral                           = 0x8bf,
+    INPUTMETHOD_KEY_therefore                          = 0x8c0,
+    INPUTMETHOD_KEY_variation                          = 0x8c1,
+    INPUTMETHOD_KEY_infinity                           = 0x8c2,
+    INPUTMETHOD_KEY_nabla                              = 0x8c5,
+    INPUTMETHOD_KEY_approximate                        = 0x8c8,
+    INPUTMETHOD_KEY_similarequal                       = 0x8c9,
+    INPUTMETHOD_KEY_ifonlyif                           = 0x8cd,
+    INPUTMETHOD_KEY_implies                            = 0x8ce,
+    INPUTMETHOD_KEY_identical                          = 0x8cf,
+    INPUTMETHOD_KEY_radical                            = 0x8d6,
+    INPUTMETHOD_KEY_includedin                         = 0x8da,
+    INPUTMETHOD_KEY_includes                           = 0x8db,
+    INPUTMETHOD_KEY_intersection                       = 0x8dc,
+    INPUTMETHOD_KEY_union                              = 0x8dd,
+    INPUTMETHOD_KEY_logicaland                         = 0x8de,
+    INPUTMETHOD_KEY_logicalor                          = 0x8df,
+    INPUTMETHOD_KEY_partialderivative                  = 0x8ef,
+    INPUTMETHOD_KEY_function                           = 0x8f6,
+    INPUTMETHOD_KEY_leftarrow                          = 0x8fb,
+    INPUTMETHOD_KEY_uparrow                            = 0x8fc,
+    INPUTMETHOD_KEY_rightarrow                         = 0x8fd,
+    INPUTMETHOD_KEY_downarrow                          = 0x8fe,
+
+    /*
+     * Special
+     * Byte 3 = 9
+     */
+    INPUTMETHOD_KEY_blank                              = 0x9df,
+    INPUTMETHOD_KEY_soliddiamond                       = 0x9e0,
+    INPUTMETHOD_KEY_checkerboard                       = 0x9e1,
+    INPUTMETHOD_KEY_ht                                 = 0x9e2,
+    INPUTMETHOD_KEY_ff                                 = 0x9e3,
+    INPUTMETHOD_KEY_cr                                 = 0x9e4,
+    INPUTMETHOD_KEY_lf                                 = 0x9e5,
+    INPUTMETHOD_KEY_nl                                 = 0x9e8,
+    INPUTMETHOD_KEY_vt                                 = 0x9e9,
+    INPUTMETHOD_KEY_lowrightcorner                     = 0x9ea,
+    INPUTMETHOD_KEY_uprightcorner                      = 0x9eb,
+    INPUTMETHOD_KEY_upleftcorner                       = 0x9ec,
+    INPUTMETHOD_KEY_lowleftcorner                      = 0x9ed,
+    INPUTMETHOD_KEY_crossinglines                      = 0x9ee,
+    INPUTMETHOD_KEY_horizlinescan1                     = 0x9ef,
+    INPUTMETHOD_KEY_horizlinescan3                     = 0x9f0,
+    INPUTMETHOD_KEY_horizlinescan5                     = 0x9f1,
+    INPUTMETHOD_KEY_horizlinescan7                     = 0x9f2,
+    INPUTMETHOD_KEY_horizlinescan9                     = 0x9f3,
+    INPUTMETHOD_KEY_leftt                              = 0x9f4,
+    INPUTMETHOD_KEY_rightt                             = 0x9f5,
+    INPUTMETHOD_KEY_bott                               = 0x9f6,
+    INPUTMETHOD_KEY_topt                               = 0x9f7,
+    INPUTMETHOD_KEY_vertbar                            = 0x9f8,
+
+    /*
+     * Publishing
+     * Byte 3 = a
+     */
+    INPUTMETHOD_KEY_emspace                            = 0xaa1,
+    INPUTMETHOD_KEY_enspace                            = 0xaa2,
+    INPUTMETHOD_KEY_em3space                           = 0xaa3,
+    INPUTMETHOD_KEY_em4space                           = 0xaa4,
+    INPUTMETHOD_KEY_digitspace                         = 0xaa5,
+    INPUTMETHOD_KEY_punctspace                         = 0xaa6,
+    INPUTMETHOD_KEY_thinspace                          = 0xaa7,
+    INPUTMETHOD_KEY_hairspace                          = 0xaa8,
+    INPUTMETHOD_KEY_emdash                             = 0xaa9,
+    INPUTMETHOD_KEY_endash                             = 0xaaa,
+    INPUTMETHOD_KEY_signifblank                        = 0xaac,
+    INPUTMETHOD_KEY_ellipsis                           = 0xaae,
+    INPUTMETHOD_KEY_doubbaselinedot                    = 0xaaf,
+    INPUTMETHOD_KEY_onethird                           = 0xab0,
+    INPUTMETHOD_KEY_twothirds                          = 0xab1,
+    INPUTMETHOD_KEY_onefifth                           = 0xab2,
+    INPUTMETHOD_KEY_twofifths                          = 0xab3,
+    INPUTMETHOD_KEY_threefifths                        = 0xab4,
+    INPUTMETHOD_KEY_fourfifths                         = 0xab5,
+    INPUTMETHOD_KEY_onesixth                           = 0xab6,
+    INPUTMETHOD_KEY_fivesixths                         = 0xab7,
+    INPUTMETHOD_KEY_careof                             = 0xab8,
+    INPUTMETHOD_KEY_figdash                            = 0xabb,
+    INPUTMETHOD_KEY_leftanglebracket                   = 0xabc,
+    INPUTMETHOD_KEY_decimalpoint                       = 0xabd,
+    INPUTMETHOD_KEY_rightanglebracket                  = 0xabe,
+    INPUTMETHOD_KEY_marker                             = 0xabf,
+    INPUTMETHOD_KEY_oneeighth                          = 0xac3,
+    INPUTMETHOD_KEY_threeeighths                       = 0xac4,
+    INPUTMETHOD_KEY_fiveeighths                        = 0xac5,
+    INPUTMETHOD_KEY_seveneighths                       = 0xac6,
+    INPUTMETHOD_KEY_trademark                          = 0xac9,
+    INPUTMETHOD_KEY_signaturemark                      = 0xaca,
+    INPUTMETHOD_KEY_trademarkincircle                  = 0xacb,
+    INPUTMETHOD_KEY_leftopentriangle                   = 0xacc,
+    INPUTMETHOD_KEY_rightopentriangle                  = 0xacd,
+    INPUTMETHOD_KEY_emopencircle                       = 0xace,
+    INPUTMETHOD_KEY_emopenrectangle                    = 0xacf,
+    INPUTMETHOD_KEY_leftsinglequotemark                = 0xad0,
+    INPUTMETHOD_KEY_rightsinglequotemark               = 0xad1,
+    INPUTMETHOD_KEY_leftdoublequotemark                = 0xad2,
+    INPUTMETHOD_KEY_rightdoublequotemark               = 0xad3,
+    INPUTMETHOD_KEY_prescription                       = 0xad4,
+    INPUTMETHOD_KEY_minutes                            = 0xad6,
+    INPUTMETHOD_KEY_seconds                            = 0xad7,
+    INPUTMETHOD_KEY_latincross                         = 0xad9,
+    INPUTMETHOD_KEY_hexagram                           = 0xada,
+    INPUTMETHOD_KEY_filledrectbullet                   = 0xadb,
+    INPUTMETHOD_KEY_filledlefttribullet                = 0xadc,
+    INPUTMETHOD_KEY_filledrighttribullet               = 0xadd,
+    INPUTMETHOD_KEY_emfilledcircle                     = 0xade,
+    INPUTMETHOD_KEY_emfilledrect                       = 0xadf,
+    INPUTMETHOD_KEY_enopencircbullet                   = 0xae0,
+    INPUTMETHOD_KEY_enopensquarebullet                 = 0xae1,
+    INPUTMETHOD_KEY_openrectbullet                     = 0xae2,
+    INPUTMETHOD_KEY_opentribulletup                    = 0xae3,
+    INPUTMETHOD_KEY_opentribulletdown                  = 0xae4,
+    INPUTMETHOD_KEY_openstar                           = 0xae5,
+    INPUTMETHOD_KEY_enfilledcircbullet                 = 0xae6,
+    INPUTMETHOD_KEY_enfilledsqbullet                   = 0xae7,
+    INPUTMETHOD_KEY_filledtribulletup                  = 0xae8,
+    INPUTMETHOD_KEY_filledtribulletdown                = 0xae9,
+    INPUTMETHOD_KEY_leftpointer                        = 0xaea,
+    INPUTMETHOD_KEY_rightpointer                       = 0xaeb,
+    INPUTMETHOD_KEY_club                               = 0xaec,
+    INPUTMETHOD_KEY_diamond                            = 0xaed,
+    INPUTMETHOD_KEY_heart                              = 0xaee,
+    INPUTMETHOD_KEY_maltesecross                       = 0xaf0,
+    INPUTMETHOD_KEY_dagger                             = 0xaf1,
+    INPUTMETHOD_KEY_doubledagger                       = 0xaf2,
+    INPUTMETHOD_KEY_checkmark                          = 0xaf3,
+    INPUTMETHOD_KEY_ballotcross                        = 0xaf4,
+    INPUTMETHOD_KEY_musicalsharp                       = 0xaf5,
+    INPUTMETHOD_KEY_musicalflat                        = 0xaf6,
+    INPUTMETHOD_KEY_malesymbol                         = 0xaf7,
+    INPUTMETHOD_KEY_femalesymbol                       = 0xaf8,
+    INPUTMETHOD_KEY_telephone                          = 0xaf9,
+    INPUTMETHOD_KEY_telephonerecorder                  = 0xafa,
+    INPUTMETHOD_KEY_phonographcopyright                = 0xafb,
+    INPUTMETHOD_KEY_caret                              = 0xafc,
+    INPUTMETHOD_KEY_singlelowquotemark                 = 0xafd,
+    INPUTMETHOD_KEY_doublelowquotemark                 = 0xafe,
+    INPUTMETHOD_KEY_cursor                             = 0xaff,
+
+    /*
+     * APL
+     * Byte 3 = b
+     */
+    INPUTMETHOD_KEY_leftcaret                          = 0xba3,
+    INPUTMETHOD_KEY_rightcaret                         = 0xba6,
+    INPUTMETHOD_KEY_downcaret                          = 0xba8,
+    INPUTMETHOD_KEY_upcaret                            = 0xba9,
+    INPUTMETHOD_KEY_overbar                            = 0xbc0,
+    INPUTMETHOD_KEY_downtack                           = 0xbc2,
+    INPUTMETHOD_KEY_upshoe                             = 0xbc3,
+    INPUTMETHOD_KEY_downstile                          = 0xbc4,
+    INPUTMETHOD_KEY_underbar                           = 0xbc6,
+    INPUTMETHOD_KEY_jot                                = 0xbca,
+    INPUTMETHOD_KEY_quad                               = 0xbcc,
+    INPUTMETHOD_KEY_uptack                             = 0xbce,
+    INPUTMETHOD_KEY_circle                             = 0xbcf,
+    INPUTMETHOD_KEY_upstile                            = 0xbd3,
+    INPUTMETHOD_KEY_downshoe                           = 0xbd6,
+    INPUTMETHOD_KEY_rightshoe                          = 0xbd8,
+    INPUTMETHOD_KEY_leftshoe                           = 0xbda,
+    INPUTMETHOD_KEY_lefttack                           = 0xbdc,
+    INPUTMETHOD_KEY_righttack                          = 0xbfc,
+
+    /*
+     * Hebrew
+     * Byte 3 = c
+     */
+    INPUTMETHOD_KEY_hebrew_doublelowline               = 0xcdf,
+    INPUTMETHOD_KEY_hebrew_aleph                       = 0xce0,
+    INPUTMETHOD_KEY_hebrew_bet                         = 0xce1,
+    INPUTMETHOD_KEY_hebrew_gimel                       = 0xce2,
+    INPUTMETHOD_KEY_hebrew_dalet                       = 0xce3,
+    INPUTMETHOD_KEY_hebrew_he                          = 0xce4,
+    INPUTMETHOD_KEY_hebrew_waw                         = 0xce5,
+    INPUTMETHOD_KEY_hebrew_zain                        = 0xce6,
+    INPUTMETHOD_KEY_hebrew_chet                        = 0xce7,
+    INPUTMETHOD_KEY_hebrew_tet                         = 0xce8,
+    INPUTMETHOD_KEY_hebrew_yod                         = 0xce9,
+    INPUTMETHOD_KEY_hebrew_finalkaph                   = 0xcea,
+    INPUTMETHOD_KEY_hebrew_kaph                        = 0xceb,
+    INPUTMETHOD_KEY_hebrew_lamed                       = 0xcec,
+    INPUTMETHOD_KEY_hebrew_finalmem                    = 0xced,
+    INPUTMETHOD_KEY_hebrew_mem                         = 0xcee,
+    INPUTMETHOD_KEY_hebrew_finalnun                    = 0xcef,
+    INPUTMETHOD_KEY_hebrew_nun                         = 0xcf0,
+    INPUTMETHOD_KEY_hebrew_samech                      = 0xcf1,
+    INPUTMETHOD_KEY_hebrew_ayin                        = 0xcf2,
+    INPUTMETHOD_KEY_hebrew_finalpe                     = 0xcf3,
+    INPUTMETHOD_KEY_hebrew_pe                          = 0xcf4,
+    INPUTMETHOD_KEY_hebrew_finalzade                   = 0xcf5,
+    INPUTMETHOD_KEY_hebrew_zade                        = 0xcf6,
+    INPUTMETHOD_KEY_hebrew_qoph                        = 0xcf7,
+    INPUTMETHOD_KEY_hebrew_resh                        = 0xcf8,
+    INPUTMETHOD_KEY_hebrew_shin                        = 0xcf9,
+    INPUTMETHOD_KEY_hebrew_taw                         = 0xcfa,
+    INPUTMETHOD_KEY_Hebrew_switch                      = 0xFF7E,    /* Alias for mode_switch */
+
+    /*
+     * Thai
+     * Byte 3 = d
+     */
+    INPUTMETHOD_KEY_Thai_kokai                         = 0xda1,
+    INPUTMETHOD_KEY_Thai_khokhai                       = 0xda2,
+    INPUTMETHOD_KEY_Thai_khokhuat                      = 0xda3,
+    INPUTMETHOD_KEY_Thai_khokhwai                      = 0xda4,
+    INPUTMETHOD_KEY_Thai_khokhon                       = 0xda5,
+    INPUTMETHOD_KEY_Thai_khorakhang                    = 0xda6,
+    INPUTMETHOD_KEY_Thai_ngongu                        = 0xda7,
+    INPUTMETHOD_KEY_Thai_chochan                       = 0xda8,
+    INPUTMETHOD_KEY_Thai_choching                      = 0xda9,
+    INPUTMETHOD_KEY_Thai_chochang                      = 0xdaa,
+    INPUTMETHOD_KEY_Thai_soso                          = 0xdab,
+    INPUTMETHOD_KEY_Thai_chochoe                       = 0xdac,
+    INPUTMETHOD_KEY_Thai_yoying                        = 0xdad,
+    INPUTMETHOD_KEY_Thai_dochada                       = 0xdae,
+    INPUTMETHOD_KEY_Thai_topatak                       = 0xdaf,
+    INPUTMETHOD_KEY_Thai_thothan                       = 0xdb0,
+    INPUTMETHOD_KEY_Thai_thonangmontho                 = 0xdb1,
+    INPUTMETHOD_KEY_Thai_thophuthao                    = 0xdb2,
+    INPUTMETHOD_KEY_Thai_nonen                         = 0xdb3,
+    INPUTMETHOD_KEY_Thai_dodek                         = 0xdb4,
+    INPUTMETHOD_KEY_Thai_totao                         = 0xdb5,
+    INPUTMETHOD_KEY_Thai_thothung                      = 0xdb6,
+    INPUTMETHOD_KEY_Thai_thothahan                     = 0xdb7,
+    INPUTMETHOD_KEY_Thai_thothong                      = 0xdb8,
+    INPUTMETHOD_KEY_Thai_nonu                          = 0xdb9,
+    INPUTMETHOD_KEY_Thai_bobaimai                      = 0xdba,
+    INPUTMETHOD_KEY_Thai_popla                         = 0xdbb,
+    INPUTMETHOD_KEY_Thai_phophung                      = 0xdbc,
+    INPUTMETHOD_KEY_Thai_fofa                          = 0xdbd,
+    INPUTMETHOD_KEY_Thai_phophan                       = 0xdbe,
+    INPUTMETHOD_KEY_Thai_fofan                         = 0xdbf,
+    INPUTMETHOD_KEY_Thai_phosamphao                    = 0xdc0,
+    INPUTMETHOD_KEY_Thai_moma                          = 0xdc1,
+    INPUTMETHOD_KEY_Thai_yoyak                         = 0xdc2,
+    INPUTMETHOD_KEY_Thai_rorua                         = 0xdc3,
+    INPUTMETHOD_KEY_Thai_ru                            = 0xdc4,
+    INPUTMETHOD_KEY_Thai_loling                        = 0xdc5,
+    INPUTMETHOD_KEY_Thai_lu                            = 0xdc6,
+    INPUTMETHOD_KEY_Thai_wowaen                        = 0xdc7,
+    INPUTMETHOD_KEY_Thai_sosala                        = 0xdc8,
+    INPUTMETHOD_KEY_Thai_sorusi                        = 0xdc9,
+    INPUTMETHOD_KEY_Thai_sosua                         = 0xdca,
+    INPUTMETHOD_KEY_Thai_hohip                         = 0xdcb,
+    INPUTMETHOD_KEY_Thai_lochula                       = 0xdcc,
+    INPUTMETHOD_KEY_Thai_oang                          = 0xdcd,
+    INPUTMETHOD_KEY_Thai_honokhuk                      = 0xdce,
+    INPUTMETHOD_KEY_Thai_paiyannoi                     = 0xdcf,
+    INPUTMETHOD_KEY_Thai_saraa                         = 0xdd0,
+    INPUTMETHOD_KEY_Thai_maihanakat                    = 0xdd1,
+    INPUTMETHOD_KEY_Thai_saraaa                        = 0xdd2,
+    INPUTMETHOD_KEY_Thai_saraam                        = 0xdd3,
+    INPUTMETHOD_KEY_Thai_sarai                         = 0xdd4,
+    INPUTMETHOD_KEY_Thai_saraii                        = 0xdd5,
+    INPUTMETHOD_KEY_Thai_saraue                        = 0xdd6,
+    INPUTMETHOD_KEY_Thai_sarauee                       = 0xdd7,
+    INPUTMETHOD_KEY_Thai_sarau                         = 0xdd8,
+    INPUTMETHOD_KEY_Thai_sarauu                        = 0xdd9,
+    INPUTMETHOD_KEY_Thai_phinthu                       = 0xdda,
+    INPUTMETHOD_KEY_Thai_maihanakat_maitho             = 0xdde,
+    INPUTMETHOD_KEY_Thai_baht                          = 0xddf,
+    INPUTMETHOD_KEY_Thai_sarae                         = 0xde0,
+    INPUTMETHOD_KEY_Thai_saraae                        = 0xde1,
+    INPUTMETHOD_KEY_Thai_sarao                         = 0xde2,
+    INPUTMETHOD_KEY_Thai_saraaimaimuan                 = 0xde3,
+    INPUTMETHOD_KEY_Thai_saraaimaimalai                = 0xde4,
+    INPUTMETHOD_KEY_Thai_lakkhangyao                   = 0xde5,
+    INPUTMETHOD_KEY_Thai_maiyamok                      = 0xde6,
+    INPUTMETHOD_KEY_Thai_maitaikhu                     = 0xde7,
+    INPUTMETHOD_KEY_Thai_maiek                         = 0xde8,
+    INPUTMETHOD_KEY_Thai_maitho                        = 0xde9,
+    INPUTMETHOD_KEY_Thai_maitri                        = 0xdea,
+    INPUTMETHOD_KEY_Thai_maichattawa                   = 0xdeb,
+    INPUTMETHOD_KEY_Thai_thanthakhat                   = 0xdec,
+    INPUTMETHOD_KEY_Thai_nikhahit                      = 0xded,
+    INPUTMETHOD_KEY_Thai_leksun                        = 0xdf0,
+    INPUTMETHOD_KEY_Thai_leknung                       = 0xdf1,
+    INPUTMETHOD_KEY_Thai_leksong                       = 0xdf2,
+    INPUTMETHOD_KEY_Thai_leksam                        = 0xdf3,
+    INPUTMETHOD_KEY_Thai_leksi                         = 0xdf4,
+    INPUTMETHOD_KEY_Thai_lekha                         = 0xdf5,
+    INPUTMETHOD_KEY_Thai_lekhok                        = 0xdf6,
+    INPUTMETHOD_KEY_Thai_lekchet                       = 0xdf7,
+    INPUTMETHOD_KEY_Thai_lekpaet                       = 0xdf8,
+    INPUTMETHOD_KEY_Thai_lekkao                        = 0xdf9,
+
+    /*
+     *   Korean
+     *   Byte 3 = e
+     */
+    INPUTMETHOD_KEY_Hangul                             = 0xff31,    /* Hangul start/stop(toggle) */
+    INPUTMETHOD_KEY_Hangul_Start                       = 0xff32,    /* Hangul start */
+    INPUTMETHOD_KEY_Hangul_End                         = 0xff33,    /* Hangul end, English start */
+    INPUTMETHOD_KEY_Hangul_Hanja                       = 0xff34,    /* Start Hangul->Hanja Conversion */
+    INPUTMETHOD_KEY_Hangul_Jamo                        = 0xff35,    /* Hangul Jamo mode */
+    INPUTMETHOD_KEY_Hangul_Romaja                      = 0xff36,    /* Hangul Romaja mode */
+    INPUTMETHOD_KEY_Hangul_Codeinput                   = 0xff37,    /* Hangul code input mode */
+    INPUTMETHOD_KEY_Hangul_Jeonja                      = 0xff38,    /* Jeonja mode */
+    INPUTMETHOD_KEY_Hangul_Banja                       = 0xff39,    /* Banja mode */
+    INPUTMETHOD_KEY_Hangul_PreHanja                    = 0xff3a,    /* Pre Hanja conversion */
+    INPUTMETHOD_KEY_Hangul_PostHanja                   = 0xff3b,    /* Post Hanja conversion */
+    INPUTMETHOD_KEY_Hangul_SingleCandidate             = 0xff3c,    /* Single candidate */
+    INPUTMETHOD_KEY_Hangul_MultipleCandidate           = 0xff3d,    /* Multiple candidate */
+    INPUTMETHOD_KEY_Hangul_PreviousCandidate           = 0xff3e,    /* Previous candidate */
+    INPUTMETHOD_KEY_Hangul_Special                     = 0xff3f,    /* Special symbols */
+    INPUTMETHOD_KEY_Hangul_switch                      = 0xFF7E,    /* Alias for mode_switch */
+
+    /* Hangul Consonant Characters */
+    INPUTMETHOD_KEY_Hangul_Kiyeog                      = 0xea1,
+    INPUTMETHOD_KEY_Hangul_SsangKiyeog                 = 0xea2,
+    INPUTMETHOD_KEY_Hangul_KiyeogSios                  = 0xea3,
+    INPUTMETHOD_KEY_Hangul_Nieun                       = 0xea4,
+    INPUTMETHOD_KEY_Hangul_NieunJieuj                  = 0xea5,
+    INPUTMETHOD_KEY_Hangul_NieunHieuh                  = 0xea6,
+    INPUTMETHOD_KEY_Hangul_Dikeud                      = 0xea7,
+    INPUTMETHOD_KEY_Hangul_SsangDikeud                 = 0xea8,
+    INPUTMETHOD_KEY_Hangul_Rieul                       = 0xea9,
+    INPUTMETHOD_KEY_Hangul_RieulKiyeog                 = 0xeaa,
+    INPUTMETHOD_KEY_Hangul_RieulMieum                  = 0xeab,
+    INPUTMETHOD_KEY_Hangul_RieulPieub                  = 0xeac,
+    INPUTMETHOD_KEY_Hangul_RieulSios                   = 0xead,
+    INPUTMETHOD_KEY_Hangul_RieulTieut                  = 0xeae,
+    INPUTMETHOD_KEY_Hangul_RieulPhieuf                 = 0xeaf,
+    INPUTMETHOD_KEY_Hangul_RieulHieuh                  = 0xeb0,
+    INPUTMETHOD_KEY_Hangul_Mieum                       = 0xeb1,
+    INPUTMETHOD_KEY_Hangul_Pieub                       = 0xeb2,
+    INPUTMETHOD_KEY_Hangul_SsangPieub                  = 0xeb3,
+    INPUTMETHOD_KEY_Hangul_PieubSios                   = 0xeb4,
+    INPUTMETHOD_KEY_Hangul_Sios                        = 0xeb5,
+    INPUTMETHOD_KEY_Hangul_SsangSios                   = 0xeb6,
+    INPUTMETHOD_KEY_Hangul_Ieung                       = 0xeb7,
+    INPUTMETHOD_KEY_Hangul_Jieuj                       = 0xeb8,
+    INPUTMETHOD_KEY_Hangul_SsangJieuj                  = 0xeb9,
+    INPUTMETHOD_KEY_Hangul_Cieuc                       = 0xeba,
+    INPUTMETHOD_KEY_Hangul_Khieuq                      = 0xebb,
+    INPUTMETHOD_KEY_Hangul_Tieut                       = 0xebc,
+    INPUTMETHOD_KEY_Hangul_Phieuf                      = 0xebd,
+    INPUTMETHOD_KEY_Hangul_Hieuh                       = 0xebe,
+
+    /* Hangul Vowel Characters */
+    INPUTMETHOD_KEY_Hangul_A                           = 0xebf,
+    INPUTMETHOD_KEY_Hangul_AE                          = 0xec0,
+    INPUTMETHOD_KEY_Hangul_YA                          = 0xec1,
+    INPUTMETHOD_KEY_Hangul_YAE                         = 0xec2,
+    INPUTMETHOD_KEY_Hangul_EO                          = 0xec3,
+    INPUTMETHOD_KEY_Hangul_E                           = 0xec4,
+    INPUTMETHOD_KEY_Hangul_YEO                         = 0xec5,
+    INPUTMETHOD_KEY_Hangul_YE                          = 0xec6,
+    INPUTMETHOD_KEY_Hangul_O                           = 0xec7,
+    INPUTMETHOD_KEY_Hangul_WA                          = 0xec8,
+    INPUTMETHOD_KEY_Hangul_WAE                         = 0xec9,
+    INPUTMETHOD_KEY_Hangul_OE                          = 0xeca,
+    INPUTMETHOD_KEY_Hangul_YO                          = 0xecb,
+    INPUTMETHOD_KEY_Hangul_U                           = 0xecc,
+    INPUTMETHOD_KEY_Hangul_WEO                         = 0xecd,
+    INPUTMETHOD_KEY_Hangul_WE                          = 0xece,
+    INPUTMETHOD_KEY_Hangul_WI                          = 0xecf,
+    INPUTMETHOD_KEY_Hangul_YU                          = 0xed0,
+    INPUTMETHOD_KEY_Hangul_EU                          = 0xed1,
+    INPUTMETHOD_KEY_Hangul_YI                          = 0xed2,
+    INPUTMETHOD_KEY_Hangul_I                           = 0xed3,
+
+    /* Hangul syllable-final (JongSeong) Characters */
+    INPUTMETHOD_KEY_Hangul_J_Kiyeog                    = 0xed4,
+    INPUTMETHOD_KEY_Hangul_J_SsangKiyeog               = 0xed5,
+    INPUTMETHOD_KEY_Hangul_J_KiyeogSios                = 0xed6,
+    INPUTMETHOD_KEY_Hangul_J_Nieun                     = 0xed7,
+    INPUTMETHOD_KEY_Hangul_J_NieunJieuj                = 0xed8,
+    INPUTMETHOD_KEY_Hangul_J_NieunHieuh                = 0xed9,
+    INPUTMETHOD_KEY_Hangul_J_Dikeud                    = 0xeda,
+    INPUTMETHOD_KEY_Hangul_J_Rieul                     = 0xedb,
+    INPUTMETHOD_KEY_Hangul_J_RieulKiyeog               = 0xedc,
+    INPUTMETHOD_KEY_Hangul_J_RieulMieum                = 0xedd,
+    INPUTMETHOD_KEY_Hangul_J_RieulPieub                = 0xede,
+    INPUTMETHOD_KEY_Hangul_J_RieulSios                 = 0xedf,
+    INPUTMETHOD_KEY_Hangul_J_RieulTieut                = 0xee0,
+    INPUTMETHOD_KEY_Hangul_J_RieulPhieuf               = 0xee1,
+    INPUTMETHOD_KEY_Hangul_J_RieulHieuh                = 0xee2,
+    INPUTMETHOD_KEY_Hangul_J_Mieum                     = 0xee3,
+    INPUTMETHOD_KEY_Hangul_J_Pieub                     = 0xee4,
+    INPUTMETHOD_KEY_Hangul_J_PieubSios                 = 0xee5,
+    INPUTMETHOD_KEY_Hangul_J_Sios                      = 0xee6,
+    INPUTMETHOD_KEY_Hangul_J_SsangSios                 = 0xee7,
+    INPUTMETHOD_KEY_Hangul_J_Ieung                     = 0xee8,
+    INPUTMETHOD_KEY_Hangul_J_Jieuj                     = 0xee9,
+    INPUTMETHOD_KEY_Hangul_J_Cieuc                     = 0xeea,
+    INPUTMETHOD_KEY_Hangul_J_Khieuq                    = 0xeeb,
+    INPUTMETHOD_KEY_Hangul_J_Tieut                     = 0xeec,
+    INPUTMETHOD_KEY_Hangul_J_Phieuf                    = 0xeed,
+    INPUTMETHOD_KEY_Hangul_J_Hieuh                     = 0xeee,
+
+    /* Ancient Hangul Consonant Characters */
+    INPUTMETHOD_KEY_Hangul_RieulYeorinHieuh            = 0xeef,
+    INPUTMETHOD_KEY_Hangul_SunkyeongeumMieum           = 0xef0,
+    INPUTMETHOD_KEY_Hangul_SunkyeongeumPieub           = 0xef1,
+    INPUTMETHOD_KEY_Hangul_PanSios                     = 0xef2,
+    INPUTMETHOD_KEY_Hangul_KkogjiDalrinIeung           = 0xef3,
+    INPUTMETHOD_KEY_Hangul_SunkyeongeumPhieuf          = 0xef4,
+    INPUTMETHOD_KEY_Hangul_YeorinHieuh                 = 0xef5,
+
+    /* Ancient Hangul Vowel Characters */
+    INPUTMETHOD_KEY_Hangul_AraeA                       = 0xef6,
+    INPUTMETHOD_KEY_Hangul_AraeAE                      = 0xef7,
+
+    /* Ancient Hangul syllable-final (JongSeong) Characters */
+    INPUTMETHOD_KEY_Hangul_J_PanSios                   = 0xef8,
+    INPUTMETHOD_KEY_Hangul_J_KkogjiDalrinIeung         = 0xef9,
+    INPUTMETHOD_KEY_Hangul_J_YeorinHieuh               = 0xefa,
+
+    /* Korean currency symbol */
+    INPUTMETHOD_KEY_Korean_Won                         = 0xeff,
+
+    /*
+     *   Armenian
+     *   Byte 3 = 0x14
+     */
+    INPUTMETHOD_KEY_Armenian_eternity                  = 0x14a1,
+    INPUTMETHOD_KEY_Armenian_ligature_ew               = 0x14a2,
+    INPUTMETHOD_KEY_Armenian_full_stop                 = 0x14a3,
+    INPUTMETHOD_KEY_Armenian_verjaket                  = 0x14a3,
+    INPUTMETHOD_KEY_Armenian_parenright                = 0x14a4,
+    INPUTMETHOD_KEY_Armenian_parenleft                 = 0x14a5,
+    INPUTMETHOD_KEY_Armenian_guillemotright            = 0x14a6,
+    INPUTMETHOD_KEY_Armenian_guillemotleft             = 0x14a7,
+    INPUTMETHOD_KEY_Armenian_em_dash                   = 0x14a8,
+    INPUTMETHOD_KEY_Armenian_dot                       = 0x14a9,
+    INPUTMETHOD_KEY_Armenian_mijaket                   = 0x14a9,
+    INPUTMETHOD_KEY_Armenian_separation_mark           = 0x14aa,
+    INPUTMETHOD_KEY_Armenian_but                       = 0x14aa,
+    INPUTMETHOD_KEY_Armenian_comma                     = 0x14ab,
+    INPUTMETHOD_KEY_Armenian_en_dash                   = 0x14ac,
+    INPUTMETHOD_KEY_Armenian_hyphen                    = 0x14ad,
+    INPUTMETHOD_KEY_Armenian_yentamna                  = 0x14ad,
+    INPUTMETHOD_KEY_Armenian_ellipsis                  = 0x14ae,
+    INPUTMETHOD_KEY_Armenian_exclam                    = 0x14af,
+    INPUTMETHOD_KEY_Armenian_amanak                    = 0x14af,
+    INPUTMETHOD_KEY_Armenian_accent                    = 0x14b0,
+    INPUTMETHOD_KEY_Armenian_shesht                    = 0x14b0,
+    INPUTMETHOD_KEY_Armenian_question                  = 0x14b1,
+    INPUTMETHOD_KEY_Armenian_paruyk                    = 0x14b1,
+    INPUTMETHOD_KEY_Armenian_AYB                       = 0x14b2,
+    INPUTMETHOD_KEY_Armenian_ayb                       = 0x14b3,
+    INPUTMETHOD_KEY_Armenian_BEN                       = 0x14b4,
+    INPUTMETHOD_KEY_Armenian_ben                       = 0x14b5,
+    INPUTMETHOD_KEY_Armenian_GIM                       = 0x14b6,
+    INPUTMETHOD_KEY_Armenian_gim                       = 0x14b7,
+    INPUTMETHOD_KEY_Armenian_DA                        = 0x14b8,
+    INPUTMETHOD_KEY_Armenian_da                        = 0x14b9,
+    INPUTMETHOD_KEY_Armenian_YECH                      = 0x14ba,
+    INPUTMETHOD_KEY_Armenian_yech                      = 0x14bb,
+    INPUTMETHOD_KEY_Armenian_ZA                        = 0x14bc,
+    INPUTMETHOD_KEY_Armenian_za                        = 0x14bd,
+    INPUTMETHOD_KEY_Armenian_E                         = 0x14be,
+    INPUTMETHOD_KEY_Armenian_e                         = 0x14bf,
+    INPUTMETHOD_KEY_Armenian_AT                        = 0x14c0,
+    INPUTMETHOD_KEY_Armenian_at                        = 0x14c1,
+    INPUTMETHOD_KEY_Armenian_TO                        = 0x14c2,
+    INPUTMETHOD_KEY_Armenian_to                        = 0x14c3,
+    INPUTMETHOD_KEY_Armenian_ZHE                       = 0x14c4,
+    INPUTMETHOD_KEY_Armenian_zhe                       = 0x14c5,
+    INPUTMETHOD_KEY_Armenian_INI                       = 0x14c6,
+    INPUTMETHOD_KEY_Armenian_ini                       = 0x14c7,
+    INPUTMETHOD_KEY_Armenian_LYUN                      = 0x14c8,
+    INPUTMETHOD_KEY_Armenian_lyun                      = 0x14c9,
+    INPUTMETHOD_KEY_Armenian_KHE                       = 0x14ca,
+    INPUTMETHOD_KEY_Armenian_khe                       = 0x14cb,
+    INPUTMETHOD_KEY_Armenian_TSA                       = 0x14cc,
+    INPUTMETHOD_KEY_Armenian_tsa                       = 0x14cd,
+    INPUTMETHOD_KEY_Armenian_KEN                       = 0x14ce,
+    INPUTMETHOD_KEY_Armenian_ken                       = 0x14cf,
+    INPUTMETHOD_KEY_Armenian_HO                        = 0x14d0,
+    INPUTMETHOD_KEY_Armenian_ho                        = 0x14d1,
+    INPUTMETHOD_KEY_Armenian_DZA                       = 0x14d2,
+    INPUTMETHOD_KEY_Armenian_dza                       = 0x14d3,
+    INPUTMETHOD_KEY_Armenian_GHAT                      = 0x14d4,
+    INPUTMETHOD_KEY_Armenian_ghat                      = 0x14d5,
+    INPUTMETHOD_KEY_Armenian_TCHE                      = 0x14d6,
+    INPUTMETHOD_KEY_Armenian_tche                      = 0x14d7,
+    INPUTMETHOD_KEY_Armenian_MEN                       = 0x14d8,
+    INPUTMETHOD_KEY_Armenian_men                       = 0x14d9,
+    INPUTMETHOD_KEY_Armenian_HI                        = 0x14da,
+    INPUTMETHOD_KEY_Armenian_hi                        = 0x14db,
+    INPUTMETHOD_KEY_Armenian_NU                        = 0x14dc,
+    INPUTMETHOD_KEY_Armenian_nu                        = 0x14dd,
+    INPUTMETHOD_KEY_Armenian_SHA                       = 0x14de,
+    INPUTMETHOD_KEY_Armenian_sha                       = 0x14df,
+    INPUTMETHOD_KEY_Armenian_VO                        = 0x14e0,
+    INPUTMETHOD_KEY_Armenian_vo                        = 0x14e1,
+    INPUTMETHOD_KEY_Armenian_CHA                       = 0x14e2,
+    INPUTMETHOD_KEY_Armenian_cha                       = 0x14e3,
+    INPUTMETHOD_KEY_Armenian_PE                        = 0x14e4,
+    INPUTMETHOD_KEY_Armenian_pe                        = 0x14e5,
+    INPUTMETHOD_KEY_Armenian_JE                        = 0x14e6,
+    INPUTMETHOD_KEY_Armenian_je                        = 0x14e7,
+    INPUTMETHOD_KEY_Armenian_RA                        = 0x14e8,
+    INPUTMETHOD_KEY_Armenian_ra                        = 0x14e9,
+    INPUTMETHOD_KEY_Armenian_SE                        = 0x14ea,
+    INPUTMETHOD_KEY_Armenian_se                        = 0x14eb,
+    INPUTMETHOD_KEY_Armenian_VEV                       = 0x14ec,
+    INPUTMETHOD_KEY_Armenian_vev                       = 0x14ed,
+    INPUTMETHOD_KEY_Armenian_TYUN                      = 0x14ee,
+    INPUTMETHOD_KEY_Armenian_tyun                      = 0x14ef,
+    INPUTMETHOD_KEY_Armenian_RE                        = 0x14f0,
+    INPUTMETHOD_KEY_Armenian_re                        = 0x14f1,
+    INPUTMETHOD_KEY_Armenian_TSO                       = 0x14f2,
+    INPUTMETHOD_KEY_Armenian_tso                       = 0x14f3,
+    INPUTMETHOD_KEY_Armenian_VYUN                      = 0x14f4,
+    INPUTMETHOD_KEY_Armenian_vyun                      = 0x14f5,
+    INPUTMETHOD_KEY_Armenian_PYUR                      = 0x14f6,
+    INPUTMETHOD_KEY_Armenian_pyur                      = 0x14f7,
+    INPUTMETHOD_KEY_Armenian_KE                        = 0x14f8,
+    INPUTMETHOD_KEY_Armenian_ke                        = 0x14f9,
+    INPUTMETHOD_KEY_Armenian_O                         = 0x14fa,
+    INPUTMETHOD_KEY_Armenian_o                         = 0x14fb,
+    INPUTMETHOD_KEY_Armenian_FE                        = 0x14fc,
+    INPUTMETHOD_KEY_Armenian_fe                        = 0x14fd,
+    INPUTMETHOD_KEY_Armenian_apostrophe                = 0x14fe,
+    INPUTMETHOD_KEY_Armenian_section_sign              = 0x14ff,
+
+    /*
+     * Georgian
+     * Byte 3 = 0x15
+     */
+    INPUTMETHOD_KEY_Georgian_an                        = 0x15d0,
+    INPUTMETHOD_KEY_Georgian_ban                       = 0x15d1,
+    INPUTMETHOD_KEY_Georgian_gan                       = 0x15d2,
+    INPUTMETHOD_KEY_Georgian_don                       = 0x15d3,
+    INPUTMETHOD_KEY_Georgian_en                        = 0x15d4,
+    INPUTMETHOD_KEY_Georgian_vin                       = 0x15d5,
+    INPUTMETHOD_KEY_Georgian_zen                       = 0x15d6,
+    INPUTMETHOD_KEY_Georgian_tan                       = 0x15d7,
+    INPUTMETHOD_KEY_Georgian_in                        = 0x15d8,
+    INPUTMETHOD_KEY_Georgian_kan                       = 0x15d9,
+    INPUTMETHOD_KEY_Georgian_las                       = 0x15da,
+    INPUTMETHOD_KEY_Georgian_man                       = 0x15db,
+    INPUTMETHOD_KEY_Georgian_nar                       = 0x15dc,
+    INPUTMETHOD_KEY_Georgian_on                        = 0x15dd,
+    INPUTMETHOD_KEY_Georgian_par                       = 0x15de,
+    INPUTMETHOD_KEY_Georgian_zhar                      = 0x15df,
+    INPUTMETHOD_KEY_Georgian_rae                       = 0x15e0,
+    INPUTMETHOD_KEY_Georgian_san                       = 0x15e1,
+    INPUTMETHOD_KEY_Georgian_tar                       = 0x15e2,
+    INPUTMETHOD_KEY_Georgian_un                        = 0x15e3,
+    INPUTMETHOD_KEY_Georgian_phar                      = 0x15e4,
+    INPUTMETHOD_KEY_Georgian_khar                      = 0x15e5,
+    INPUTMETHOD_KEY_Georgian_ghan                      = 0x15e6,
+    INPUTMETHOD_KEY_Georgian_qar                       = 0x15e7,
+    INPUTMETHOD_KEY_Georgian_shin                      = 0x15e8,
+    INPUTMETHOD_KEY_Georgian_chin                      = 0x15e9,
+    INPUTMETHOD_KEY_Georgian_can                       = 0x15ea,
+    INPUTMETHOD_KEY_Georgian_jil                       = 0x15eb,
+    INPUTMETHOD_KEY_Georgian_cil                       = 0x15ec,
+    INPUTMETHOD_KEY_Georgian_char                      = 0x15ed,
+    INPUTMETHOD_KEY_Georgian_xan                       = 0x15ee,
+    INPUTMETHOD_KEY_Georgian_jhan                      = 0x15ef,
+    INPUTMETHOD_KEY_Georgian_hae                       = 0x15f0,
+    INPUTMETHOD_KEY_Georgian_he                        = 0x15f1,
+    INPUTMETHOD_KEY_Georgian_hie                       = 0x15f2,
+    INPUTMETHOD_KEY_Georgian_we                        = 0x15f3,
+    INPUTMETHOD_KEY_Georgian_har                       = 0x15f4,
+    INPUTMETHOD_KEY_Georgian_hoe                       = 0x15f5,
+    INPUTMETHOD_KEY_Georgian_fi                        = 0x15f6,
+
+    /*
+     * Azeri (and other Turkic or Caucasian languages of ex-USSR)
+     * Byte 3 = 0x16
+     */
+    /* latin */
+    INPUTMETHOD_KEY_Ccedillaabovedot                   = 0x16a2,
+    INPUTMETHOD_KEY_Xabovedot                          = 0x16a3,
+    INPUTMETHOD_KEY_Qabovedot                          = 0x16a5,
+    INPUTMETHOD_KEY_Ibreve                             = 0x16a6,
+    INPUTMETHOD_KEY_IE                                 = 0x16a7,
+    INPUTMETHOD_KEY_UO                                 = 0x16a8,
+    INPUTMETHOD_KEY_Zstroke                            = 0x16a9,
+    INPUTMETHOD_KEY_Gcaron                             = 0x16aa,
+    INPUTMETHOD_KEY_Obarred                            = 0x16af,
+    INPUTMETHOD_KEY_ccedillaabovedot                   = 0x16b2,
+    INPUTMETHOD_KEY_xabovedot                          = 0x16b3,
+    INPUTMETHOD_KEY_Ocaron                             = 0x16b4,
+    INPUTMETHOD_KEY_qabovedot                          = 0x16b5,
+    INPUTMETHOD_KEY_ibreve                             = 0x16b6,
+    INPUTMETHOD_KEY_ie                                 = 0x16b7,
+    INPUTMETHOD_KEY_uo                                 = 0x16b8,
+    INPUTMETHOD_KEY_zstroke                            = 0x16b9,
+    INPUTMETHOD_KEY_gcaron                             = 0x16ba,
+    INPUTMETHOD_KEY_ocaron                             = 0x16bd,
+    INPUTMETHOD_KEY_obarred                            = 0x16bf,
+    INPUTMETHOD_KEY_SCHWA                              = 0x16c6,
+    INPUTMETHOD_KEY_schwa                              = 0x16f6,
+    /* those are not really Caucasus, but I put them here for now */
+    /* For Inupiak */
+    INPUTMETHOD_KEY_Lbelowdot                          = 0x16d1,
+    INPUTMETHOD_KEY_Lstrokebelowdot                    = 0x16d2,
+    INPUTMETHOD_KEY_lbelowdot                          = 0x16e1,
+    INPUTMETHOD_KEY_lstrokebelowdot                    = 0x16e2,
+    /* For Guarani */
+    INPUTMETHOD_KEY_Gtilde                             = 0x16d3,
+    INPUTMETHOD_KEY_gtilde                             = 0x16e3,
+
+    /*
+     * Vietnamese
+     * Byte 3 = 0x1e
+     */
+    INPUTMETHOD_KEY_Abelowdot                          = 0x1ea0,
+    INPUTMETHOD_KEY_abelowdot                          = 0x1ea1,
+    INPUTMETHOD_KEY_Ahook                              = 0x1ea2,
+    INPUTMETHOD_KEY_ahook                              = 0x1ea3,
+    INPUTMETHOD_KEY_Acircumflexacute                   = 0x1ea4,
+    INPUTMETHOD_KEY_acircumflexacute                   = 0x1ea5,
+    INPUTMETHOD_KEY_Acircumflexgrave                   = 0x1ea6,
+    INPUTMETHOD_KEY_acircumflexgrave                   = 0x1ea7,
+    INPUTMETHOD_KEY_Acircumflexhook                    = 0x1ea8,
+    INPUTMETHOD_KEY_acircumflexhook                    = 0x1ea9,
+    INPUTMETHOD_KEY_Acircumflextilde                   = 0x1eaa,
+    INPUTMETHOD_KEY_acircumflextilde                   = 0x1eab,
+    INPUTMETHOD_KEY_Acircumflexbelowdot                = 0x1eac,
+    INPUTMETHOD_KEY_acircumflexbelowdot                = 0x1ead,
+    INPUTMETHOD_KEY_Abreveacute                        = 0x1eae,
+    INPUTMETHOD_KEY_abreveacute                        = 0x1eaf,
+    INPUTMETHOD_KEY_Abrevegrave                        = 0x1eb0,
+    INPUTMETHOD_KEY_abrevegrave                        = 0x1eb1,
+    INPUTMETHOD_KEY_Abrevehook                         = 0x1eb2,
+    INPUTMETHOD_KEY_abrevehook                         = 0x1eb3,
+    INPUTMETHOD_KEY_Abrevetilde                        = 0x1eb4,
+    INPUTMETHOD_KEY_abrevetilde                        = 0x1eb5,
+    INPUTMETHOD_KEY_Abrevebelowdot                     = 0x1eb6,
+    INPUTMETHOD_KEY_abrevebelowdot                     = 0x1eb7,
+    INPUTMETHOD_KEY_Ebelowdot                          = 0x1eb8,
+    INPUTMETHOD_KEY_ebelowdot                          = 0x1eb9,
+    INPUTMETHOD_KEY_Ehook                              = 0x1eba,
+    INPUTMETHOD_KEY_ehook                              = 0x1ebb,
+    INPUTMETHOD_KEY_Etilde                             = 0x1ebc,
+    INPUTMETHOD_KEY_etilde                             = 0x1ebd,
+    INPUTMETHOD_KEY_Ecircumflexacute                   = 0x1ebe,
+    INPUTMETHOD_KEY_ecircumflexacute                   = 0x1ebf,
+    INPUTMETHOD_KEY_Ecircumflexgrave                   = 0x1ec0,
+    INPUTMETHOD_KEY_ecircumflexgrave                   = 0x1ec1,
+    INPUTMETHOD_KEY_Ecircumflexhook                    = 0x1ec2,
+    INPUTMETHOD_KEY_ecircumflexhook                    = 0x1ec3,
+    INPUTMETHOD_KEY_Ecircumflextilde                   = 0x1ec4,
+    INPUTMETHOD_KEY_ecircumflextilde                   = 0x1ec5,
+    INPUTMETHOD_KEY_Ecircumflexbelowdot                = 0x1ec6,
+    INPUTMETHOD_KEY_ecircumflexbelowdot                = 0x1ec7,
+    INPUTMETHOD_KEY_Ihook                              = 0x1ec8,
+    INPUTMETHOD_KEY_ihook                              = 0x1ec9,
+    INPUTMETHOD_KEY_Ibelowdot                          = 0x1eca,
+    INPUTMETHOD_KEY_ibelowdot                          = 0x1ecb,
+    INPUTMETHOD_KEY_Obelowdot                          = 0x1ecc,
+    INPUTMETHOD_KEY_obelowdot                          = 0x1ecd,
+    INPUTMETHOD_KEY_Ohook                              = 0x1ece,
+    INPUTMETHOD_KEY_ohook                              = 0x1ecf,
+    INPUTMETHOD_KEY_Ocircumflexacute                   = 0x1ed0,
+    INPUTMETHOD_KEY_ocircumflexacute                   = 0x1ed1,
+    INPUTMETHOD_KEY_Ocircumflexgrave                   = 0x1ed2,
+    INPUTMETHOD_KEY_ocircumflexgrave                   = 0x1ed3,
+    INPUTMETHOD_KEY_Ocircumflexhook                    = 0x1ed4,
+    INPUTMETHOD_KEY_ocircumflexhook                    = 0x1ed5,
+    INPUTMETHOD_KEY_Ocircumflextilde                   = 0x1ed6,
+    INPUTMETHOD_KEY_ocircumflextilde                   = 0x1ed7,
+    INPUTMETHOD_KEY_Ocircumflexbelowdot                = 0x1ed8,
+    INPUTMETHOD_KEY_ocircumflexbelowdot                = 0x1ed9,
+    INPUTMETHOD_KEY_Ohornacute                         = 0x1eda,
+    INPUTMETHOD_KEY_ohornacute                         = 0x1edb,
+    INPUTMETHOD_KEY_Ohorngrave                         = 0x1edc,
+    INPUTMETHOD_KEY_ohorngrave                         = 0x1edd,
+    INPUTMETHOD_KEY_Ohornhook                          = 0x1ede,
+    INPUTMETHOD_KEY_ohornhook                          = 0x1edf,
+    INPUTMETHOD_KEY_Ohorntilde                         = 0x1ee0,
+    INPUTMETHOD_KEY_ohorntilde                         = 0x1ee1,
+    INPUTMETHOD_KEY_Ohornbelowdot                      = 0x1ee2,
+    INPUTMETHOD_KEY_ohornbelowdot                      = 0x1ee3,
+    INPUTMETHOD_KEY_Ubelowdot                          = 0x1ee4,
+    INPUTMETHOD_KEY_ubelowdot                          = 0x1ee5,
+    INPUTMETHOD_KEY_Uhook                              = 0x1ee6,
+    INPUTMETHOD_KEY_uhook                              = 0x1ee7,
+    INPUTMETHOD_KEY_Uhornacute                         = 0x1ee8,
+    INPUTMETHOD_KEY_uhornacute                         = 0x1ee9,
+    INPUTMETHOD_KEY_Uhorngrave                         = 0x1eea,
+    INPUTMETHOD_KEY_uhorngrave                         = 0x1eeb,
+    INPUTMETHOD_KEY_Uhornhook                          = 0x1eec,
+    INPUTMETHOD_KEY_uhornhook                          = 0x1eed,
+    INPUTMETHOD_KEY_Uhorntilde                         = 0x1eee,
+    INPUTMETHOD_KEY_uhorntilde                         = 0x1eef,
+    INPUTMETHOD_KEY_Uhornbelowdot                      = 0x1ef0,
+    INPUTMETHOD_KEY_uhornbelowdot                      = 0x1ef1,
+    INPUTMETHOD_KEY_Ybelowdot                          = 0x1ef4,
+    INPUTMETHOD_KEY_ybelowdot                          = 0x1ef5,
+    INPUTMETHOD_KEY_Yhook                              = 0x1ef6,
+    INPUTMETHOD_KEY_yhook                              = 0x1ef7,
+    INPUTMETHOD_KEY_Ytilde                             = 0x1ef8,
+    INPUTMETHOD_KEY_ytilde                             = 0x1ef9,
+    INPUTMETHOD_KEY_Ohorn                              = 0x1efa,    /* U+01a0 */
+    INPUTMETHOD_KEY_ohorn                              = 0x1efb,    /* U+01a1 */
+    INPUTMETHOD_KEY_Uhorn                              = 0x1efc,    /* U+01af */
+    INPUTMETHOD_KEY_uhorn                              = 0x1efd,    /* U+01b0 */
+
+    INPUTMETHOD_KEY_combining_tilde                    = 0x1e9f,    /* U+0303 */
+    INPUTMETHOD_KEY_combining_grave                    = 0x1ef2,    /* U+0300 */
+    INPUTMETHOD_KEY_combining_acute                    = 0x1ef3,    /* U+0301 */
+    INPUTMETHOD_KEY_combining_hook                     = 0x1efe,    /* U+0309 */
+    INPUTMETHOD_KEY_combining_belowdot                 = 0x1eff,    /* U+0323 */
+
+    INPUTMETHOD_KEY_EcuSign                            = 0x20a0,
+    INPUTMETHOD_KEY_ColonSign                          = 0x20a1,
+    INPUTMETHOD_KEY_CruzeiroSign                       = 0x20a2,
+    INPUTMETHOD_KEY_FFrancSign                         = 0x20a3,
+    INPUTMETHOD_KEY_LiraSign                           = 0x20a4,
+    INPUTMETHOD_KEY_MillSign                           = 0x20a5,
+    INPUTMETHOD_KEY_NairaSign                          = 0x20a6,
+    INPUTMETHOD_KEY_PesetaSign                         = 0x20a7,
+    INPUTMETHOD_KEY_RupeeSign                          = 0x20a8,
+    INPUTMETHOD_KEY_WonSign                            = 0x20a9,
+    INPUTMETHOD_KEY_NewSheqelSign                      = 0x20aa,
+    INPUTMETHOD_KEY_DongSign                           = 0x20ab,
+    INPUTMETHOD_KEY_EuroSign                           = 0x20ac
+} inputmethod_key_code_e;
+
+/**
+ * @brief Enumeration of the key masks.
+ *
+ * @since_tizen 2.4
+ */
+typedef enum
+{
+    INPUTMETHOD_KEY_MASK_NONE = 0,
+    INPUTMETHOD_KEY_MASK_SHIFT = (1<<0),
+    INPUTMETHOD_KEY_MASK_RELEASE = (1<<15),
+} inputmethod_key_mask_e;
+
+/**
+ * @}
+ */
+
+#endif // __TIZEN_UI_INPUTMETHOD_KEYDEF_H__
+
diff --git a/packaging/capi-ui-inputmethod.spec b/packaging/capi-ui-inputmethod.spec
new file mode 100755 (executable)
index 0000000..e120a8d
--- /dev/null
@@ -0,0 +1,65 @@
+Name:       capi-ui-inputmethod
+Summary:    Input Method Library
+Version:    0.0.1
+Release:    1
+Group:      Graphics & UI Framework/Input
+License:    Apache-2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(dlog)
+BuildRequires:  pkgconfig(elementary)
+BuildRequires:  pkgconfig(libscl-core)
+BuildRequires:  pkgconfig(isf)
+Requires(post): /sbin/ldconfig
+Requires(postun): /sbin/ldconfig
+
+%description
+
+
+%package devel
+Summary:  Input Method Library (Development)
+Group:    Development/Libraries
+Requires: %{name} = %{version}-%{release}
+
+%description devel
+
+
+
+%prep
+%setup -q
+
+
+%build
+export CFLAGS+=" -DTIZEN_DEBUG_ENABLE -fPIC -fvisibility=hidden"
+export CXXFLAGS+=" -DTIZEN_DEBUG_ENABLE -fPIC -fvisibility=hidden"
+export FFLAGS+=" -DTIZEN_DEBUG_ENABLE -fPIC -fvisibility=hidden"
+
+rm -rf CMakeFiles
+rm -rf CMakeCache.txt
+MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
+cmake . -DCMAKE_INSTALL_PREFIX=/usr -DFULLVER=%{version} -DMAJORVER=${MAJORVER}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/usr/share/license
+cp LICENSE %{buildroot}/usr/share/license/%{name}
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+
+%files
+%manifest capi-ui-inputmethod.manifest
+%{_libdir}/libcapi-ui-inputmethod.so*
+/usr/share/license/capi-ui-inputmethod
+
+%files devel
+%{_includedir}/inputmethod*.h
+%{_libdir}/pkgconfig/*.pc
+%{_libdir}/libcapi-ui-inputmethod.so
+
+
diff --git a/src/inputmethod.cpp b/src/inputmethod.cpp
new file mode 100644 (file)
index 0000000..4d29dff
--- /dev/null
@@ -0,0 +1,335 @@
+/*
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <dlog.h>
+#include <sclcore.h>
+#include <inputmethod.h>
+
+#ifdef LOG_TAG
+#undef LOG_TAG
+#endif
+#define LOG_TAG "INPUTMETHOD"
+
+using namespace scl;
+
+inputmethod_primitive_callback_s g_inputmethod_primitive_callback = {NULL};
+inputmethod_extended_callback_s g_inputmethod_extended_callback = {NULL};
+
+class CCoreEventCallback : public ISCLCoreEventCallback
+{
+    void on_init();
+    void on_run(int argc, char **argv);
+    void on_exit();
+    void on_update_cursor_position(sclint ic, const sclchar *ic_uuid, sclint cursor_pos);
+    void on_update_surrounding_text(sclint ic, const sclchar *text, sclint cursor);
+    void on_focus_out(sclint ic, const sclchar *ic_uuid);
+    void on_focus_in(sclint ic, const sclchar *ic_uuid);
+    void on_ise_show(sclint ic, const int degree, Ise_Context context);
+    void on_ise_hide(sclint ic, const sclchar *ic_uuid);
+    void on_get_geometry(sclu32 *pos_x, sclu32 *pos_y, sclu32 *width, sclu32 *height);
+    void on_set_language(Ecore_IMF_Input_Panel_Lang language);
+    void on_set_imdata(sclchar *buf, sclu32 len);
+    void on_get_language_locale(sclint ic, sclchar **locale);
+    void on_set_return_key_type(Ecore_IMF_Input_Panel_Return_Key_Type type);
+    void on_set_return_key_disable(bool disabled);
+    void on_set_layout(Ecore_IMF_Input_Panel_Layout layout);
+    void on_reset_input_context(sclint ic, const sclchar *uuid);
+    void on_set_display_language(const sclchar *language);
+    void on_set_rotation_degree(sclint degree);
+    void on_set_accessibility_state(sclboolean state);
+    void on_create_option_window(sclwindow window, SCLOptionWindowType type);
+    void on_destroy_option_window(sclwindow window);
+};
+
+static CCoreEventCallback g_core_event_callback;
+CSCLCore g_core(&g_core_event_callback);
+
+void CCoreEventCallback::on_init()
+{
+    if (g_inputmethod_primitive_callback.create) {
+        g_inputmethod_primitive_callback.create();
+    }
+}
+
+void CCoreEventCallback::on_run(int argc, char **argv)
+{
+    LOGD ("on_run\n");
+    inputmethod_efl_main(argc, argv);
+}
+
+void CCoreEventCallback::on_exit()
+{
+    if (g_inputmethod_primitive_callback.terminate) {
+        g_inputmethod_primitive_callback.terminate();
+    }
+}
+
+void CCoreEventCallback::on_update_cursor_position(sclint ic, const sclchar *ic_uuid, sclint cursor_pos)
+{
+    if (g_inputmethod_extended_callback.update_cursor_position) {
+        g_inputmethod_extended_callback.update_cursor_position(cursor_pos);
+    }
+}
+
+void CCoreEventCallback::on_update_surrounding_text(sclint ic, const sclchar *text, sclint cursor)
+{
+    if (g_inputmethod_extended_callback.update_surrounding_text) {
+        g_inputmethod_extended_callback.update_surrounding_text(ic, text, cursor);
+    }
+}
+
+void CCoreEventCallback::on_focus_out(sclint ic, const sclchar *ic_uuid)
+{
+    if (g_inputmethod_extended_callback.focus_out) {
+        g_inputmethod_extended_callback.focus_out(ic);
+    }
+}
+
+void CCoreEventCallback::on_focus_in(sclint ic, const sclchar *ic_uuid)
+{
+    if (g_inputmethod_extended_callback.focus_in) {
+        g_inputmethod_extended_callback.focus_in(ic);
+    }
+}
+
+void CCoreEventCallback::on_ise_show(sclint ic, const int degree, Ise_Context context)
+{
+    input_context_s input_context;
+    input_context.language = context.language;
+    input_context.layout = context.layout;
+    input_context.return_key_type = context.return_key_type;
+    input_context.client_window = context.client_window;
+    input_context.imdata_size = context.imdata_size;
+    input_context.cursor_pos = context.cursor_pos;
+    input_context.return_key_disabled = context.return_key_disabled;
+    input_context.prediction_allow = context.prediction_allow;
+    input_context.password_mode = context.password_mode;
+    input_context.layout_variation = context.layout_variation;
+    input_context.autocapital_type = context.autocapital_type;
+    input_context.input_hint = context.input_hint;
+    input_context.bidi_direction = context.bidi_direction;
+
+    if (g_inputmethod_primitive_callback.show) {
+        g_inputmethod_primitive_callback.show(ic, input_context);
+    }
+}
+
+void CCoreEventCallback::on_ise_hide(sclint ic, const sclchar *ic_uuid)
+{
+    if (g_inputmethod_primitive_callback.hide) {
+        g_inputmethod_primitive_callback.hide(ic);
+    }
+}
+
+void CCoreEventCallback::on_get_geometry(sclu32 *pos_x, sclu32 *pos_y, sclu32 *width, sclu32 *height)
+{
+    int geometry_pos_x = 0;
+    int geometry_pos_y = 0;
+    int geometry_width = 0;
+    int geometry_height = 0;
+
+    if (g_inputmethod_extended_callback.get_geometry) {
+        g_inputmethod_extended_callback.get_geometry(&geometry_pos_x, &geometry_pos_y, &geometry_width, &geometry_height);
+    }
+
+    if (pos_x)
+        *pos_x = geometry_pos_x;
+
+    if (pos_y)
+        *pos_y = geometry_pos_y;
+
+    if (width)
+        *width = geometry_width;
+
+    if (height)
+        *height = geometry_height;
+}
+
+void CCoreEventCallback::on_set_language(Ecore_IMF_Input_Panel_Lang language)
+{
+    if (g_inputmethod_extended_callback.set_language) {
+        g_inputmethod_extended_callback.set_language(language);
+    }
+}
+
+void CCoreEventCallback::on_set_imdata(sclchar *buf, sclu32 len)
+{
+    if (g_inputmethod_extended_callback.set_imdata) {
+        g_inputmethod_extended_callback.set_imdata((void *)buf, len);
+    }
+}
+
+void CCoreEventCallback::on_get_language_locale(sclint ic, sclchar **locale)
+{
+    if (g_inputmethod_extended_callback.get_language_locale) {
+        g_inputmethod_extended_callback.get_language_locale(locale);
+    }
+}
+
+void CCoreEventCallback::on_set_return_key_type(Ecore_IMF_Input_Panel_Return_Key_Type type)
+{
+    if (g_inputmethod_extended_callback.set_return_key_type) {
+        g_inputmethod_extended_callback.set_return_key_type(type);
+    }
+}
+
+void CCoreEventCallback::on_set_return_key_disable(bool disabled)
+{
+    if (g_inputmethod_extended_callback.set_return_key_disable) {
+        g_inputmethod_extended_callback.set_return_key_disable(disabled);
+    }
+}
+
+void CCoreEventCallback::on_set_layout(Ecore_IMF_Input_Panel_Layout layout)
+{
+    if (g_inputmethod_extended_callback.set_layout) {
+        g_inputmethod_extended_callback.set_layout(layout);
+    }
+}
+
+void CCoreEventCallback::on_reset_input_context(sclint ic, const sclchar *uuid)
+{
+    if (g_inputmethod_extended_callback.reset_input_context) {
+        g_inputmethod_extended_callback.reset_input_context();
+    }
+}
+
+void CCoreEventCallback::on_set_display_language(const sclchar *language)
+{
+    if (g_inputmethod_extended_callback.set_display_language) {
+        g_inputmethod_extended_callback.set_display_language(language);
+    }
+}
+
+void CCoreEventCallback::on_set_rotation_degree(sclint degree)
+{
+    if (g_inputmethod_extended_callback.set_rotation_degree) {
+        g_inputmethod_extended_callback.set_rotation_degree(degree);
+    }
+}
+
+void CCoreEventCallback::on_set_accessibility_state(sclboolean state)
+{
+    if (g_inputmethod_extended_callback.set_accessibility_state) {
+        g_inputmethod_extended_callback.set_accessibility_state(state);
+    }
+}
+
+void CCoreEventCallback::on_create_option_window(sclwindow window, SCLOptionWindowType type)
+{
+    if (g_inputmethod_extended_callback.create_option_window) {
+        g_inputmethod_extended_callback.create_option_window(static_cast<Evas_Object*>(window), (inputmethod_option_window_type_e)type);
+    }
+}
+
+void CCoreEventCallback::on_destroy_option_window(sclwindow window)
+{
+    if (g_inputmethod_extended_callback.destroy_option_window) {
+        g_inputmethod_extended_callback.destroy_option_window(static_cast<Evas_Object*>(window));
+    }
+}
+
+void inputmethod_set_primitive_cb(inputmethod_primitive_callback_s callback)
+{
+    g_inputmethod_primitive_callback = callback;
+}
+
+void inputmethod_unset_primitive_cb(void)
+{
+    memset(&g_inputmethod_primitive_callback, 0x00, sizeof(g_inputmethod_primitive_callback));
+}
+
+void inputmethod_set_extended_cb(inputmethod_extended_callback_s callback)
+{
+    g_inputmethod_extended_callback = callback;
+}
+
+void inputmethod_unset_extended_cb(void)
+{
+    memset(&g_inputmethod_extended_callback, 0x00, sizeof(g_inputmethod_extended_callback));
+}
+
+void inputmethod_run(void)
+{
+    g_core.run();
+}
+
+void inputmethod_send_key_event(inputmethod_key_code_e keycode, inputmethod_key_mask_e keymask)
+{
+    g_core.forward_key_event(-1, NULL, (sclu32)keycode, (sclu16)keymask);
+}
+
+void inputmethod_commit_string(const char *str)
+{
+    g_core.commit_string(-1, NULL, str);
+}
+
+void inputmethod_show_preedit_string(void)
+{
+    g_core.show_preedit_string(-1, NULL);
+}
+
+void inputmethod_hide_preedit_string(void)
+{
+    g_core.hide_preedit_string(-1, NULL);
+}
+
+void inputmethod_update_preedit_string(const char *str)
+{
+    g_core.update_preedit_string(-1, NULL, str);
+}
+
+void inputmethod_get_surrounding_text(int maxlen_before, int maxlen_after)
+{
+    g_core.get_surrounding_text(NULL, maxlen_before, maxlen_after);
+}
+
+void inputmethod_delete_surrounding_text(int offset, int len)
+{
+    g_core.delete_surrounding_text(offset, len);
+}
+
+Evas_Object* inputmethod_get_main_window(void)
+{
+    return static_cast<Evas_Object*>(g_core.get_main_window());
+}
+
+void inputmethod_set_size_hints(int portrait_width, int portrait_height, int landscape_width, int landscape_height)
+{
+    SclSize portrait_size, landscape_size;
+
+    portrait_size.width = portrait_width;
+    portrait_size.height = portrait_height;
+
+    landscape_size.width = landscape_width;
+    landscape_size.height = landscape_height;
+
+    g_core.set_keyboard_size_hints(portrait_size, landscape_size);
+}
+
+Evas_Object* inputmethod_create_option_window(void)
+{
+    return static_cast<Evas_Object*>(g_core.create_option_window());
+}
+
+void inputmethod_destroy_option_window(Evas_Object *window)
+{
+    g_core.destroy_option_window(window);
+}