Changes by API review 29/40929/1
authorSungmin Kwak <sungmin.kwak@samsung.com>
Wed, 11 Feb 2015 06:20:18 +0000 (15:20 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Wed, 10 Jun 2015 09:12:39 +0000 (18:12 +0900)
Change-Id: I629f925092683e3506d1abd96b6cd6e16c693571

LICENSE [changed mode: 0755->0644]
doc/inputmethod_doc.h [new file with mode: 0644]
include/inputmethod.h [changed mode: 0755->0644]
include/inputmethod_keydef.h [changed mode: 0755->0644]
include/inputmethod_private.h [new file with mode: 0644]
packaging/capi-ui-inputmethod.spec [changed mode: 0755->0644]
src/inputmethod.cpp

diff --git a/LICENSE b/LICENSE
old mode 100755 (executable)
new mode 100644 (file)
diff --git a/doc/inputmethod_doc.h b/doc/inputmethod_doc.h
new file mode 100644 (file)
index 0000000..9585bab
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ * 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_UIX_INPUTMETHOD_DOC_H__
+#define __TIZEN_UIX_INPUTMETHOD_DOC_H__
+
+/**
+ * @ingroup CAPI_UIX_FRAMEWORK
+ * @defgroup CAPI_UIX_INPUTMETHOD_MODULE Input Method
+ * @brief The @ref CAPI_UIX_INPUTMETHOD_MODULE API provides functions for starting IME application lifecycle,
+ * methods to interact with current UI state of IME, and getting attributes/events.
+ *
+ * @section CAPI_UIX_INPUTMETHOD_MODULE_HEADER Required Header
+ *   \#include <inputmethod.h>
+ *
+ * @section CAPI_UIX_INPUTMETHOD_MODULE_OVERVIEW Overview
+ * Input method editor (IME) is an input panel that lets users to provide input and the platform to receive the text data entered.
+ * Custom keyboards can be built according to the application's necessity by this API sets.
+ * Tizen provides a framework to create such input method editors. Such extra input methods can be selected from Settings.
+ */
+
+#endif // __TIZEN_UIX_INPUTMETHOD_DOC_H__
+
old mode 100755 (executable)
new mode 100644 (file)
index 6d5f80e..6dc7a91
@@ -14,8 +14,8 @@
  * limitations under the License.
  */
 
-#ifndef __TIZEN_UI_INPUTMETHOD_H__
-#define __TIZEN_UI_INPUTMETHOD_H__
+#ifndef __TIZEN_UIX_INPUTMETHOD_H__
+#define __TIZEN_UIX_INPUTMETHOD_H__
 
 /**
  * @file inputmethod.h
@@ -33,27 +33,30 @@ extern "C" {
 #endif
 
 /**
- * @addtogroup CAPI_UI_INPUTMETHOD_MODULE
+ * @addtogroup CAPI_UIX_INPUTMETHOD_MODULE
  * @{
  */
 
 /**
- * @brief Enumeration for inputmethod function error.
+ * @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_NO_CALLBACK_FUNCTION = TIZEN_ERROR_UIX_CLASS | 0x0001, /**< Necessary callback function is not set */
+    INPUTMETHOD_ERROR_NOT_RUNNING = TIZEN_ERROR_UIX_CLASS | 0x0002, /**< IME main loop isn't started yet */
+    INPUTMETHOD_ERROR_OPERATION_FAILED = TIZEN_ERROR_UIX_CLASS | 0x0003, /**< Operation failed */
 } inputmethod_error_e;
 
 /**
- * @brief Enumeration of the option window type.
+ * @brief Enumeration of the option window type
  *
  * @since_tizen 2.4
+ *
+ * @see inputmethod_option_window_created_cb
  */
 typedef enum
 {
@@ -62,176 +65,213 @@ typedef enum
 } inputmethod_option_window_type_e;
 
 /**
- * @brief Structure of the edit field's input context.
+ * @brief Enumeration of layout variation
+ *
+ * @since_tizen 2.4
+ *
+ * @see inputmethod_context_get_layout_variation
+ */
+typedef enum
+{
+    INPUTMETHOD_LAYOUT_NORMAL_VARIATION_NORMAL = 0, /**< The plain normal layout */
+    INPUTMETHOD_LAYOUT_NORMAL_VARIATION_FILENAME, /**< Filename layout; symbols such as '/', '*', '\', '|', '<', '>', '?', '"' and ':' should be disabled */
+    INPUTMETHOD_LAYOUT_NORMAL_VARIATION_PERSON_NAME, /**< The name of a person */
+    INPUTMETHOD_LAYOUT_NUMBERONLY_VARIATION_NORMAL = 0, /**< The plain normal number layout */
+    INPUTMETHOD_LAYOUT_NUMBERONLY_VARIATION_SIGNED, /**< The number layout to allow a negative sign */
+    INPUTMETHOD_LAYOUT_NUMBERONLY_VARIATION_DECIMAL, /**< The number layout to allow decimal point to provide fractional value */
+    INPUTMETHOD_LAYOUT_NUMBERONLY_VARIATION_SIGNED_AND_DECIMAL, /**< The number layout to allow decimal point and negative sign */
+    INPUTMETHOD_LAYOUT_PASSWORD_VARIATION_NORMAL = 0, /**< The normal password layout */
+    INPUTMETHOD_LAYOUT_PASSWORD_VARIATION_NUMBERONLY, /**< The password layout to allow only number */
+} inputmethod_layout_variation_e;
+
+/**
+ * @brief Structure of an associated text input UI control'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.
+ * should configure its input panel with this structure information.
  *
  * @since_tizen 2.4
+ *
+ * @see inputmethod_context_get_layout, inputmethod_context_get_layout_variation, inputmethod_context_get_cursor_position,
+ * inputmethod_context_get_autocapital_type, inputmethod_context_get_return_key_type, inputmethod_context_get_return_key_state,
+ * inputmethod_context_get_prediction_mode, inputmethod_context_get_password_mode, inputmethod_context_get_input_hint,
+ * inputmethod_context_get_bidi_direction, inputmethod_context_get_language
  */
-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;
+typedef struct _inputmethod_context *inputmethod_context_h;
 
 /**
- * @brief Called when keyboard is created.
+ * @brief Called when the input panel is created.
+ *
+ * @remarks This callback function is mandatory and must be registered using inputmethod_run(). The
+ * inputmethod_get_main_window() can be used to get the created input panel window.
  *
  * @since_tizen 2.4
  *
- * @pre The callback must be registered using inputmethod_set_primitive_cb().
+ * @param[in] user_data User data to be passed from the callback registration function
  *
- * @see inputmethod_set_primitive_cb, inputmethod_unset_primitive_cb
+ * @pre The inputmethod_run() function calls this callback function.
+ *
+ * @see inputmethod_run, inputmethod_set_size, inputmethod_get_main_window
  */
-typedef void (*inputmethod_create_cb)(void);
+typedef void (*inputmethod_create_cb)(void *user_data);
 
 /**
- * @brief Called when keyboard is terminated.
+ * @brief Called when the input panel is terminated.
+ *
+ * @remarks This callback function is mandatory and must be registered using inputmethod_run(). The
+ * inputmethod_get_main_window() can be used to get the created input panel window.
  *
  * @since_tizen 2.4
  *
- * @pre The callback must be registered using inputmethod_set_primitive_cb().
+ * @param[in] user_data User data to be passed from the callback registration function
  *
- * @see inputmethod_set_primitive_cb, inputmethod_unset_primitive_cb
+ * @see inputmethod_run, inputmethod_get_main_window
  */
-typedef void (*inputmethod_terminate_cb)(void);
+typedef void (*inputmethod_terminate_cb)(void *user_data);
 
 /**
- * @brief Called when keyboard appears.
+ * @brief Called when an associated text input UI control requests the input panel to show itself.
  *
- * @remarks IME application should configure its keyboard panel with #input_context_s structure information.
+ * @remarks This callback function is mandatory and must be registered using inputmethod_run().
+ * IME application should configure its input panel with #inputmethod_context_h structure information.
+ * The inputmethod_get_main_window() can be used to get the created input panel window.
  *
  * @since_tizen 2.4
  *
- * @param[in] ic The input context identification value of each client edit field
- * @param[in] context The input context information
+ * @param[in] context_id The input context identification value of an associated text input UI control
+ * @param[in] context The input context information pointer
+ * @param[in] user_data User data to be passed from the callback registration function
  *
- * @pre The callback must be registered using inputmethod_set_primitive_cb().
- *
- * @see inputmethod_set_primitive_cb, inputmethod_unset_primitive_cb
+ * @see inputmethod_run, inputmethod_get_main_window, inputmethod_context_get_layout,
+ * inputmethod_context_get_layout_variation, inputmethod_context_get_cursor_position,
+ * inputmethod_context_get_autocapital_type, inputmethod_context_get_return_key_type,
+ * inputmethod_context_get_return_key_state, inputmethod_context_get_prediction_mode,
+ * inputmethod_context_get_password_mode, inputmethod_context_get_input_hint,
+ * inputmethod_context_get_bidi_direction, inputmethod_context_get_language
  */
-typedef void (*inputmethod_show_cb)(int ic, input_context_s context);
+typedef void (*inputmethod_show_cb)(int context_id, inputmethod_context_h context, void *user_data);
 
 /**
- * @brief Called when keyboard information requested.
+ * @brief Called when an associated text input UI control requests the input panel to hide itself.
  *
- * @since_tizen 2.4
+ * @remarks This callback function is mandatory and must be registered using inputmethod_run(). The
+ * inputmethod_get_main_window() can be used to get the created input panel window.
  *
- * @param[in] ic The input context identification value of each client edit field
+ * @since_tizen 2.4
  *
- * @pre The callback must be registered using inputmethod_set_primitive_cb().
+ * @param[in] context_id The input context identification value of an associated text input UI control
+ * @param[in] user_data User data to be passed from the callback registration function
  *
- * @see inputmethod_set_primitive_cb, inputmethod_unset_primitive_cb
+ * @see inputmethod_run, inputmethod_get_main_window
  */
-typedef void (*inputmethod_hide_cb)(int ic);
+typedef void (*inputmethod_hide_cb)(int context_id, void *user_data);
 
 /**
- * @brief Called when the input context has focus.
+ * @brief Called when an associated text input UI control has focus.
  *
  * @since_tizen 2.4
  *
- * @param[in] ic The input context identification value of each client edit field
+ * @param[in] context_id The input context identification value of an associated text input UI control
+ * @param[in] user_data User data to be passed from the callback registration function
  *
- * @pre The callback must be registered using inputmethod_set_extended_cb().
+ * @pre The callback can be registered using inputmethod_event_set_focus_in_cb().
  *
- * @see inputmethod_set_extended_cb, inputmethod_unset_extended_cb
+ * @see inputmethod_event_set_focus_in_cb
  */
-typedef void (*inputmethod_focus_in_cb)(int ic);
+typedef void (*inputmethod_focus_in_cb)(int context_id, void *user_data);
 
 /**
- * @brief Called when the input context loses focus.
+ * @brief Called when an associated text input UI control loses focus.
  *
  * @since_tizen 2.4
  *
- * @param[in] ic The input context identification value of each client edit field
+ * @param[in] context_id The input context identification value of an associated text input UI control
+ * @param[in] user_data User data to be passed from the callback registration function
  *
- * @pre The callback must be registered using inputmethod_set_extended_cb().
+ * @pre The callback can be registered using inputmethod_event_set_focus_out_cb().
  *
- * @see inputmethod_set_extended_cb, inputmethod_unset_extended_cb
+ * @see inputmethod_event_set_focus_out_cb
  */
-typedef void (*inputmethod_focus_out_cb)(int ic);
+typedef void (*inputmethod_focus_out_cb)(int context_id, void *user_data);
 
 /**
- * @brief Called when the surrounding text is requested, asynchronously.
+ * @brief Called when an associated text input UI control responds to a request with the surrounding text.
+ *
+ * @remarks The inputmethod_request_surrounding_text() must be called to invoke this callback function, asynchronously.
  *
  * @since_tizen 2.4
  *
- * @param[in] ic The input context identification value of each client edit field
+ * @param[in] context_id The input context identification value of an associated text input UI control
  * @param[in] text The UTF-8 string requested
- * @param[in] cursor The cursor position
+ * @param[in] cursor_pos The cursor position
+ * @param[in] user_data User data to be passed from the callback registration function
  *
- * @pre The callback must be registered using inputmethod_set_extended_cb().
- * inputmethod_get_surrounding_text() must be called to invoke this callback, asynchronously.
+ * @pre The callback can be registered using inputmethod_event_set_surrounding_text_updated_cb().
  *
- * @see inputmethod_set_extended_cb, inputmethod_unset_extended_cb, inputmethod_get_surrounding_text
+ * @see inputmethod_event_set_surrounding_text_updated_cb, inputmethod_request_surrounding_text
  */
-typedef void (*inputmethod_update_surrounding_text_cb)(int ic, const char *text, int cursor);
+typedef void (*inputmethod_surrounding_text_updated_cb)(int context_id, const char *text, int cursor_pos, void *user_data);
 
 /**
- * @brief Called to reset input context.
+ * @brief Called to reset the input context of an associated text input UI control.
  *
  * @since_tizen 2.4
  *
- * @pre The callback must be registered using inputmethod_set_extended_cb().
+ * @param[in] user_data User data to be passed from the callback registration function
  *
- * @see inputmethod_set_extended_cb, inputmethod_unset_extended_cb
+ * @pre The callback can be registered using inputmethod_event_set_input_context_reset_cb().
+ *
+ * @see inputmethod_event_set_input_context_reset_cb
  */
-typedef void (*inputmethod_reset_input_context_cb)(void);
+typedef void (*inputmethod_input_context_reset_cb)(void *user_data);
 
 /**
- * @brief Called when cursor position is updated.
+ * @brief Called when the position of the cursor in an associated text input UI control changes.
  *
  * @since_tizen 2.4
  *
  * @param[in] cursor_pos The cursor position
+ * @param[in] user_data User data to be passed from the callback registration function
  *
- * @pre The callback must be registered using inputmethod_set_extended_cb().
+ * @pre The callback can be registered using inputmethod_event_set_cursor_position_updated_cb().
  *
- * @see inputmethod_set_extended_cb, inputmethod_unset_extended_cb
+ * @see inputmethod_event_set_cursor_position_updated_cb
  */
-typedef void (*inputmethod_update_cursor_position_cb)(int cursor_pos);
+typedef void (*inputmethod_cursor_position_updated_cb)(int cursor_pos, void *user_data);
 
 /**
- * @brief Called to get input language locale from the input panel.
+ * @brief Called when an associated text input UI control requests for the language of the input panel.
+ *
+ * @remarks The allocated @a lang_code will be freed internally.
  *
  * @since_tizen 2.4
  *
- * @param[out] locale Input panel's current input language code
+ * @param[in] user_data User data to be passed from the callback registration function
+ * @param[out] lang_code Input panel's current input language code
  *
- * @pre The callback must be registered using inputmethod_set_extended_cb().
+ * @pre The callback can be registered using inputmethod_event_set_language_requested_cb().
  *
- * @see inputmethod_set_extended_cb, inputmethod_unset_extended_cb
+ * @see inputmethod_event_set_language_requested_cb
  */
-typedef void (*inputmethod_get_language_locale_cb)(char **locale);
+typedef void (*inputmethod_language_requested_cb)(void *user_data, char **lang_code);
 
 /**
- * @brief Called to set the preferred language
+ * @brief Called to set the preferred language to the input panel.
  *
- * @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
+ * @remarks @language information is already set to the input panel when it is shown
+ * through #inputmethod_context_h. 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
+ * @param[in] user_data User data to be passed from the callback registration function
  *
- * @pre The callback must be registered using inputmethod_set_extended_cb().
+ * @pre The callback can be registered using inputmethod_event_set_language_set_cb().
  *
- * @see inputmethod_set_extended_cb, inputmethod_unset_extended_cb
+ * @see inputmethod_event_set_language_set_cb
  */
-typedef void (*inputmethod_set_language_cb)(Ecore_IMF_Input_Panel_Lang language);
+typedef void (*inputmethod_language_set_cb)(Ecore_IMF_Input_Panel_Lang language, void *user_data);
 
 /**
  * @brief Called to set the application specific data to deliver to the input panel.
@@ -242,82 +282,90 @@ typedef void (*inputmethod_set_language_cb)(Ecore_IMF_Input_Panel_Lang language)
  * @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
+ * @param[in] data_len The length of data, in bytes, to send to the input panel
+ * @param[in] user_data User data to be passed from the callback registration function
  *
- * @pre The callback must be registered using inputmethod_set_extended_cb().
+ * @pre The callback can be registered using inputmethod_event_set_imdata_set_cb().
  *
- * @see inputmethod_set_extended_cb, inputmethod_unset_extended_cb
+ * @see inputmethod_event_set_imdata_set_cb
  */
-typedef void (*inputmethod_set_imdata_cb)(void *data, unsigned int len);
+typedef void (*inputmethod_imdata_set_cb)(void *data, unsigned int data_len, void *user_data);
 
 /**
- * @brief Called to set the layout of the input panel.
+ * @brief Called when an associated text input UI control requests the input panel to set its layout.
  *
- * @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
+ * @remarks @layout information is already set to the input panel when it is shown
+ * through #inputmethod_context_h. 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
+ * @param[in] user_data User data to be passed from the callback registration function
  *
- * @pre The callback must be registered using inputmethod_set_extended_cb().
+ * @pre The callback can be registered using inputmethod_event_set_layout_set_cb().
  *
- * @see inputmethod_set_extended_cb, inputmethod_unset_extended_cb
+ * @see inputmethod_event_set_layout_set_cb
  */
-typedef void (*inputmethod_set_layout_cb)(Ecore_IMF_Input_Panel_Layout layout);
+typedef void (*inputmethod_layout_set_cb)(Ecore_IMF_Input_Panel_Layout layout, void *user_data);
 
 /**
- * @brief Called to set return key type to the input panel.
+ * @brief Called when an associated text input UI control requests the input panel to set the @c Return key label.
+ * The input panel can show text or image on the @c Return button according to the @c Return key action.
  *
- * @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
+ * @remarks @type information is already set to the input panel when it is shown
+ * through #inputmethod_context_h. This callback function will be only called when the client
+ * application changes the edit field's @c 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
+ * @param[in] type The type of @c Return key on the input panel
+ * @param[in] user_data User data to be passed from the callback registration function
  *
- * @pre The callback must be registered using inputmethod_set_extended_cb().
+ * @pre The callback can be registered using inputmethod_event_set_return_key_type_set_cb().
  *
- * @see inputmethod_set_extended_cb, inputmethod_unset_extended_cb
+ * @see inputmethod_event_set_return_key_type_set_cb
  */
-typedef void (*inputmethod_set_return_key_type_cb)(Ecore_IMF_Input_Panel_Return_Key_Type type);
+typedef void (*inputmethod_return_key_type_set_cb)(Ecore_IMF_Input_Panel_Return_Key_Type type, void *user_data);
 
 /**
- * @brief Called to disable or enable return key to the input panel.
+ * @brief Called when an associated text input UI control requests the input panel to enable
+ * or disable the @c Return key state.
  *
- * @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
+ * @remarks @disabled information is already set to the input panel when it is shown
+ * through #inputmethod_context_h. This callback function will be only called when the client
+ * application changes the edit field's @c 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
+ * @param[in] disabled The Boolean state to disable @c Return key. The @c Return key is enabled by default
+ * @param[in] user_data User data to be passed from the callback registration function
  *
- * @pre The callback must be registered using inputmethod_set_extended_cb().
+ * @pre The callback can be registered using inputmethod_event_set_return_key_state_set_cb().
  *
- * @see inputmethod_set_extended_cb, inputmethod_unset_extended_cb
+ * @see inputmethod_event_set_return_key_state_set_cb
  */
-typedef void (*inputmethod_set_return_key_disable_cb)(bool disabled);
+typedef void (*inputmethod_return_key_state_set_cb)(bool disabled, void *user_data);
 
 /**
- * @brief Called to get the input panel window geometry.
+ * @brief Called when an associated text input UI control requests for the position
+ * and size of the input panel.
  *
  * @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
+ * @param[in] user_data User data to be passed from the callback registration function
+ * @param[out] x The x position in screen
+ * @param[out] y The y position in screen
+ * @param[out] w The window width
+ * @param[out] h The window height
  *
- * @pre The callback must be registered using inputmethod_set_extended_cb().
+ * @pre The callback can be registered using inputmethod_event_set_geometry_requested_cb().
  *
- * @see inputmethod_set_extended_cb, inputmethod_unset_extended_cb
+ * @see inputmethod_event_set_geometry_requested_cb
  */
-typedef void (*inputmethod_get_geometry_cb)(int *x, int *y, int *w, int *h);
+typedef void (*inputmethod_geometry_requested_cb)(void *user_data, int *x, int *y, int *w, int *h);
 
 /**
  * @brief Called when the system display language is changed.
@@ -325,12 +373,13 @@ typedef void (*inputmethod_get_geometry_cb)(int *x, int *y, int *w, int *h);
  * @since_tizen 2.4
  *
  * @param[in] language The language code
+ * @param[in] user_data User data to be passed from the callback registration function
  *
- * @pre The callback must be registered using inputmethod_set_extended_cb().
+ * @pre The callback can be registered using inputmethod_event_set_display_language_changed_cb().
  *
- * @see inputmethod_set_extended_cb, inputmethod_unset_extended_cb
+ * @see inputmethod_event_set_display_language_changed_cb
  */
-typedef void (*inputmethod_set_display_language_cb)(const char *language);
+typedef void (*inputmethod_display_language_changed_cb)(const char *language, void *user_data);
 
 /**
  * @brief Called when the device is rotated.
@@ -338,268 +387,606 @@ typedef void (*inputmethod_set_display_language_cb)(const char *language);
  * @since_tizen 2.4
  *
  * @param[in] degree The rotation degree
+ * @param[in] user_data User data to be passed from the callback registration function
  *
- * @pre The callback must be registered using inputmethod_set_extended_cb().
+ * @pre The callback can be registered using inputmethod_event_set_rotation_degree_changed_cb().
  *
- * @see inputmethod_set_extended_cb, inputmethod_unset_extended_cb
+ * @see inputmethod_event_set_rotation_degree_changed_cb
  */
-typedef void (*inputmethod_set_rotation_degree_cb)(int degree);
+typedef void (*inputmethod_rotation_degree_changed_cb)(int degree, void *user_data);
 
 /**
  * @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().
+ * @param[in] state Accessibility option state
+ * @param[in] user_data User data to be passed from the callback registration function
+ *
+ * @pre The callback can be registered using inputmethod_event_set_accessibility_state_changed_cb().
  *
- * @see inputmethod_set_extended_cb, inputmethod_unset_extended_cb
+ * @see inputmethod_event_set_accessibility_state_changed_cb
  */
-typedef void (*inputmethod_set_accessibility_state_cb)(bool state);
+typedef void (*inputmethod_accessibility_state_changed_cb)(bool state, void *user_data);
 
 /**
- * @brief Called to create keyboard option menu if available.
+ * @brief Called to create the option window.
+ *
+ * @remarks if Input panel requests to open the option window, @a type will be #INPUTMETHOD_OPTION_WINDOW_TYPE_KEYBOARD.
+ * And if Settings application requests to open it, @a type will be #INPUTMETHOD_OPTION_WINDOW_TYPE_SETTING_APPLICATION.
  *
  * @since_tizen 2.4
  *
  * @param[in] window The created window object
  * @param[in] type The type of option window
+ * @param[in] user_data User data to be passed from the callback registration function
  *
- * @pre The callback must be registered using inputmethod_set_extended_cb().
- * inputmethod_create_option_window() calls this callback.
+ * @pre The callback can be registered using inputmethod_event_set_option_window_created_cb(). The
+ * inputmethod_create_option_window() calls this callback function or Settings application can call this callback function.
  *
- * @see inputmethod_set_extended_cb, inputmethod_unset_extended_cb, inputmethod_create_option_window
+ * @see inputmethod_event_set_option_window_created_cb, inputmethod_create_option_window
  */
-typedef void (*inputmethod_create_option_window_cb)(Evas_Object *window, inputmethod_option_window_type_e type);
+typedef void (*inputmethod_option_window_created_cb)(Evas_Object *window, inputmethod_option_window_type_e type, void *user_data);
 
 /**
- * @brief Called to destroy keyboard option menu.
+ * @brief Called to destroy the option window.
  *
  * @since_tizen 2.4
  *
  * @param[in] window The window object to destroy
+ * @param[in] user_data User data to be passed to the callback function
  *
- * @pre The callback must be registered using inputmethod_set_extended_cb().
- * inputmethod_destroy_option_window() calls this callback.
+ * @pre The callback can be registered using inputmethod_event_set_option_window_destroyed_cb().
+ * inputmethod_destroy_option_window() calls this callback function.
  *
- * @see inputmethod_set_extended_cb, inputmethod_unset_extended_cb
+ * @see inputmethod_event_set_option_window_destroyed_cb
  */
-typedef void (*inputmethod_destroy_option_window_cb)(Evas_Object *window);
+typedef void (*inputmethod_option_window_destroyed_cb)(Evas_Object *window, void *user_data);
 
 /**
- * @brief The structure type to contain the set of callback functions for handling application events.
+ * @brief The structure type to contain the set of the essential callback functions for IME application lifecycle and appearance.
  *
- * @since_tizen 2.4
+ * @remarks These four callback functions are mandatory for IME application.
  *
- * @pre The callback must be registered using inputmethod_set_extended_cb().
+ * @since_tizen 2.4
  *
- * @see inputmethod_set_primitive_cb, inputmethod_unset_primitive_cb
+ * @see inputmethod_run
  */
 typedef struct
 {
-    inputmethod_create_cb create;
-    inputmethod_terminate_cb terminate;
-    inputmethod_show_cb show;
-    inputmethod_hide_cb hide;
-} inputmethod_primitive_callback_s;
+    inputmethod_create_cb create;       /**< Called when the input panel is created */
+    inputmethod_terminate_cb terminate; /**< Called when the input panel is terminated */
+    inputmethod_show_cb show;           /**< Called when the input panel is requested to show itself */
+    inputmethod_hide_cb hide;           /**< Called when the input panel is requested to hide itself */
+} inputmethod_callback_s;
 
 /**
- * @brief The structure type to contain the set of callback functions for handling application events.
+ * @brief Runs the main loop of IME application.
  *
- * @since_tizen 2.4
+ * @details This function starts to run IME application's main loop. The inputmethod_create_cb()
+ * callback function is called to initialize IME application before the main loop starts up. And
+ * the inputmethod_terminate_cb() callback function is called when IME application is terminated.
  *
- * @pre It is one of the input parameters of the inputmethod_set_extended_cb() function.
+ * @remarks IME application needs to implement inputmethod_app_main() function which is the main
+ * entry point of IME application. In inputmethod_app_main() function, the inputmethod_run()
+ * function MUST be called with the necessary callback functions; inputmethod_create_cb(),
+ * inputmethod_terminate_cb(), inputmethod_show_cb(), and inputmethod_hide_cb() callback functions
+ * are mandatory for IME application.
+ *
+ * @since_tizen 2.4
+
+ * @param[in] basic_cb The structure pointer of the essential callback functions
+ * @param[in] user_data User data to be passed to the callback functions
+ *
+ * @return 0 if IME application ends successfully, otherwise a negative error value
+ * @retval #INPUTMETHOD_ERROR_NONE No error
+ * @retval #INPUTMETHOD_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #INPUTMETHOD_ERROR_NO_CALLBACK_FUNCTION Necessary callback function is not set
+ * @retval #INPUTMETHOD_ERROR_OPERATION_FAILED Operation failed
+ *
+ * @pre The inputmethod_event_set_***() functions can be called to set the event handling callback functions.
+ *
+ * @see inputmethod_callback_s, inputmethod_event_set_focus_in_cb, inputmethod_event_set_focus_out_cb,
+ * inputmethod_event_set_surrounding_text_updated_cb, inputmethod_event_set_input_context_reset_cb,
+ * inputmethod_event_set_cursor_position_updated_cb, inputmethod_event_set_language_requested_cb,
+ * inputmethod_event_set_language_set_cb, inputmethod_event_set_imdata_set_cb, inputmethod_event_set_layout_set_cb,
+ * inputmethod_event_set_return_key_type_set_cb, inputmethod_event_set_return_key_state_set_cb,
+ * inputmethod_event_set_geometry_requested_cb, inputmethod_event_set_display_language_changed_cb,
+ * inputmethod_event_set_rotation_degree_changed_cb, inputmethod_event_set_accessibility_state_changed_cb,
+ * inputmethod_event_set_option_window_created_cb, inputmethod_event_set_option_window_destroyed_cb
  *
- * @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)
+ static void ime_create_cb(void *user_data);
+ static void ime_terminate_cb(void *user_data);
+ static void ime_show_cb(int context_id, inputmethod_context_h context, void *user_data);
+ static void ime_hide_cb(int context_id, void *user_data);
+ static void ime_focus_in_cb(int context_id, void *user_data);
+ static void ime_focus_out_cb(int context_id, void *user_data);
+ static void ime_cursor_position_updated_cb(int cursor_pos, void *user_data);
+
+ static void ime_create_cb(void *user_data)
+ {
+     Evas_Object *ime_win = NULL;
+
+     inputmethod_set_size(480, 400, 800, 400);
+     ime_win = inputmethod_get_main_window();
+     if (ime_win) {
+         // Prepare before showing IME window.
+     }
+ }
+
+ static void ime_show_cb(int context_id, inputmethod_context_h context, void *user_data)
+ {
+     Ecore_IMF_Input_Panel_Layout layout;
+     inputmethod_layout_variation_e layout_variation;
+     Evas_Object *ime_win;
+
+     inputmethod_context_get_layout(context, &layout);
+     inputmethod_context_get_layout_variation(context, &layout_variation);
+
+     ime_win = inputmethod_get_main_window();
+     if (ime_win) {
+         // Compose IME UI properly with the context information and show.
+
+         evas_object_show(ime_win);
+     }
+ }
+
+ static void ime_hide_cb(int context_id, void *user_data)
  {
-     inputmethod_set_primitive_cb(inputmethod_primitive_callback);
-     inputmethod_set_extended_cb(inputmethod_extended_callback);
+     Evas_Object *ime_win = inputmethod_get_main_window();
+     if (ime_win) {
+         evas_object_hide(ime_win);
+     }
+ }
+
+ void inputmethod_app_main(int argc, char **argv)
+ {
+     inputmethod_callback_s basic_callback = {
+         ime_create_cb,
+         ime_terminate_cb,
+         ime_show_cb,
+         ime_hide_cb,
+     };
 
-     inputmethod_run();
+     inputmethod_event_set_focus_in_cb(ime_focus_in_cb, NULL);
+     inputmethod_event_set_focus_out_cb(ime_focus_out_cb, NULL);
+     inputmethod_event_set_cursor_position_updated_cb(ime_cursor_position_updated_cb, NULL);
 
-     inputmethod_unset_primitive_cb();
-     inputmethod_unset_extended_cb();
+     inputmethod_run(&basic_callback, NULL);
  }
  * @endcode
  */
-extern void inputmethod_efl_main(int argc, char **argv);
+EXPORT_API int inputmethod_run(inputmethod_callback_s *basic_cb, void *user_data);
+
+/**
+ * @brief Sets @c focus_in event callback function.
+ *
+ * @remarks The inputmethod_focus_in_cb() callback function is called when an associated text input
+ * UI control has focus.
+ *
+ * @since_tizen 2.4
+ *
+ * @param[in] callback_func @c focus_in event callback function
+ * @param[in] user_data User data to be passed to the callback function
+ *
+ * @return 0 on success, otherwise a negative error value
+ * @retval #INPUTMETHOD_ERROR_NONE No error
+ * @retval #INPUTMETHOD_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #INPUTMETHOD_ERROR_OPERATION_FAILED Operation failed
+ *
+ * @post The inputmethod_run() function should be called to start to run IME application's main loop.
+ *
+ * @see inputmethod_focus_in_cb, inputmethod_run
+ */
+EXPORT_API int inputmethod_event_set_focus_in_cb(inputmethod_focus_in_cb callback_func, void *user_data);
+
+/**
+ * @brief Sets @c focus_out event callback function.
+ *
+ * @remarks The inputmethod_focus_out_cb() callback function is called when an associated text input
+ * UI control loses focus.
+ *
+ * @since_tizen 2.4
+ *
+ * @param[in] callback_func @c focus_out event callback function
+ * @param[in] user_data User data to be passed to the callback function
+ *
+ * @return 0 on success, otherwise a negative error value
+ * @retval #INPUTMETHOD_ERROR_NONE No error
+ * @retval #INPUTMETHOD_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #INPUTMETHOD_ERROR_OPERATION_FAILED Operation failed
+ *
+ * @post The inputmethod_run() function should be called to start to run IME application's main loop.
+ *
+ * @see inputmethod_focus_out_cb, inputmethod_run
+ */
+EXPORT_API int inputmethod_event_set_focus_out_cb(inputmethod_focus_out_cb callback_func, void *user_data);
+
+/**
+ * @brief Sets @c surrounding_text_updated event callback function.
+ *
+ * @remarks The inputmethod_surrounding_text_updated_cb() callback function is called when an
+ * associated text input UI control responds to a request with the surrounding text.
+ *
+ * @since_tizen 2.4
+ *
+ * @param[in] callback_func @c surrounding_text_updated event callback function
+ * @param[in] user_data User data to be passed to the callback function
+ *
+ * @return 0 on success, otherwise a negative error value
+ * @retval #INPUTMETHOD_ERROR_NONE No error
+ * @retval #INPUTMETHOD_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #INPUTMETHOD_ERROR_OPERATION_FAILED Operation failed
+ *
+ * @post The inputmethod_run() function should be called to start to run IME application's main loop.
+ *
+ * @see inputmethod_surrounding_text_updated_cb, inputmethod_run
+ */
+EXPORT_API int inputmethod_event_set_surrounding_text_updated_cb(inputmethod_surrounding_text_updated_cb callback_func, void *user_data);
+
+/**
+ * @brief Sets #c input_context_reset event callback function.
+ *
+ * @remarks The inputmethod_input_context_reset_cb() callback function is called to reset the input
+ * context of an associated text input UI control.
+ *
+ * @since_tizen 2.4
+ *
+ * @param[in] callback_func @c input_context_reset event callback function
+ * @param[in] user_data User data to be passed to the callback function
+ *
+ * @return 0 on success, otherwise a negative error value
+ * @retval #INPUTMETHOD_ERROR_NONE No error
+ * @retval #INPUTMETHOD_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #INPUTMETHOD_ERROR_OPERATION_FAILED Operation failed
+ *
+ * @post The inputmethod_run() function should be called to start to run IME application's main loop.
+ *
+ * @see inputmethod_input_context_reset_cb, inputmethod_run
+ */
+EXPORT_API int inputmethod_event_set_input_context_reset_cb(inputmethod_input_context_reset_cb callback_func, void *user_data);
+
+/**
+ * @brief Sets @c cursor_position_updated event callback function.
+ *
+ * @remarks The inputmethod_cursor_position_updated_cb() callback function is called when the position
+ * of the cursor in an associated text input UI control changes.
+ *
+ * @since_tizen 2.4
+ *
+ * @param[in] callback_func @c cursor_position_updated event callback function
+ * @param[in] user_data User data to be passed to the callback function
+ *
+ * @return 0 on success, otherwise a negative error value
+ * @retval #INPUTMETHOD_ERROR_NONE No error
+ * @retval #INPUTMETHOD_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #INPUTMETHOD_ERROR_OPERATION_FAILED Operation failed
+ *
+ * @post The inputmethod_run() function should be called to start to run IME application's main loop.
+ *
+ * @see inputmethod_cursor_position_updated_cb, inputmethod_run
+ */
+EXPORT_API int inputmethod_event_set_cursor_position_updated_cb(inputmethod_cursor_position_updated_cb callback_func, void *user_data);
+
+/**
+ * @brief Sets @c language_requested event callback function.
+ *
+ * @remarks The inputmethod_language_requested_cb() callback function is called when an associated
+ * text input UI control requests for the language of the input panel.
+ *
+ * @since_tizen 2.4
+ *
+ * @param[in] callback_func @c language_requested event callback function
+ * @param[in] user_data User data to be passed to the callback function
+ *
+ * @return 0 on success, otherwise a negative error value
+ * @retval #INPUTMETHOD_ERROR_NONE No error
+ * @retval #INPUTMETHOD_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #INPUTMETHOD_ERROR_OPERATION_FAILED Operation failed
+ *
+ * @post The inputmethod_run() function should be called to start to run IME application's main loop.
+ *
+ * @see inputmethod_language_requested_cb, inputmethod_run
+ */
+EXPORT_API int inputmethod_event_set_language_requested_cb(inputmethod_language_requested_cb callback_func, void *user_data);
+
+/**
+ * @brief Sets @c language_set event callback function.
+ *
+ * @remarks The inputmethod_language_set_cb() callback function is called to set the preferred
+ * language to the input panel.
+ *
+ * @since_tizen 2.4
+ *
+ * @param[in] callback_func @c language_set event callback function
+ * @param[in] user_data User data to be passed to the callback function
+ *
+ * @return 0 on success, otherwise a negative error value
+ * @retval #INPUTMETHOD_ERROR_NONE No error
+ * @retval #INPUTMETHOD_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #INPUTMETHOD_ERROR_OPERATION_FAILED Operation failed
+ *
+ * @post The inputmethod_run() function should be called to start to run IME application's main loop.
+ *
+ * @see inputmethod_language_set_cb, inputmethod_run
+ */
+EXPORT_API int inputmethod_event_set_language_set_cb(inputmethod_language_set_cb callback_func, void *user_data);
+
+/**
+ * @brief Sets @c imdata_set event callback function.
+ *
+ * @remarks The inputmethod_imdata_set_cb() callback function is called to set the application
+ * specific data to deliver to the input panel.
+ *
+ * @since_tizen 2.4
+ *
+ * @param[in] callback_func @c imdata_set event callback function
+ * @param[in] user_data User data to be passed to the callback function
+ *
+ * @return 0 on success, otherwise a negative error value
+ * @retval #INPUTMETHOD_ERROR_NONE No error
+ * @retval #INPUTMETHOD_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #INPUTMETHOD_ERROR_OPERATION_FAILED Operation failed
+ *
+ * @post The inputmethod_run() function should be called to start to run IME application's main loop.
+ *
+ * @see inputmethod_imdata_set_cb, inputmethod_run
+ */
+EXPORT_API int inputmethod_event_set_imdata_set_cb(inputmethod_imdata_set_cb callback_func, void *user_data);
+
+/**
+ * @brief Sets @c layout_set event callback function.
+ *
+ * @remarks The inputmethod_layout_set_cb() callback function is called when an associated text input
+ * UI control requests the input panel to set its layout.
+ *
+ * @since_tizen 2.4
+ *
+ * @param[in] callback_func @c layout_set event callback function
+ * @param[in] user_data User data to be passed to the callback function
+ *
+ * @return 0 on success, otherwise a negative error value
+ * @retval #INPUTMETHOD_ERROR_NONE No error
+ * @retval #INPUTMETHOD_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #INPUTMETHOD_ERROR_OPERATION_FAILED Operation failed
+ *
+ * @post The inputmethod_run() function should be called to start to run IME application's main loop.
+ *
+ * @see inputmethod_layout_set_cb, inputmethod_run
+ */
+EXPORT_API int inputmethod_event_set_layout_set_cb(inputmethod_layout_set_cb callback_func, void *user_data);
+
+/**
+ * @brief Sets @c return_key_type_set event callback function.
+ *
+ * @remarks The inputmethod_return_key_type_set_cb() callback function is called when an associated
+ * text input UI control requests the input panel to set the @c Return key label.
+ *
+ * @since_tizen 2.4
+ *
+ * @param[in] callback_func @c return_key_type_set event callback function
+ * @param[in] user_data User data to be passed to the callback function
+ *
+ * @return 0 on success, otherwise a negative error value
+ * @retval #INPUTMETHOD_ERROR_NONE No error
+ * @retval #INPUTMETHOD_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #INPUTMETHOD_ERROR_OPERATION_FAILED Operation failed
+ *
+ * @post The inputmethod_run() function should be called to start to run IME application's main loop.
+ *
+ * @see inputmethod_return_key_type_set_cb, inputmethod_run
+ */
+EXPORT_API int inputmethod_event_set_return_key_type_set_cb(inputmethod_return_key_type_set_cb callback_func, void *user_data);
+
+/**
+ * @brief Sets @c return_key_state_set event callback function.
+ *
+ * @remarks The inputmethod_return_key_state_set_cb() callback function is called when an associated
+ * text input UI control requests the input panel to enable or disable the @c Return key state.
+ *
+ * @since_tizen 2.4
+ *
+ * @param[in] callback_func @c return_key_state_set event callback function
+ * @param[in] user_data User data to be passed to the callback function
+ *
+ * @return 0 on success, otherwise a negative error value
+ * @retval #INPUTMETHOD_ERROR_NONE No error
+ * @retval #INPUTMETHOD_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #INPUTMETHOD_ERROR_OPERATION_FAILED Operation failed
+ *
+ * @post The inputmethod_run() function should be called to start to run IME application's main loop.
+ *
+ * @see inputmethod_return_key_state_set_cb, inputmethod_run
+ */
+EXPORT_API int inputmethod_event_set_return_key_state_set_cb(inputmethod_return_key_state_set_cb callback_func, void *user_data);
 
 /**
- * @brief Registers primitive callback functions to be invoked when the inputmethod state changes.
+ * @brief Sets @c geometry_requested event callback function.
  *
- * @remarks This function must be called before inputmethod_run(). The registered callback
- * functions can be unregistered by inputmethod_unset_primitive_cb().
+ * @remarks The inputmethod_geometry_requested_cb() callback function is called when an associated
+ * text input UI control requests for the position and size of the input panel.
  *
  * @since_tizen 2.4
  *
- * @param[in] callback The callback function to register
+ * @param[in] callback_func @c geometry_requested event callback function
+ * @param[in] user_data User data to be passed to the callback function
+ *
+ * @return 0 on success, otherwise a negative error value
+ * @retval #INPUTMETHOD_ERROR_NONE No error
+ * @retval #INPUTMETHOD_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #INPUTMETHOD_ERROR_OPERATION_FAILED Operation failed
  *
- * @see inputmethod_unset_primitive_cb
+ * @post The inputmethod_run() function should be called to start to run IME application's main loop.
+ *
+ * @see inputmethod_geometry_requested_cb, inputmethod_run
  */
-EXPORT_API void inputmethod_set_primitive_cb(inputmethod_primitive_callback_s callback);
+EXPORT_API int inputmethod_event_set_geometry_requested_cb(inputmethod_geometry_requested_cb callback_func, void *user_data);
 
 /**
- * @brief Unregisters the primitive callback functions.
+ * @brief Sets @c display_language_changed event callback function.
  *
- * @remarks This function must be called after inputmethod_run() and unregisters the callback
- * functions by inputmethod_set_primitive_cb().
+ * @remarks The inputmethod_display_language_changed_cb() callback function is called when the system
+ * display language is changed.
  *
  * @since_tizen 2.4
  *
- * @see inputmethod_set_primitive_cb
+ * @param[in] callback_func @c display_language_changed event callback function
+ * @param[in] user_data User data to be passed to the callback function
+ *
+ * @return 0 on success, otherwise a negative error value
+ * @retval #INPUTMETHOD_ERROR_NONE No error
+ * @retval #INPUTMETHOD_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #INPUTMETHOD_ERROR_OPERATION_FAILED Operation failed
+ *
+ * @post The inputmethod_run() function should be called to start to run IME application's main loop.
+ *
+ * @see inputmethod_display_language_changed_cb, inputmethod_run
  */
-EXPORT_API void inputmethod_unset_primitive_cb(void);
+EXPORT_API int inputmethod_event_set_display_language_changed_cb(inputmethod_display_language_changed_cb callback_func, void *user_data);
 
 /**
- * @brief Registers extended callback functions to be invoked when the inputmethod state changes.
+ * @brief Sets #c rotation_degree_changed event callback function.
  *
- * @remarks This function must be called before inputmethod_run(). The registered callback
- * functions can be unregistered by inputmethod_unset_extended_cb().
+ * @remarks The inputmethod_rotation_degree_changed_cb() callback function is called when the device
+ * is rotated.
  *
  * @since_tizen 2.4
  *
- * @param[in] callback The callback function to register
+ * @param[in] callback_func @c rotation_degree_changed event callback function
+ * @param[in] user_data User data to be passed to the callback function
+ *
+ * @return 0 on success, otherwise a negative error value
+ * @retval #INPUTMETHOD_ERROR_NONE No error
+ * @retval #INPUTMETHOD_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #INPUTMETHOD_ERROR_OPERATION_FAILED Operation failed
  *
- * @see inputmethod_unset_extended_cb
+ * @post The inputmethod_run() function should be called to start to run IME application's main loop.
+ *
+ * @see inputmethod_rotation_degree_changed_cb, inputmethod_run
  */
-EXPORT_API void inputmethod_set_extended_cb(inputmethod_extended_callback_s callback);
+EXPORT_API int inputmethod_event_set_rotation_degree_changed_cb(inputmethod_rotation_degree_changed_cb callback_func, void *user_data);
 
 /**
- * @brief Unregisters the extended callback function.
+ * @brief Sets @c accessibility_state_changed event callback function.
  *
- * @remarks This function must be called after inputmethod_run() and unregisters the callback
- * functions by inputmethod_set_extended_cb().
+ * @remarks The inputmethod_accessibility_state_changed_cb() callback function is called when
+ * Accessibility in Settings application is on or off.
  *
  * @since_tizen 2.4
  *
- * @see inputmethod_set_extended_cb
+ * @param[in] callback_func @c accessibility_state_changed event callback function
+ * @param[in] user_data User data to be passed to the callback function
+ *
+ * @return 0 on success, otherwise a negative error value
+ * @retval #INPUTMETHOD_ERROR_NONE No error
+ * @retval #INPUTMETHOD_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #INPUTMETHOD_ERROR_OPERATION_FAILED Operation failed
+ *
+ * @post The inputmethod_run() function should be called to start to run IME application's main loop.
+ *
+ * @see inputmethod_accessibility_state_changed_cb, inputmethod_run
  */
-EXPORT_API void inputmethod_unset_extended_cb(void);
+EXPORT_API int inputmethod_event_set_accessibility_state_changed_cb(inputmethod_accessibility_state_changed_cb callback_func, void *user_data);
 
 /**
- * @brief Runs the main loop.
+ * @brief Sets @c option_window_created event callback function.
  *
- * @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.
+ * @remarks The inputmethod_option_window_created_cb() callback function is called to create the option window.
  *
  * @since_tizen 2.4
  *
- * @see inputmethod_create_cb, inputmethod_terminate_cb, inputmethod_set_primitive_cb, inputmethod_set_extended_cb
+ * @param[in] callback_func @c option_window_created event callback function
+ * @param[in] user_data User data to be passed to the callback function
+ *
+ * @return 0 on success, otherwise a negative error value
+ * @retval #INPUTMETHOD_ERROR_NONE No error
+ * @retval #INPUTMETHOD_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #INPUTMETHOD_ERROR_OPERATION_FAILED Operation failed
+ *
+ * @post The inputmethod_run() function should be called to start to run IME application's main loop.
+ *
+ * @see inputmethod_option_window_created_cb, inputmethod_run
  */
-EXPORT_API void inputmethod_run(void);
+EXPORT_API int inputmethod_event_set_option_window_created_cb(inputmethod_option_window_created_cb callback_func, void *user_data);
 
 /**
- * @brief Sends a KeyEvent to client application.
+ * @brief Sets @c option_window_destroyed event callback function.
+ *
+ * @remarks The inputmethod_option_window_destroyed_cb() callback function is called to destroy the option window.
  *
  * @since_tizen 2.4
  *
- * @param[in] keycode The key event to be sent
+ * @param[in] callback_func @c option_window_destroyed event callback function
+ * @param[in] user_data User data to be passed to the callback function
+ *
+ * @return 0 on success, otherwise a negative error value
+ * @retval #INPUTMETHOD_ERROR_NONE No error
+ * @retval #INPUTMETHOD_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #INPUTMETHOD_ERROR_OPERATION_FAILED Operation failed
+ *
+ * @post The inputmethod_run() function should be called to start to run IME application's main loop.
+ *
+ * @see inputmethod_option_window_destroyed_cb, inputmethod_run
+ */
+EXPORT_API int inputmethod_event_set_option_window_destroyed_cb(inputmethod_option_window_destroyed_cb callback_func, void *user_data);
+
+/**
+ * @brief Sends a key event directly to the associated text input UI control.
+ *
+ * @since_tizen 2.4
+ *
+ * @param[in] keycode The key code to be sent
  * @param[in] keymask The modifier key mask
+ *
+ * @return 0 on success, otherwise a negative error value
+ * @retval #INPUTMETHOD_ERROR_NONE No error
+ * @retval #INPUTMETHOD_ERROR_NOT_RUNNING IME main loop isn't started yet
+ *
+ * @see inputmethod_key_code_e, inputmethod_key_mask_e
  */
-EXPORT_API void inputmethod_send_key_event(inputmethod_key_code_e keycode, inputmethod_key_mask_e keymask);
+EXPORT_API int inputmethod_send_key_event(inputmethod_key_code_e keycode, inputmethod_key_mask_e keymask);
 
 /**
- * @brief Commits a string to client application directly.
+ * @brief Sends the text to the associated text input UI control.
  *
  * @since_tizen 2.4
  *
  * @param[in] str The UTF-8 string to be committed
+ *
+ * @return 0 on success, otherwise a negative error value
+ * @retval #INPUTMETHOD_ERROR_NONE No error
+ * @retval #INPUTMETHOD_ERROR_NOT_RUNNING IME main loop isn't started yet
+ *
+ * @see inputmethod_show_preedit_string, inputmethod_hide_preedit_string, inputmethod_update_preedit_string
  */
-EXPORT_API void inputmethod_commit_string(const char *str);
+EXPORT_API int 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
+ * @return 0 on success, otherwise a negative error value
+ * @retval #INPUTMETHOD_ERROR_NONE No error
+ * @retval #INPUTMETHOD_ERROR_NOT_RUNNING IME main loop isn't started yet
+ *
+ * @see inputmethod_commit_string, inputmethod_hide_preedit_string, inputmethod_update_preedit_string
  */
-EXPORT_API void inputmethod_show_preedit_string(void);
+EXPORT_API int inputmethod_show_preedit_string(void);
 
 /**
  * @brief Requests to hide preedit string.
  *
  * @since_tizen 2.4
  *
- * @see inputmethod_show_preedit_string, inputmethod_update_preedit_string
+ * @return 0 on success, otherwise a negative error value
+ * @retval #INPUTMETHOD_ERROR_NONE No error
+ * @retval #INPUTMETHOD_ERROR_NOT_RUNNING IME main loop isn't started yet
+ *
+ * @see inputmethod_commit_string, inputmethod_show_preedit_string, inputmethod_update_preedit_string
  */
-EXPORT_API void inputmethod_hide_preedit_string(void);
+EXPORT_API int inputmethod_hide_preedit_string(void);
 
 /**
  * @brief Updates a new preedit string.
@@ -608,47 +995,72 @@ EXPORT_API void inputmethod_hide_preedit_string(void);
  *
  * @param[in] str The UTF-8 string to be updated in preedit
  *
- * @see inputmethod_show_preedit_string, inputmethod_hide_preedit_string
+ * @return 0 on success, otherwise a negative error value
+ * @retval #INPUTMETHOD_ERROR_NONE No error
+ * @retval #INPUTMETHOD_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #INPUTMETHOD_ERROR_NOT_RUNNING IME main loop isn't started yet
+ *
+ * @see inputmethod_commit_string, inputmethod_show_preedit_string, inputmethod_hide_preedit_string
  */
-EXPORT_API void inputmethod_update_preedit_string(const char *str);
+EXPORT_API int inputmethod_update_preedit_string(const char *str);
 
 /**
- * @brief Requests to get surrounding text, asynchronously.
+ * @brief Requests the surrounding text from the position of the cursor, 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
+ * @param[in] maxlen_before The maximum length of string to be retrieved before the cursor; -1 means unlimited
+ * @param[in] maxlen_after The maximum length of string to be retrieved after the cursor; -1 means unlimited
+ *
+ * @return 0 on success, otherwise a negative error value
+ * @retval #INPUTMETHOD_ERROR_NONE No error
+ * @retval #INPUTMETHOD_ERROR_NO_CALLBACK_FUNCTION Necessary callback function is not set
+ * @retval #INPUTMETHOD_ERROR_NOT_RUNNING IME main loop isn't started yet
  *
- * @post inputmethod_update_surrounding_text_cb() callback function will be called with the requested text.
+ * @pre The inputmethod_surrounding_text_updated_cb() callback function MUST be set by inputmethod_event_set_surrounding_text_updated_cb().
  *
- * @see inputmethod_delete_surrounding_text, inputmethod_update_surrounding_text_cb
+ * @post The requested surrounding text can be received using the inputmethod_surrounding_text_updated_cb() callback function.
+ *
+ * @see inputmethod_delete_surrounding_text, inputmethod_event_set_surrounding_text_updated_cb, inputmethod_surrounding_text_updated_cb
  */
-EXPORT_API void inputmethod_get_surrounding_text(int maxlen_before, int maxlen_after);
+EXPORT_API int inputmethod_request_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
+ * @param[in] offset The offset value from the cursor position
+ * @param[in] len The length of the text to delete
+ *
+ * @return 0 on success, otherwise a negative error value
+ * @retval #INPUTMETHOD_ERROR_NONE No error
+ * @retval #INPUTMETHOD_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #INPUTMETHOD_ERROR_NOT_RUNNING IME main loop isn't started yet
  *
- * @see inputmethod_get_surrounding_text
+ * @see inputmethod_request_surrounding_text
  */
-EXPORT_API void inputmethod_delete_surrounding_text(int offset, int len);
+EXPORT_API int inputmethod_delete_surrounding_text(int offset, int len);
 
 /**
- * @brief This API returns the pointer to main keyboard window
+ * @brief This API returns the pointer of input panel main window.
+ *
+ * @remarks The specific error code can be obtained using the get_last_result() method if this function returns NULL.
  *
  * @since_tizen 2.4
  *
- * @return The keyboard main window object on success, otherwise NULL
+ * @return The input panel main window object on success, otherwise NULL
+ *
+ * @exception #INPUTMETHOD_ERROR_NONE Successful
+ * #INPUTMETHOD_ERROR_NOT_RUNNING IME main loop isn't started yet
+ * #INPUTMETHOD_ERROR_OPERATION_FAILED Operation failed
+ *
+ * @see inputmethod_create_cb, inputmethod_terminate_cb, inputmethod_show_cb, inputmethod_hide_cb
  */
 EXPORT_API Evas_Object* inputmethod_get_main_window(void);
 
 /**
- * @brief This API updates the keyboard window's geometry information
+ * @brief This API updates the input panel window's size information.
  *
  * @since_tizen 2.4
  *
@@ -656,43 +1068,318 @@ EXPORT_API Evas_Object* inputmethod_get_main_window(void);
  * @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
+ *
+ * @return 0 on success, otherwise a negative error value
+ * @retval #INPUTMETHOD_ERROR_NONE No error
+ * @retval #INPUTMETHOD_ERROR_NOT_RUNNING IME main loop isn't started yet
+ *
+ * @see inputmethod_create_cb
  */
-EXPORT_API void inputmethod_set_size_hints(int portrait_width, int portrait_height, int landscape_width, int landscape_height);
+EXPORT_API int inputmethod_set_size(int portrait_width, int portrait_height, int landscape_width, int landscape_height);
 
 /**
- * @brief Requests to create an option window
+ * @brief Requests to create an option window from the input panel.
  *
  * @details The input panel can call this function to open the option window. This
- * function calls inputmethod_create_option_window_cb() callback function with
+ * function calls inputmethod_option_window_created_cb() callback function with
  * #INPUTMETHOD_OPTION_WINDOW_TYPE_KEYBOARD parameter.
  *
  * @since_tizen 2.4
  *
- * @return The option window on success, otherwise NULL
+ * @return 0 on success, otherwise a negative error value
+ * @retval #INPUTMETHOD_ERROR_NONE No error
+ * @retval #INPUTMETHOD_ERROR_NO_CALLBACK_FUNCTION Necessary callback function is not set
+ * @retval #INPUTMETHOD_ERROR_NOT_RUNNING IME main loop isn't started yet
+ * @retval #INPUTMETHOD_ERROR_OPERATION_FAILED Operation failed
+ *
+ * @pre The inputmethod_option_window_created_cb() and inputmethod_option_window_destroyed_cb()
+ * callback functions MUST be set by inputmethod_event_set_option_window_created_cb() and
+ * inputmethod_event_set_option_window_destroyed_cb() respectively.
  *
- * @post inputmethod_destroy_option_window() function can be called to close the
- * option window.
+ * @post This function calls inputmethod_option_window_created_cb() callback function to
+ * create the option window. And inputmethod_destroy_option_window() function can be called
+ * to close the option window.
  *
- * @see inputmethod_destroy_option_window, inputmethod_create_option_window_cb
+ * @see inputmethod_event_set_option_window_created_cb, inputmethod_option_window_created_cb, inputmethod_destroy_option_window
  */
-EXPORT_API Evas_Object* inputmethod_create_option_window(void);
+EXPORT_API int inputmethod_create_option_window(void);
 
 /**
- * @brief Requests to destroy an option window
+ * @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.
+ * is created from either the input panel or 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
+ * @return 0 on success, otherwise a negative error value
+ * @retval #INPUTMETHOD_ERROR_NONE No error
+ * @retval #INPUTMETHOD_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #INPUTMETHOD_ERROR_NO_CALLBACK_FUNCTION Necessary callback function is not set
+ * @retval #INPUTMETHOD_ERROR_NOT_RUNNING IME main loop isn't started yet
+ *
+ * @pre The inputmethod_option_window_created_cb() and inputmethod_option_window_destroyed_cb()
+ * callback functions MUST be set by inputmethod_event_set_option_window_created_cb() and
+ * inputmethod_event_set_option_window_destroyed_cb() respectively.
+ *
+ * @post This function calls inputmethod_option_window_destroyed_cb() callback function
  * to destroy the option window.
  *
- * @see inputmethod_create_option_window, inputmethod_destroy_option_window_cb
+ * @see inputmethod_event_set_option_window_destroyed_cb, inputmethod_option_window_destroyed_cb, inputmethod_create_option_window
+ */
+EXPORT_API int inputmethod_destroy_option_window(Evas_Object *window);
+
+/**
+ * @brief Gets the layout information from the given input context.
+ *
+ * @details Each edit field has various attributes for input panel. This function can be
+ * called to get the layout information in inputmethod_show_cb() callback function.
+ *
+ * @since_tizen 2.4
+ *
+ * @param[in] context The input context information of an associated text input UI control
+ * @param[out] layout Layout information
+ *
+ * @return 0 on success, otherwise a negative error value
+ * @retval #INPUTMETHOD_ERROR_NONE No error
+ * @retval #INPUTMETHOD_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #INPUTMETHOD_ERROR_NOT_RUNNING IME main loop isn't started yet
+ *
+ * @post Input panel UI should be drawn or operated by this information accordingly.
+ *
+ * @see inputmethod_show_cb, inputmethod_layout_set_cb
+ */
+EXPORT_API int inputmethod_context_get_layout(inputmethod_context_h context, Ecore_IMF_Input_Panel_Layout *layout);
+
+/**
+ * @brief Gets the layout variation information from the given input context.
+ *
+ * @details Each edit field has various attributes for input panel. This function can be
+ * called to get the layout variation information in inputmethod_show_cb() callback function.
+ *
+ * @since_tizen 2.4
+ *
+ * @param[in] context The input context information of an associated text input UI control
+ * @param[out] layout_variation Layout variation information
+ *
+ * @return 0 on success, otherwise a negative error value
+ * @retval #INPUTMETHOD_ERROR_NONE No error
+ * @retval #INPUTMETHOD_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #INPUTMETHOD_ERROR_NOT_RUNNING IME main loop isn't started yet
+ *
+ * @post Input panel UI should be drawn or operated by this information accordingly.
+ *
+ * @see inputmethod_show_cb, inputmethod_layout_variation_e
+ */
+EXPORT_API int inputmethod_context_get_layout_variation(inputmethod_context_h context, inputmethod_layout_variation_e *layout_variation);
+
+/**
+ * @brief Gets the cursor position information from the given input context.
+ *
+ * @details Each edit field has various attributes for input panel. This function can be
+ * called to get the cursor position information in inputmethod_show_cb() callback function.
+ *
+ * @since_tizen 2.4
+ *
+ * @param[in] context The input context information of an associated text input UI control
+ * @param[out] cursor_pos Cursor position information
+ *
+ * @return 0 on success, otherwise a negative error value
+ * @retval #INPUTMETHOD_ERROR_NONE No error
+ * @retval #INPUTMETHOD_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #INPUTMETHOD_ERROR_NOT_RUNNING IME main loop isn't started yet
+ *
+ * @post Input panel UI should be drawn or operated by this information accordingly.
+ *
+ * @see inputmethod_show_cb, inputmethod_cursor_position_updated_cb
+ */
+EXPORT_API int inputmethod_context_get_cursor_position(inputmethod_context_h context, int *cursor_pos);
+
+/**
+ * @brief Gets the autocapital type information from the given input context.
+ *
+ * @details Each edit field has various attributes for input panel. This function can be
+ * called to get the autocapital type information in inputmethod_show_cb() callback function.
+ *
+ * @since_tizen 2.4
+ *
+ * @param[in] context The input context information of an associated text input UI control
+ * @param[out] autocapital_type Autocapital type information
+ *
+ * @return 0 on success, otherwise a negative error value
+ * @retval #INPUTMETHOD_ERROR_NONE No error
+ * @retval #INPUTMETHOD_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #INPUTMETHOD_ERROR_NOT_RUNNING IME main loop isn't started yet
+ *
+ * @post Input panel UI should be drawn or operated by this information accordingly.
+ *
+ * @see inputmethod_show_cb
+ */
+EXPORT_API int inputmethod_context_get_autocapital_type(inputmethod_context_h context, Ecore_IMF_Autocapital_Type *autocapital_type);
+
+/**
+ * @brief Gets the @c Return key label type information from the given input context.
+ *
+ * @details Each edit field has various attributes for input panel. This function can be
+ * called to get the @c Return key label type information in inputmethod_show_cb() callback function.
+ *
+ * @since_tizen 2.4
+ *
+ * @param[in] context The input context information of an associated text input UI control
+ * @param[out] return_key_type The @c Return key label type information
+ *
+ * @return 0 on success, otherwise a negative error value
+ * @retval #INPUTMETHOD_ERROR_NONE No error
+ * @retval #INPUTMETHOD_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #INPUTMETHOD_ERROR_NOT_RUNNING IME main loop isn't started yet
+ *
+ * @post Input panel UI should be drawn or operated by this information accordingly.
+ *
+ * @see inputmethod_show_cb, inputmethod_return_key_type_set_cb
+ */
+EXPORT_API int inputmethod_context_get_return_key_type(inputmethod_context_h context, Ecore_IMF_Input_Panel_Return_Key_Type *return_key_type);
+
+/**
+ * @brief Gets the @c Return key state information from the given input context.
+ *
+ * @details Each edit field has various attributes for input panel. This function can be
+ * called to get the @c Return key state information in inputmethod_show_cb() callback function.
+ *
+ * @since_tizen 2.4
+ *
+ * @param[in] context The input context information of an associated text input UI control
+ * @param[out] return_key_state The @c Return key state information \n @c true to enable @c Return key
+ * button, @c false to disable @c Return key button
+ *
+ * @return 0 on success, otherwise a negative error value
+ * @retval #INPUTMETHOD_ERROR_NONE No error
+ * @retval #INPUTMETHOD_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #INPUTMETHOD_ERROR_NOT_RUNNING IME main loop isn't started yet
+ *
+ * @post Input panel UI should be drawn or operated by this information accordingly.
+ *
+ * @see inputmethod_show_cb, inputmethod_return_key_state_set_cb
+ */
+EXPORT_API int inputmethod_context_get_return_key_state(inputmethod_context_h context, bool *return_key_state);
+
+/**
+ * @brief Gets the prediction mode information from the given input context.
+ *
+ * @details Each edit field has various attributes for input panel. This function can be
+ * called to get the prediction mode information in inputmethod_show_cb() callback function.
+ *
+ * @since_tizen 2.4
+ *
+ * @param[in] context The input context information of an associated text input UI control
+ * @param[out] prediction_mode Prediction mode information \n @c true to allow the predictive
+ * text feature if available, @c false to disable the predictive text feature
+ *
+ * @return 0 on success, otherwise a negative error value
+ * @retval #INPUTMETHOD_ERROR_NONE No error
+ * @retval #INPUTMETHOD_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #INPUTMETHOD_ERROR_NOT_RUNNING IME main loop isn't started yet
+ *
+ * @post Input panel UI should be drawn or operated by this information accordingly.
+ *
+ * @see inputmethod_show_cb
+ */
+EXPORT_API int inputmethod_context_get_prediction_mode(inputmethod_context_h context, bool *prediction_mode);
+
+/**
+ * @brief Gets the password mode information from the given input context.
+ *
+ * @details Each edit field has various attributes for input panel. This function can be
+ * called to get the password mode information in inputmethod_show_cb() callback function.
+ *
+ * @remarks If @a password_mode is @c true, the input panel is advised not to support the predictive text.
+ *
+ * @since_tizen 2.4
+ *
+ * @param[in] context The input context information of an associated text input UI control
+ * @param[out] password_mode Password mode information \n @c true to indicate that a password being inputted,
+ * @c false to indicate non-password edit field.
+ *
+ * @return 0 on success, otherwise a negative error value
+ * @retval #INPUTMETHOD_ERROR_NONE No error
+ * @retval #INPUTMETHOD_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #INPUTMETHOD_ERROR_NOT_RUNNING IME main loop isn't started yet
+ *
+ * @post Input panel UI should be drawn or operated by this information accordingly.
+ *
+ * @see inputmethod_show_cb
+ */
+EXPORT_API int inputmethod_context_get_password_mode(inputmethod_context_h context, bool *password_mode);
+
+/**
+ * @brief Gets the input hint information from the given input context.
+ *
+ * @details Each edit field has various attributes for input panel. This function can be
+ * called to get the input hint information in inputmethod_show_cb() callback function.
+ *
+ * @remarks @a input_hint is a bit-wise value which recommends the input panel provide
+ * an auto completion and so on if it is capable of supporting such features.
+ *
+ * @since_tizen 2.4
+ *
+ * @param[in] context The input context information of an associated text input UI control
+ * @param[out] input_hint Input hint information
+ *
+ * @return 0 on success, otherwise a negative error value
+ * @retval #INPUTMETHOD_ERROR_NONE No error
+ * @retval #INPUTMETHOD_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #INPUTMETHOD_ERROR_NOT_RUNNING IME main loop isn't started yet
+ *
+ * @post Input panel UI should be drawn or operated by this information accordingly.
+ *
+ * @see inputmethod_show_cb
+ */
+EXPORT_API int inputmethod_context_get_input_hint(inputmethod_context_h context, Ecore_IMF_Input_Hints *input_hint);
+
+/**
+ * @brief Gets the text bidirectional information from the given input context.
+ *
+ * @details Each edit field has various attributes for input panel. This function can be
+ * called to get the bidirectional information in inputmethod_show_cb() callback function.
+ *
+ * @since_tizen 2.4
+ *
+ * @param[in] context The input context information of an associated text input UI control
+ * @param[out] bidi Text bidirectional information
+ *
+ * @return 0 on success, otherwise a negative error value
+ * @retval #INPUTMETHOD_ERROR_NONE No error
+ * @retval #INPUTMETHOD_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #INPUTMETHOD_ERROR_NOT_RUNNING IME main loop isn't started yet
+ *
+ * @post Input panel UI should be drawn or operated by this information accordingly.
+ *
+ * @see inputmethod_show_cb
+ */
+EXPORT_API int inputmethod_context_get_bidi_direction(inputmethod_context_h context, Ecore_IMF_BiDi_Direction *bidi);
+
+/**
+ * @brief Gets the preferred language information from the given input context.
+ *
+ * @details Each edit field has various attributes for input panel. This function can be
+ * called to get the preferred language information in inputmethod_show_cb() callback function.
+ *
+ * @since_tizen 2.4
+ *
+ * @param[in] context The input context information of an associated text input UI control
+ * @param[out] language Preferred language information
+ *
+ * @return 0 on success, otherwise a negative error value
+ * @retval #INPUTMETHOD_ERROR_NONE No error
+ * @retval #INPUTMETHOD_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #INPUTMETHOD_ERROR_NOT_RUNNING IME main loop isn't started yet
+ *
+ * @post Input panel UI should be drawn or operated by this information accordingly.
+ *
+ * @see inputmethod_show_cb
  */
-EXPORT_API void inputmethod_destroy_option_window(Evas_Object *window);
+EXPORT_API int inputmethod_context_get_language(inputmethod_context_h context, Ecore_IMF_Input_Panel_Lang *language);
 
 /**
  * @}
@@ -702,5 +1389,6 @@ EXPORT_API void inputmethod_destroy_option_window(Evas_Object *window);
 }
 #endif
 
-#endif // __TIZEN_UI_INPUTMETHOD_H__
+#endif // __TIZEN_UIX_INPUTMETHOD_H__
 
+\0
old mode 100755 (executable)
new mode 100644 (file)
index b758404..580514d
@@ -14,8 +14,8 @@
  * limitations under the License.
  */
 
-#ifndef __TIZEN_UI_INPUTMETHOD_KEYDEF_H__
-#define __TIZEN_UI_INPUTMETHOD_KEYDEF_H__
+#ifndef __TIZEN_UIX_INPUTMETHOD_KEYDEF_H__
+#define __TIZEN_UIX_INPUTMETHOD_KEYDEF_H__
 
 /**
  * @file inputmethod_keydef.h
  */
 
 /**
- * @addtogroup CAPI_UI_INPUTMETHOD_MODULE
+ * @addtogroup CAPI_UIX_INPUTMETHOD_MODULE
  * @{
  */
 
 /**
  * @brief Enumeration of the key codes.
  *
+ * @details Defines the list of keys supported by the system.
+ * Note that certain keys may not be available on all devices.
+ *
  * @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 */
+    INPUTMETHOD_KEY_BackSpace                          = 0xFF08,    /**< The backspace key */
+    INPUTMETHOD_KEY_Tab                                = 0xFF09,    /**< The tab key */
+    INPUTMETHOD_KEY_Linefeed                           = 0xFF0A,    /**< The linefeed key */
+    INPUTMETHOD_KEY_Clear                              = 0xFF0B,    /**< The clear key */
+    INPUTMETHOD_KEY_Return                             = 0xFF0D,    /**< The return key */
+    INPUTMETHOD_KEY_Pause                              = 0xFF13,    /**< The pause key */
+    INPUTMETHOD_KEY_Scroll_Lock                        = 0xFF14,    /**< The scroll lock key */
+    INPUTMETHOD_KEY_Sys_Req                            = 0xFF15,    /**< The sys req key */
+    INPUTMETHOD_KEY_Escape                             = 0xFF1B,    /**< The escape key */
+    INPUTMETHOD_KEY_Delete                             = 0xFFFF,    /**< The delete key */
 
     /* 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 */
+    INPUTMETHOD_KEY_Home                               = 0xFF50,    /**< The home key */
+    INPUTMETHOD_KEY_Left                               = 0xFF51,    /**< The left directional key */
+    INPUTMETHOD_KEY_Up                                 = 0xFF52,    /**< The up directional key */
+    INPUTMETHOD_KEY_Right                              = 0xFF53,    /**< The right directional key */
+    INPUTMETHOD_KEY_Down                               = 0xFF54,    /**< The down directional key */
+    INPUTMETHOD_KEY_Prior                              = 0xFF55,    /**< The prior, previous key */
+    INPUTMETHOD_KEY_Page_Up                            = 0xFF55,    /**< The page up key */
+    INPUTMETHOD_KEY_Next                               = 0xFF56,    /**< The next key */
+    INPUTMETHOD_KEY_Page_Down                          = 0xFF56,    /**< The page down key */
+    INPUTMETHOD_KEY_End                                = 0xFF57,    /**< The end key */
+    INPUTMETHOD_KEY_Begin                              = 0xFF58,    /**< The begin key */
 
     /* 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,
+    INPUTMETHOD_KEY_Select                             = 0xFF60,    /**< The select key */
+    INPUTMETHOD_KEY_Print                              = 0xFF61,    /**< The print key */
+    INPUTMETHOD_KEY_Execute                            = 0xFF62,    /**< The execute, run, do key */
+    INPUTMETHOD_KEY_Insert                             = 0xFF63,    /**< The insert key */
+    INPUTMETHOD_KEY_Undo                               = 0xFF65,    /**< The undo key */
+    INPUTMETHOD_KEY_Redo                               = 0xFF66,    /**< The redo key */
+    INPUTMETHOD_KEY_Menu                               = 0xFF67,    /**< The menu key */
+    INPUTMETHOD_KEY_Find                               = 0xFF68,    /**< The find key */
+    INPUTMETHOD_KEY_Cancel                             = 0xFF69,    /**< The cancel, stop, abort, exit key */
+    INPUTMETHOD_KEY_Help                               = 0xFF6A,    /**< The help key */
+    INPUTMETHOD_KEY_Break                              = 0xFF6B,    /**< The break key */
+    INPUTMETHOD_KEY_Mode_switch                        = 0xFF7E,    /**< The character set switch key */
+    INPUTMETHOD_KEY_Num_Lock                           = 0xFF7F,    /**< The num lock key */
+
+    /* Keypad */
+    INPUTMETHOD_KEY_KP_Space                           = 0xFF80,    /**< The Numpad space key */
+    INPUTMETHOD_KEY_KP_Tab                             = 0xFF89,    /**< The Numpad tab key */
+    INPUTMETHOD_KEY_KP_Enter                           = 0xFF8D,    /**< The Numpad enter key */
+    INPUTMETHOD_KEY_KP_F1                              = 0xFF91,    /**< The Numpad function 1 key */
+    INPUTMETHOD_KEY_KP_F2                              = 0xFF92,    /**< The Numpad function 2 key */
+    INPUTMETHOD_KEY_KP_F3                              = 0xFF93,    /**< The Numpad function 3 key */
+    INPUTMETHOD_KEY_KP_F4                              = 0xFF94,    /**< The Numpad function 4 key */
+    INPUTMETHOD_KEY_KP_Home                            = 0xFF95,    /**< The Numpad home key */
+    INPUTMETHOD_KEY_KP_Left                            = 0xFF96,    /**< The Numpad left key */
+    INPUTMETHOD_KEY_KP_Up                              = 0xFF97,    /**< The Numpad up key */
+    INPUTMETHOD_KEY_KP_Right                           = 0xFF98,    /**< The Numpad right key */
+    INPUTMETHOD_KEY_KP_Down                            = 0xFF99,    /**< The Numpad down key */
+    INPUTMETHOD_KEY_KP_Prior                           = 0xFF9A,    /**< The Numpad prior, previous key */
+    INPUTMETHOD_KEY_KP_Page_Up                         = 0xFF9A,    /**< The Numpad page up key */
+    INPUTMETHOD_KEY_KP_Next                            = 0xFF9B,    /**< The Numpad next key */
+    INPUTMETHOD_KEY_KP_Page_Down                       = 0xFF9B,    /**< The Numpad page down key */
+    INPUTMETHOD_KEY_KP_End                             = 0xFF9C,    /**< The Numpad end key */
+    INPUTMETHOD_KEY_KP_Begin                           = 0xFF9D,    /**< The Numpad begin key */
+    INPUTMETHOD_KEY_KP_Insert                          = 0xFF9E,    /**< The Numpad insert key */
+    INPUTMETHOD_KEY_KP_Delete                          = 0xFF9F,    /**< The Numpad delete key */
+    INPUTMETHOD_KEY_KP_Equal                           = 0xFFBD,    /**< The Numpad equal key */
+    INPUTMETHOD_KEY_KP_Multiply                        = 0xFFAA,    /**< The Numpad multiply key */
+    INPUTMETHOD_KEY_KP_Add                             = 0xFFAB,    /**< The Numpad add key */
+    INPUTMETHOD_KEY_KP_Separator                       = 0xFFAC,    /**< The Numpad separator key */
+    INPUTMETHOD_KEY_KP_Subtract                        = 0xFFAD,    /**< The Numpad subtract key */
+    INPUTMETHOD_KEY_KP_Decimal                         = 0xFFAE,    /**< The Numpad decimal key */
+    INPUTMETHOD_KEY_KP_Divide                          = 0xFFAF,    /**< The Numpad divide key */
+
+    INPUTMETHOD_KEY_KP_0                               = 0xFFB0,    /**< The Numpad 0 key */
+    INPUTMETHOD_KEY_KP_1                               = 0xFFB1,    /**< The Numpad 1 key */
+    INPUTMETHOD_KEY_KP_2                               = 0xFFB2,    /**< The Numpad 2 key */
+    INPUTMETHOD_KEY_KP_3                               = 0xFFB3,    /**< The Numpad 3 key */
+    INPUTMETHOD_KEY_KP_4                               = 0xFFB4,    /**< The Numpad 4 key */
+    INPUTMETHOD_KEY_KP_5                               = 0xFFB5,    /**< The Numpad 5 key */
+    INPUTMETHOD_KEY_KP_6                               = 0xFFB6,    /**< The Numpad 6 key */
+    INPUTMETHOD_KEY_KP_7                               = 0xFFB7,    /**< The Numpad 7 key */
+    INPUTMETHOD_KEY_KP_8                               = 0xFFB8,    /**< The Numpad 8 key */
+    INPUTMETHOD_KEY_KP_9                               = 0xFFB9,    /**< The Numpad 9 key */
 
     /* 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,
+    INPUTMETHOD_KEY_F1                                 = 0xFFBE,    /**< The function 1 key */
+    INPUTMETHOD_KEY_F2                                 = 0xFFBF,    /**< The function 2 key */
+    INPUTMETHOD_KEY_F3                                 = 0xFFC0,    /**< The function 3 key */
+    INPUTMETHOD_KEY_F4                                 = 0xFFC1,    /**< The function 4 key */
+    INPUTMETHOD_KEY_F5                                 = 0xFFC2,    /**< The function 5 key */
+    INPUTMETHOD_KEY_F6                                 = 0xFFC3,    /**< The function 6 key */
+    INPUTMETHOD_KEY_F7                                 = 0xFFC4,    /**< The function 7 key */
+    INPUTMETHOD_KEY_F8                                 = 0xFFC5,    /**< The function 8 key */
+    INPUTMETHOD_KEY_F9                                 = 0xFFC6,    /**< The function 9 key */
+    INPUTMETHOD_KEY_F10                                = 0xFFC7,    /**< The function 10 key */
+    INPUTMETHOD_KEY_F11                                = 0xFFC8,    /**< The function 11 key */
+    INPUTMETHOD_KEY_F12                                = 0xFFC9,    /**< The function 12 key */
+    INPUTMETHOD_KEY_F13                                = 0xFFCA,    /**< The function 13 key */
+    INPUTMETHOD_KEY_F14                                = 0xFFCB,    /**< The function 14 key */
+    INPUTMETHOD_KEY_F15                                = 0xFFCC,    /**< The function 15 key */
+    INPUTMETHOD_KEY_F16                                = 0xFFCD,    /**< The function 16 key */
+    INPUTMETHOD_KEY_F17                                = 0xFFCE,    /**< The function 17 key */
+    INPUTMETHOD_KEY_F18                                = 0xFFCF,    /**< The function 18 key */
+    INPUTMETHOD_KEY_F19                                = 0xFFD0,    /**< The function 19 key */
+    INPUTMETHOD_KEY_F20                                = 0xFFD1,    /**< The function 20 key */
+    INPUTMETHOD_KEY_F21                                = 0xFFD2,    /**< The function 21 key */
+    INPUTMETHOD_KEY_F22                                = 0xFFD3,    /**< The function 22 key */
+    INPUTMETHOD_KEY_F23                                = 0xFFD4,    /**< The function 23 key */
+    INPUTMETHOD_KEY_F24                                = 0xFFD5,    /**< The function 24 key */
+    INPUTMETHOD_KEY_F25                                = 0xFFD6,    /**< The function 25 key */
+    INPUTMETHOD_KEY_F26                                = 0xFFD7,    /**< The function 26 key */
+    INPUTMETHOD_KEY_F27                                = 0xFFD8,    /**< The function 27 key */
+    INPUTMETHOD_KEY_F28                                = 0xFFD9,    /**< The function 28 key */
+    INPUTMETHOD_KEY_F29                                = 0xFFDA,    /**< The function 29 key */
+    INPUTMETHOD_KEY_F30                                = 0xFFDB,    /**< The function 30 key */
+    INPUTMETHOD_KEY_F31                                = 0xFFDC,    /**< The function 31 key */
+    INPUTMETHOD_KEY_F32                                = 0xFFDD,    /**< The function 32 key */
+    INPUTMETHOD_KEY_F33                                = 0xFFDE,    /**< The function 33 key */
+    INPUTMETHOD_KEY_F34                                = 0xFFDF,    /**< The function 34 key */
+    INPUTMETHOD_KEY_F35                                = 0xFFE0,    /**< The function 35 key */
+
+    /* Modifier keys */
+    INPUTMETHOD_KEY_Shift_L                            = 0xFFE1,    /**< The left shift key */
+    INPUTMETHOD_KEY_Shift_R                            = 0xFFE2,    /**< The right shift key */
+    INPUTMETHOD_KEY_Control_L                          = 0xFFE3,    /**< The left control key */
+    INPUTMETHOD_KEY_Control_R                          = 0xFFE4,    /**< The right control key */
+    INPUTMETHOD_KEY_Caps_Lock                          = 0xFFE5,    /**< The caps lock key */
+    INPUTMETHOD_KEY_Shift_Lock                         = 0xFFE6,    /**< The shift lock key */
+
+    INPUTMETHOD_KEY_Meta_L                             = 0xFFE7,    /**< The left meta key */
+    INPUTMETHOD_KEY_Meta_R                             = 0xFFE8,    /**< The right meta key */
+    INPUTMETHOD_KEY_Alt_L                              = 0xFFE9,    /**< The left alt key */
+    INPUTMETHOD_KEY_Alt_R                              = 0xFFEA,    /**< The right alt key */
+    INPUTMETHOD_KEY_Super_L                            = 0xFFEB,    /**< The left super key */
+    INPUTMETHOD_KEY_Super_R                            = 0xFFEC,    /**< The right super key */
+    INPUTMETHOD_KEY_Hyper_L                            = 0xFFED,    /**< The left hyper key */
+    INPUTMETHOD_KEY_Hyper_R                            = 0xFFEE,    /**< The right hyper key */
 
     /* 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_space                              = 0x020,    /**< The space key */
+    INPUTMETHOD_KEY_exclam                             = 0x021,    /**< The exclamation key */
+    INPUTMETHOD_KEY_quotedbl                           = 0x022,    /**< The quotedbl key */
+    INPUTMETHOD_KEY_numbersign                         = 0x023,    /**< The number sign key */
+    INPUTMETHOD_KEY_dollar                             = 0x024,    /**< The dollar key */
+    INPUTMETHOD_KEY_percent                            = 0x025,    /**< The percent key */
+    INPUTMETHOD_KEY_ampersand                          = 0x026,    /**< The ampersand key */
+    INPUTMETHOD_KEY_apostrophe                         = 0x027,    /**< The apostrophe key */
+    INPUTMETHOD_KEY_parenleft                          = 0x028,    /**< The parenleft key */
+    INPUTMETHOD_KEY_parenright                         = 0x029,    /**< The parenright key */
+    INPUTMETHOD_KEY_asterisk                           = 0x02a,    /**< The asterisk key */
+    INPUTMETHOD_KEY_plus                               = 0x02b,    /**< The plus key */
+    INPUTMETHOD_KEY_comma                              = 0x02c,    /**< The comma key */
+    INPUTMETHOD_KEY_minus                              = 0x02d,    /**< The minus key */
+    INPUTMETHOD_KEY_period                             = 0x02e,    /**< The period key */
+    INPUTMETHOD_KEY_slash                              = 0x02f,    /**< The slash key */
+    INPUTMETHOD_KEY_0                                  = 0x030,    /**< The 0 key */
+    INPUTMETHOD_KEY_1                                  = 0x031,    /**< The 1 key */
+    INPUTMETHOD_KEY_2                                  = 0x032,    /**< The 2 key */
+    INPUTMETHOD_KEY_3                                  = 0x033,    /**< The 3 key */
+    INPUTMETHOD_KEY_4                                  = 0x034,    /**< The 4 key */
+    INPUTMETHOD_KEY_5                                  = 0x035,    /**< The 5 key */
+    INPUTMETHOD_KEY_6                                  = 0x036,    /**< The 6 key */
+    INPUTMETHOD_KEY_7                                  = 0x037,    /**< The 7 key */
+    INPUTMETHOD_KEY_8                                  = 0x038,    /**< The 8 key */
+    INPUTMETHOD_KEY_9                                  = 0x039,    /**< The 9 key */
+    INPUTMETHOD_KEY_colon                              = 0x03a,    /**< The colon key */
+    INPUTMETHOD_KEY_semicolon                          = 0x03b,    /**< The semicolon key */
+    INPUTMETHOD_KEY_less                               = 0x03c,    /**< The less key */
+    INPUTMETHOD_KEY_equal                              = 0x03d,    /**< The equal key */
+    INPUTMETHOD_KEY_greater                            = 0x03e,    /**< The greater key */
+    INPUTMETHOD_KEY_question                           = 0x03f,    /**< The question key */
+    INPUTMETHOD_KEY_at                                 = 0x040,    /**< The  key */
+    INPUTMETHOD_KEY_A                                  = 0x041,    /**< The A key */
+    INPUTMETHOD_KEY_B                                  = 0x042,    /**< The B key */
+    INPUTMETHOD_KEY_C                                  = 0x043,    /**< The C key */
+    INPUTMETHOD_KEY_D                                  = 0x044,    /**< The D key */
+    INPUTMETHOD_KEY_E                                  = 0x045,    /**< The E key */
+    INPUTMETHOD_KEY_F                                  = 0x046,    /**< The F key */
+    INPUTMETHOD_KEY_G                                  = 0x047,    /**< The G key */
+    INPUTMETHOD_KEY_H                                  = 0x048,    /**< The H key */
+    INPUTMETHOD_KEY_I                                  = 0x049,    /**< The I key */
+    INPUTMETHOD_KEY_J                                  = 0x04a,    /**< The J key */
+    INPUTMETHOD_KEY_K                                  = 0x04b,    /**< The K key */
+    INPUTMETHOD_KEY_L                                  = 0x04c,    /**< The L key */
+    INPUTMETHOD_KEY_M                                  = 0x04d,    /**< The M key */
+    INPUTMETHOD_KEY_N                                  = 0x04e,    /**< The N key */
+    INPUTMETHOD_KEY_O                                  = 0x04f,    /**< The O key */
+    INPUTMETHOD_KEY_P                                  = 0x050,    /**< The P key */
+    INPUTMETHOD_KEY_Q                                  = 0x051,    /**< The Q key */
+    INPUTMETHOD_KEY_R                                  = 0x052,    /**< The R key */
+    INPUTMETHOD_KEY_S                                  = 0x053,    /**< The S key */
+    INPUTMETHOD_KEY_T                                  = 0x054,    /**< The T key */
+    INPUTMETHOD_KEY_U                                  = 0x055,    /**< The U key */
+    INPUTMETHOD_KEY_V                                  = 0x056,    /**< The V key */
+    INPUTMETHOD_KEY_W                                  = 0x057,    /**< The W key */
+    INPUTMETHOD_KEY_X                                  = 0x058,    /**< The X key */
+    INPUTMETHOD_KEY_Y                                  = 0x059,    /**< The Y key */
+    INPUTMETHOD_KEY_Z                                  = 0x05a,    /**< The Z key */
+    INPUTMETHOD_KEY_bracketleft                        = 0x05b,    /**< The left bracket key */
+    INPUTMETHOD_KEY_backslash                          = 0x05c,    /**< The backslash key */
+    INPUTMETHOD_KEY_bracketright                       = 0x05d,    /**< The right bracket key */
+    INPUTMETHOD_KEY_asciicircum                        = 0x05e,    /**< The circumflex key */
+    INPUTMETHOD_KEY_underscore                         = 0x05f,    /**< The underscore key */
+    INPUTMETHOD_KEY_grave                              = 0x060,    /**< The grave key */
+    INPUTMETHOD_KEY_a                                  = 0x061,    /**< The a key */
+    INPUTMETHOD_KEY_b                                  = 0x062,    /**< The b key */
+    INPUTMETHOD_KEY_c                                  = 0x063,    /**< The c key */
+    INPUTMETHOD_KEY_d                                  = 0x064,    /**< The d key */
+    INPUTMETHOD_KEY_e                                  = 0x065,    /**< The e key */
+    INPUTMETHOD_KEY_f                                  = 0x066,    /**< The f key */
+    INPUTMETHOD_KEY_g                                  = 0x067,    /**< The g key */
+    INPUTMETHOD_KEY_h                                  = 0x068,    /**< The h key */
+    INPUTMETHOD_KEY_i                                  = 0x069,    /**< The i key */
+    INPUTMETHOD_KEY_j                                  = 0x06a,    /**< The j key */
+    INPUTMETHOD_KEY_k                                  = 0x06b,    /**< The k key */
+    INPUTMETHOD_KEY_l                                  = 0x06c,    /**< The l key */
+    INPUTMETHOD_KEY_m                                  = 0x06d,    /**< The m key */
+    INPUTMETHOD_KEY_n                                  = 0x06e,    /**< The n key */
+    INPUTMETHOD_KEY_o                                  = 0x06f,    /**< The o key */
+    INPUTMETHOD_KEY_p                                  = 0x070,    /**< The p key */
+    INPUTMETHOD_KEY_q                                  = 0x071,    /**< The q key */
+    INPUTMETHOD_KEY_r                                  = 0x072,    /**< The r key */
+    INPUTMETHOD_KEY_s                                  = 0x073,    /**< The s key */
+    INPUTMETHOD_KEY_t                                  = 0x074,    /**< The t key */
+    INPUTMETHOD_KEY_u                                  = 0x075,    /**< The u key */
+    INPUTMETHOD_KEY_v                                  = 0x076,    /**< The v key */
+    INPUTMETHOD_KEY_w                                  = 0x077,    /**< The w key */
+    INPUTMETHOD_KEY_x                                  = 0x078,    /**< The x key */
+    INPUTMETHOD_KEY_y                                  = 0x079,    /**< The y key */
+    INPUTMETHOD_KEY_z                                  = 0x07a,    /**< The z key */
+    INPUTMETHOD_KEY_braceleft                          = 0x07b,    /**< The left brace key */
+    INPUTMETHOD_KEY_bar                                = 0x07c,    /**< The bar key */
+    INPUTMETHOD_KEY_braceright                         = 0x07d,    /**< The right brace key */
+    INPUTMETHOD_KEY_asciitilde                         = 0x07e,    /**< The tilde key */
 } inputmethod_key_code_e;
 
 /**
@@ -1839,14 +275,17 @@ typedef enum
  */
 typedef enum
 {
-    INPUTMETHOD_KEY_MASK_NONE = 0,
-    INPUTMETHOD_KEY_MASK_SHIFT = (1<<0),
-    INPUTMETHOD_KEY_MASK_RELEASE = (1<<15),
+    INPUTMETHOD_KEY_MASK_PRESSED = 0,       /**< The key is pressed */
+    INPUTMETHOD_KEY_MASK_SHIFT = (1<<0),    /**< The Shift key is pressed */
+    INPUTMETHOD_KEY_MASK_CONTROL = (1<<2),  /**< The Control key is pressed */
+    INPUTMETHOD_KEY_MASK_ALT = (1<<3),      /**< The Alt key is pressed */
+    INPUTMETHOD_KEY_MASK_WIN = (1<<5),      /**< The Win (between Control and Alt) is pressed */
+    INPUTMETHOD_KEY_MASK_RELEASED = (1<<15) /**< The key is released */
 } inputmethod_key_mask_e;
 
 /**
  * @}
  */
 
-#endif // __TIZEN_UI_INPUTMETHOD_KEYDEF_H__
+#endif // __TIZEN_UIX_INPUTMETHOD_KEYDEF_H__
 
diff --git a/include/inputmethod_private.h b/include/inputmethod_private.h
new file mode 100644 (file)
index 0000000..8f8cfaf
--- /dev/null
@@ -0,0 +1,38 @@
+/*
+ * 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_UIX_INPUTMETHOD_PRIVATE_H__
+#define __TIZEN_UIX_INPUTMETHOD_PRIVATE_H__
+
+struct _inputmethod_context
+{
+    Ecore_IMF_Input_Panel_Layout layout;    /**< Input panel (keyboard) layout types */
+    int layout_variation;                   /**< Layout variation */
+    int cursor_pos;                         /**< Cursor position in edit field */
+    Ecore_IMF_Autocapital_Type autocapital_type;    /**< Auto capital mode */
+    Ecore_IMF_Input_Panel_Return_Key_Type return_key_type;  /**< "Return" key types */
+    Eina_Bool return_key_disabled;          /**< The state of "Return" key */
+    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 */
+};
+
+#endif // __TIZEN_UIX_INPUTMETHOD_PRIVATE_H__
+
old mode 100755 (executable)
new mode 100644 (file)
index 4d29dff..491dd39 100644 (file)
  * limitations under the License.
  */
 
-
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include <dlog.h>
 #include <sclcore.h>
+#include "inputmethod_private.h"
 #include <inputmethod.h>
 
 #ifdef LOG_TAG
@@ -29,9 +29,6 @@
 
 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();
@@ -58,83 +55,133 @@ class CCoreEventCallback : public ISCLCoreEventCallback
     void on_destroy_option_window(sclwindow window);
 };
 
+typedef struct
+{
+    inputmethod_focus_in_cb focus_in;   /**< Called when an edit field has focus */
+    inputmethod_focus_out_cb focus_out; /**< Called when an edit field loses focus */
+    inputmethod_surrounding_text_updated_cb surrounding_text_updated;   /**< Called when an edit field responds to a request with the surrounding text */
+    inputmethod_input_context_reset_cb input_context_reset;             /**< Called to reset the input context of an edit field */
+    inputmethod_cursor_position_updated_cb cursor_position_updated;     /**< Called when the position of the cursor in an edit field changes */
+    inputmethod_language_requested_cb language_requested;   /**< Called when an edit field requests for the language of the input panel */
+    inputmethod_language_set_cb language_set;   /**< Called to set the preferred language to the input panel */
+    inputmethod_imdata_set_cb imdata_set;       /**< Called to set the application specific data to deliver to the input panel */
+    inputmethod_layout_set_cb layout_set;       /**< Called when an edit field requests the input panel to set its layout */
+    inputmethod_return_key_type_set_cb return_key_type_set;     /**< Called when an edit field requests the input panel to set the "return" key label */
+    inputmethod_return_key_state_set_cb return_key_state_set;   /**< Called when an edit field requests the input panel to enable or disable the "return" key state. */
+    inputmethod_geometry_requested_cb geometry_requested;       /**< Called when an edit field requests for the position and size of the input panel */
+    inputmethod_display_language_changed_cb display_language_changed;   /**< Called when the system display language is changed */
+    inputmethod_rotation_degree_changed_cb rotation_degree_changed;     /**< Called when the device is rotated */
+    inputmethod_accessibility_state_changed_cb accessibility_state_changed; /**< Called when Accessibility in Settings application is on or off */
+    inputmethod_option_window_created_cb option_window_created;     /**< Called to create the option window */
+    inputmethod_option_window_destroyed_cb option_window_destroyed; /**< Called to destroy the option window */
+    void *focus_in_user_data;
+    void *focus_out_user_data;
+    void *surrounding_text_updated_user_data;
+    void *input_context_reset_user_data;
+    void *cursor_position_updated_user_data;
+    void *language_requested_user_data;
+    void *language_set_user_data;
+    void *imdata_set_user_data;
+    void *layout_set_user_data;
+    void *return_key_type_set_user_data;
+    void *return_key_state_set_user_data;
+    void *geometry_requested_user_data;
+    void *display_language_changed_user_data;
+    void *rotation_degree_changed_user_data;
+    void *accessibility_state_changed_user_data;
+    void *option_window_created_user_data;
+    void *option_window_destroyed_user_data;
+} inputmethod_event_callback_s;
+
+static inputmethod_callback_s g_basic_callback = {NULL};
+static inputmethod_event_callback_s g_event_callback = {NULL};
+static void *g_user_data = NULL;
+static bool g_running = false;
+
 static CCoreEventCallback g_core_event_callback;
 CSCLCore g_core(&g_core_event_callback);
 
+extern "C" {
+    extern void inputmethod_app_main(int argc, char **argv);
+}
+
 void CCoreEventCallback::on_init()
 {
-    if (g_inputmethod_primitive_callback.create) {
-        g_inputmethod_primitive_callback.create();
+    if (g_basic_callback.create) {
+        g_basic_callback.create(g_user_data);
     }
 }
 
 void CCoreEventCallback::on_run(int argc, char **argv)
 {
-    LOGD ("on_run\n");
-    inputmethod_efl_main(argc, argv);
+    LOGD ("on_run");
+    inputmethod_app_main(argc, argv);
 }
 
 void CCoreEventCallback::on_exit()
 {
-    if (g_inputmethod_primitive_callback.terminate) {
-        g_inputmethod_primitive_callback.terminate();
+    LOGD ("on_exit");
+    if (g_basic_callback.terminate) {
+        g_basic_callback.terminate(g_user_data);
     }
 }
 
 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);
+    if (g_event_callback.cursor_position_updated) {
+        g_event_callback.cursor_position_updated(cursor_pos, g_event_callback.cursor_position_updated_user_data);
     }
 }
 
 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);
+    if (g_event_callback.surrounding_text_updated) {
+        g_event_callback.surrounding_text_updated(ic, text, cursor, g_event_callback.surrounding_text_updated_user_data);
     }
 }
 
 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);
+    if (g_event_callback.focus_out) {
+        g_event_callback.focus_out(ic, g_event_callback.focus_out_user_data);
     }
 }
 
 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);
+    if (g_event_callback.focus_in) {
+        g_event_callback.focus_in(ic, g_event_callback.focus_in_user_data);
     }
 }
 
 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);
+    if (g_basic_callback.show) {
+        struct _inputmethod_context input_context;
+
+        memset(&input_context, 0, sizeof(struct _inputmethod_context));
+        input_context.layout = context.layout;
+        input_context.layout_variation = context.layout_variation;
+        input_context.cursor_pos = context.cursor_pos;
+        input_context.autocapital_type = context.autocapital_type;
+        input_context.return_key_type = context.return_key_type;
+        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.imdata_size = context.imdata_size;
+        input_context.input_hint = context.input_hint;
+        input_context.bidi_direction = context.bidi_direction;
+        input_context.language = context.language;
+        input_context.client_window = context.client_window;
+
+        g_basic_callback.show(ic, (inputmethod_context_h)&input_context, g_user_data);
     }
 }
 
 void CCoreEventCallback::on_ise_hide(sclint ic, const sclchar *ic_uuid)
 {
-    if (g_inputmethod_primitive_callback.hide) {
-        g_inputmethod_primitive_callback.hide(ic);
+    if (g_basic_callback.hide) {
+        g_basic_callback.hide(ic, g_user_data);
     }
 }
 
@@ -145,8 +192,8 @@ void CCoreEventCallback::on_get_geometry(sclu32 *pos_x, sclu32 *pos_y, sclu32 *w
     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 (g_event_callback.geometry_requested) {
+        g_event_callback.geometry_requested(g_event_callback.geometry_requested_user_data, &geometry_pos_x, &geometry_pos_y, &geometry_width, &geometry_height);
     }
 
     if (pos_x)
@@ -164,157 +211,467 @@ void CCoreEventCallback::on_get_geometry(sclu32 *pos_x, sclu32 *pos_y, sclu32 *w
 
 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);
+    if (g_event_callback.language_set) {
+        g_event_callback.language_set(language, g_event_callback.language_set_user_data);
     }
 }
 
 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);
+    if (g_event_callback.imdata_set) {
+        g_event_callback.imdata_set((void *)buf, len, g_event_callback.imdata_set_user_data);
     }
 }
 
 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);
+    if (g_event_callback.language_requested) {
+        g_event_callback.language_requested(g_event_callback.language_requested_user_data, 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);
+    if (g_event_callback.return_key_type_set) {
+        g_event_callback.return_key_type_set(type, g_event_callback.return_key_type_set_user_data);
     }
 }
 
 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);
+    if (g_event_callback.return_key_state_set) {
+        g_event_callback.return_key_state_set(disabled, g_event_callback.return_key_state_set_user_data);
     }
 }
 
 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);
+    if (g_event_callback.layout_set) {
+        g_event_callback.layout_set(layout, g_event_callback.layout_set_user_data);
     }
 }
 
 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();
+    if (g_event_callback.input_context_reset) {
+        g_event_callback.input_context_reset(g_event_callback.input_context_reset_user_data);
     }
 }
 
 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);
+    if (g_event_callback.display_language_changed) {
+        g_event_callback.display_language_changed(language, g_event_callback.display_language_changed_user_data);
     }
 }
 
 void CCoreEventCallback::on_set_rotation_degree(sclint degree)
 {
-    if (g_inputmethod_extended_callback.set_rotation_degree) {
-        g_inputmethod_extended_callback.set_rotation_degree(degree);
+    if (g_event_callback.rotation_degree_changed) {
+        g_event_callback.rotation_degree_changed(degree, g_event_callback.rotation_degree_changed_user_data);
     }
 }
 
 void CCoreEventCallback::on_set_accessibility_state(sclboolean state)
 {
-    if (g_inputmethod_extended_callback.set_accessibility_state) {
-        g_inputmethod_extended_callback.set_accessibility_state(state);
+    if (g_event_callback.accessibility_state_changed) {
+        g_event_callback.accessibility_state_changed(state, g_event_callback.accessibility_state_changed_user_data);
     }
 }
 
 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);
+    if (g_event_callback.option_window_created) {
+        g_event_callback.option_window_created(static_cast<Evas_Object*>(window), (inputmethod_option_window_type_e)type, g_event_callback.option_window_created_user_data);
     }
 }
 
 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));
+    if (g_event_callback.option_window_destroyed) {
+        g_event_callback.option_window_destroyed(static_cast<Evas_Object*>(window), g_event_callback.option_window_destroyed_user_data);
     }
 }
 
-void inputmethod_set_primitive_cb(inputmethod_primitive_callback_s callback)
+int inputmethod_run(inputmethod_callback_s *basic_cb, void *user_data)
 {
-    g_inputmethod_primitive_callback = callback;
+    if (g_running) {
+        LOGE("inputmethod main loop is already running.");
+        return INPUTMETHOD_ERROR_OPERATION_FAILED;
+    }
+
+    if (!basic_cb) {
+        LOGE("basic callbacks pointer is null.");
+        return INPUTMETHOD_ERROR_INVALID_PARAMETER;
+    }
+
+    g_basic_callback = *basic_cb;
+
+    if (!g_basic_callback.create || !g_basic_callback.terminate ||
+        !g_basic_callback.show || !g_basic_callback.hide) {
+        LOGE("mandatory callback funtions are not set");
+        memset(&g_basic_callback, 0, sizeof(inputmethod_callback_s));
+        memset(&g_event_callback, 0, sizeof(inputmethod_event_callback_s));
+        return INPUTMETHOD_ERROR_NO_CALLBACK_FUNCTION;
+    }
+
+    g_user_data = user_data;
+    g_running = true;
+
+    g_core.run();
+
+    memset(&g_basic_callback, 0, sizeof(inputmethod_callback_s));
+    memset(&g_event_callback, 0, sizeof(inputmethod_event_callback_s));
+    g_user_data = NULL;
+    g_running = false;
+
+    return INPUTMETHOD_ERROR_NONE;
 }
 
-void inputmethod_unset_primitive_cb(void)
+int inputmethod_event_set_focus_in_cb(inputmethod_focus_in_cb callback_func, void *user_data)
 {
-    memset(&g_inputmethod_primitive_callback, 0x00, sizeof(g_inputmethod_primitive_callback));
+    if (!callback_func)
+        return INPUTMETHOD_ERROR_INVALID_PARAMETER;
+
+    if (g_running)
+        return INPUTMETHOD_ERROR_OPERATION_FAILED;
+
+    g_event_callback.focus_in = callback_func;
+    g_event_callback.focus_in_user_data = user_data;
+
+    return INPUTMETHOD_ERROR_NONE;
 }
 
-void inputmethod_set_extended_cb(inputmethod_extended_callback_s callback)
+int inputmethod_event_set_focus_out_cb(inputmethod_focus_out_cb callback_func, void *user_data)
 {
-    g_inputmethod_extended_callback = callback;
+    if (!callback_func)
+        return INPUTMETHOD_ERROR_INVALID_PARAMETER;
+
+    if (g_running)
+        return INPUTMETHOD_ERROR_OPERATION_FAILED;
+
+    g_event_callback.focus_out = callback_func;
+    g_event_callback.focus_out_user_data = user_data;
+
+    return INPUTMETHOD_ERROR_NONE;
 }
 
-void inputmethod_unset_extended_cb(void)
+int inputmethod_event_set_surrounding_text_updated_cb(inputmethod_surrounding_text_updated_cb callback_func, void *user_data)
 {
-    memset(&g_inputmethod_extended_callback, 0x00, sizeof(g_inputmethod_extended_callback));
+    if (!callback_func)
+        return INPUTMETHOD_ERROR_INVALID_PARAMETER;
+
+    if (g_running)
+        return INPUTMETHOD_ERROR_OPERATION_FAILED;
+
+    g_event_callback.surrounding_text_updated = callback_func;
+    g_event_callback.surrounding_text_updated_user_data = user_data;
+
+    return INPUTMETHOD_ERROR_NONE;
 }
 
-void inputmethod_run(void)
+int inputmethod_event_set_input_context_reset_cb(inputmethod_input_context_reset_cb callback_func, void *user_data)
 {
-    g_core.run();
+    if (!callback_func)
+        return INPUTMETHOD_ERROR_INVALID_PARAMETER;
+
+    if (g_running)
+        return INPUTMETHOD_ERROR_OPERATION_FAILED;
+
+    g_event_callback.input_context_reset = callback_func;
+    g_event_callback.input_context_reset_user_data = user_data;
+
+    return INPUTMETHOD_ERROR_NONE;
+}
+
+int inputmethod_event_set_cursor_position_updated_cb(inputmethod_cursor_position_updated_cb callback_func, void *user_data)
+{
+    if (!callback_func)
+        return INPUTMETHOD_ERROR_INVALID_PARAMETER;
+
+    if (g_running)
+        return INPUTMETHOD_ERROR_OPERATION_FAILED;
+
+    g_event_callback.cursor_position_updated = callback_func;
+    g_event_callback.cursor_position_updated_user_data = user_data;
+
+    return INPUTMETHOD_ERROR_NONE;
+}
+
+int inputmethod_event_set_language_requested_cb(inputmethod_language_requested_cb callback_func, void *user_data)
+{
+    if (!callback_func)
+        return INPUTMETHOD_ERROR_INVALID_PARAMETER;
+
+    if (g_running)
+        return INPUTMETHOD_ERROR_OPERATION_FAILED;
+
+    g_event_callback.language_requested = callback_func;
+    g_event_callback.language_requested_user_data = user_data;
+
+    return INPUTMETHOD_ERROR_NONE;
+}
+
+int inputmethod_event_set_language_set_cb(inputmethod_language_set_cb callback_func, void *user_data)
+{
+    if (!callback_func)
+        return INPUTMETHOD_ERROR_INVALID_PARAMETER;
+
+    if (g_running)
+        return INPUTMETHOD_ERROR_OPERATION_FAILED;
+
+    g_event_callback.language_set = callback_func;
+    g_event_callback.language_set_user_data = user_data;
+
+    return INPUTMETHOD_ERROR_NONE;
+}
+
+int inputmethod_event_set_imdata_set_cb(inputmethod_imdata_set_cb callback_func, void *user_data)
+{
+    if (!callback_func)
+        return INPUTMETHOD_ERROR_INVALID_PARAMETER;
+
+    if (g_running)
+        return INPUTMETHOD_ERROR_OPERATION_FAILED;
+
+    g_event_callback.imdata_set = callback_func;
+    g_event_callback.imdata_set_user_data = user_data;
+
+    return INPUTMETHOD_ERROR_NONE;
+}
+
+int inputmethod_event_set_layout_set_cb(inputmethod_layout_set_cb callback_func, void *user_data)
+{
+    if (!callback_func)
+        return INPUTMETHOD_ERROR_INVALID_PARAMETER;
+
+    if (g_running)
+        return INPUTMETHOD_ERROR_OPERATION_FAILED;
+
+    g_event_callback.layout_set = callback_func;
+    g_event_callback.layout_set_user_data = user_data;
+
+    return INPUTMETHOD_ERROR_NONE;
+}
+
+int inputmethod_event_set_return_key_type_set_cb(inputmethod_return_key_type_set_cb callback_func, void *user_data)
+{
+    if (!callback_func)
+        return INPUTMETHOD_ERROR_INVALID_PARAMETER;
+
+    if (g_running)
+        return INPUTMETHOD_ERROR_OPERATION_FAILED;
+
+    g_event_callback.return_key_type_set = callback_func;
+    g_event_callback.return_key_type_set_user_data = user_data;
+
+    return INPUTMETHOD_ERROR_NONE;
+}
+
+int inputmethod_event_set_return_key_state_set_cb(inputmethod_return_key_state_set_cb callback_func, void *user_data)
+{
+    if (!callback_func)
+        return INPUTMETHOD_ERROR_INVALID_PARAMETER;
+
+    if (g_running)
+        return INPUTMETHOD_ERROR_OPERATION_FAILED;
+
+    g_event_callback.return_key_state_set = callback_func;
+    g_event_callback.return_key_state_set_user_data = user_data;
+
+    return INPUTMETHOD_ERROR_NONE;
+}
+
+int inputmethod_event_set_geometry_requested_cb(inputmethod_geometry_requested_cb callback_func, void *user_data)
+{
+    if (!callback_func)
+        return INPUTMETHOD_ERROR_INVALID_PARAMETER;
+
+    if (g_running)
+        return INPUTMETHOD_ERROR_OPERATION_FAILED;
+
+    g_event_callback.geometry_requested = callback_func;
+    g_event_callback.geometry_requested_user_data = user_data;
+
+    return INPUTMETHOD_ERROR_NONE;
+}
+
+int inputmethod_event_set_display_language_changed_cb(inputmethod_display_language_changed_cb callback_func, void *user_data)
+{
+    if (!callback_func)
+        return INPUTMETHOD_ERROR_INVALID_PARAMETER;
+
+    if (g_running)
+        return INPUTMETHOD_ERROR_OPERATION_FAILED;
+
+    g_event_callback.display_language_changed = callback_func;
+    g_event_callback.display_language_changed_user_data = user_data;
+
+    return INPUTMETHOD_ERROR_NONE;
+}
+
+int inputmethod_event_set_rotation_degree_changed_cb(inputmethod_rotation_degree_changed_cb callback_func, void *user_data)
+{
+    if (!callback_func)
+        return INPUTMETHOD_ERROR_INVALID_PARAMETER;
+
+    if (g_running)
+        return INPUTMETHOD_ERROR_OPERATION_FAILED;
+
+    g_event_callback.rotation_degree_changed = callback_func;
+    g_event_callback.rotation_degree_changed_user_data = user_data;
+
+    return INPUTMETHOD_ERROR_NONE;
+}
+
+int inputmethod_event_set_accessibility_state_changed_cb(inputmethod_accessibility_state_changed_cb callback_func, void *user_data)
+{
+    if (!callback_func)
+        return INPUTMETHOD_ERROR_INVALID_PARAMETER;
+
+    if (g_running)
+        return INPUTMETHOD_ERROR_OPERATION_FAILED;
+
+    g_event_callback.accessibility_state_changed = callback_func;
+    g_event_callback.accessibility_state_changed_user_data = user_data;
+
+    return INPUTMETHOD_ERROR_NONE;
+}
+
+int inputmethod_event_set_option_window_created_cb(inputmethod_option_window_created_cb callback_func, void *user_data)
+{
+    if (!callback_func)
+        return INPUTMETHOD_ERROR_INVALID_PARAMETER;
+
+    if (g_running)
+        return INPUTMETHOD_ERROR_OPERATION_FAILED;
+
+    g_event_callback.option_window_created = callback_func;
+    g_event_callback.option_window_created_user_data = user_data;
+
+    return INPUTMETHOD_ERROR_NONE;
+}
+
+int inputmethod_event_set_option_window_destroyed_cb(inputmethod_option_window_destroyed_cb callback_func, void *user_data)
+{
+    if (!callback_func)
+        return INPUTMETHOD_ERROR_INVALID_PARAMETER;
+
+    if (g_running)
+        return INPUTMETHOD_ERROR_OPERATION_FAILED;
+
+    g_event_callback.option_window_destroyed = callback_func;
+    g_event_callback.option_window_destroyed_user_data = user_data;
+
+    return INPUTMETHOD_ERROR_NONE;
 }
 
-void inputmethod_send_key_event(inputmethod_key_code_e keycode, inputmethod_key_mask_e keymask)
+int inputmethod_send_key_event(inputmethod_key_code_e keycode, inputmethod_key_mask_e keymask)
 {
+    if (!g_running)
+        return INPUTMETHOD_ERROR_NOT_RUNNING;
+
     g_core.forward_key_event(-1, NULL, (sclu32)keycode, (sclu16)keymask);
+
+    return TIZEN_ERROR_NONE;
 }
 
-void inputmethod_commit_string(const char *str)
+int inputmethod_commit_string(const char *str)
 {
+    if (!g_running)
+        return INPUTMETHOD_ERROR_NOT_RUNNING;
+
     g_core.commit_string(-1, NULL, str);
+
+    return TIZEN_ERROR_NONE;
 }
 
-void inputmethod_show_preedit_string(void)
+int inputmethod_show_preedit_string(void)
 {
+    if (!g_running)
+        return INPUTMETHOD_ERROR_NOT_RUNNING;
+
     g_core.show_preedit_string(-1, NULL);
+
+    return TIZEN_ERROR_NONE;
 }
 
-void inputmethod_hide_preedit_string(void)
+int inputmethod_hide_preedit_string(void)
 {
+    if (!g_running)
+        return INPUTMETHOD_ERROR_NOT_RUNNING;
+
     g_core.hide_preedit_string(-1, NULL);
+
+    return TIZEN_ERROR_NONE;
 }
 
-void inputmethod_update_preedit_string(const char *str)
+int inputmethod_update_preedit_string(const char *str)
 {
+    if (!g_running)
+        return INPUTMETHOD_ERROR_NOT_RUNNING;
+
+    if (!str)
+        return INPUTMETHOD_ERROR_INVALID_PARAMETER;
+
     g_core.update_preedit_string(-1, NULL, str);
+
+    return TIZEN_ERROR_NONE;
 }
 
-void inputmethod_get_surrounding_text(int maxlen_before, int maxlen_after)
+int inputmethod_request_surrounding_text(int maxlen_before, int maxlen_after)
 {
+    if (!g_running)
+        return INPUTMETHOD_ERROR_NOT_RUNNING;
+
+    if (!g_event_callback.surrounding_text_updated)
+        return INPUTMETHOD_ERROR_NO_CALLBACK_FUNCTION;
+
     g_core.get_surrounding_text(NULL, maxlen_before, maxlen_after);
+
+    return TIZEN_ERROR_NONE;
 }
 
-void inputmethod_delete_surrounding_text(int offset, int len)
+int inputmethod_delete_surrounding_text(int offset, int len)
 {
+    if (!g_running)
+        return INPUTMETHOD_ERROR_NOT_RUNNING;
+
+    if (len <= 0)
+        return INPUTMETHOD_ERROR_INVALID_PARAMETER;
+
     g_core.delete_surrounding_text(offset, len);
+
+    return TIZEN_ERROR_NONE;
 }
 
 Evas_Object* inputmethod_get_main_window(void)
 {
-    return static_cast<Evas_Object*>(g_core.get_main_window());
+    Evas_Object *win = NULL;
+
+    if (!g_running) {
+        set_last_result(INPUTMETHOD_ERROR_NOT_RUNNING);
+        return NULL;
+    }
+
+    win = static_cast<Evas_Object*>(g_core.get_main_window());
+    if (win) {
+        set_last_result(INPUTMETHOD_ERROR_NONE);
+    }
+    else {
+        set_last_result(INPUTMETHOD_ERROR_OPERATION_FAILED);
+    }
+
+    return win;
 }
 
-void inputmethod_set_size_hints(int portrait_width, int portrait_height, int landscape_width, int landscape_height)
+int inputmethod_set_size(int portrait_width, int portrait_height, int landscape_width, int landscape_height)
 {
     SclSize portrait_size, landscape_size;
 
+    if (!g_running)
+        return INPUTMETHOD_ERROR_NOT_RUNNING;
+
     portrait_size.width = portrait_width;
     portrait_size.height = portrait_height;
 
@@ -322,14 +679,186 @@ void inputmethod_set_size_hints(int portrait_width, int portrait_height, int lan
     landscape_size.height = landscape_height;
 
     g_core.set_keyboard_size_hints(portrait_size, landscape_size);
+
+    return TIZEN_ERROR_NONE;
 }
 
-Evas_Object* inputmethod_create_option_window(void)
+int inputmethod_create_option_window(void)
 {
-    return static_cast<Evas_Object*>(g_core.create_option_window());
+    if (!g_running)
+        return INPUTMETHOD_ERROR_NOT_RUNNING;
+
+    if (!g_event_callback.option_window_created || !g_event_callback.option_window_destroyed) {
+        LOGW("inputmethod_create_option_window_cb() and inputmethod_destroy_option_window_cb() callback functions are not set.");
+        return INPUTMETHOD_ERROR_NO_CALLBACK_FUNCTION;
+    }
+
+    if (g_core.create_option_window())
+        return INPUTMETHOD_ERROR_NONE;
+    else
+        return INPUTMETHOD_ERROR_OPERATION_FAILED;
 }
 
-void inputmethod_destroy_option_window(Evas_Object *window)
+int inputmethod_destroy_option_window(Evas_Object *window)
 {
+    if (!window) {
+        LOGW("Window pointer is null.");
+        return INPUTMETHOD_ERROR_INVALID_PARAMETER;
+    }
+
+    if (!g_running)
+        return INPUTMETHOD_ERROR_NOT_RUNNING;
+
+    if (!g_event_callback.option_window_created || !g_event_callback.option_window_destroyed) {
+        LOGW("inputmethod_create_option_window_cb() and inputmethod_destroy_option_window_cb() callback functions are not set.");
+        return INPUTMETHOD_ERROR_NO_CALLBACK_FUNCTION;
+    }
+
     g_core.destroy_option_window(window);
+
+    return INPUTMETHOD_ERROR_NONE;
+}
+
+int inputmethod_context_get_layout(inputmethod_context_h context, Ecore_IMF_Input_Panel_Layout *layout)
+{
+    if (!context || !layout)
+        return INPUTMETHOD_ERROR_INVALID_PARAMETER;
+
+    if (!g_running)
+        return INPUTMETHOD_ERROR_NOT_RUNNING;
+
+    *layout = context->layout;
+
+    return INPUTMETHOD_ERROR_NONE;
+}
+
+int inputmethod_context_get_layout_variation(inputmethod_context_h context, inputmethod_layout_variation_e *layout_variation)
+{
+    if (!context || !layout_variation)
+        return INPUTMETHOD_ERROR_INVALID_PARAMETER;
+
+    if (!g_running)
+        return INPUTMETHOD_ERROR_NOT_RUNNING;
+
+    *layout_variation = static_cast<inputmethod_layout_variation_e>(context->layout_variation);
+
+    return INPUTMETHOD_ERROR_NONE;
+}
+
+int inputmethod_context_get_cursor_position(inputmethod_context_h context, int *cursor_pos)
+{
+    if (!context || !cursor_pos)
+        return INPUTMETHOD_ERROR_INVALID_PARAMETER;
+
+    if (!g_running)
+        return INPUTMETHOD_ERROR_NOT_RUNNING;
+
+    *cursor_pos = context->cursor_pos;
+
+    return INPUTMETHOD_ERROR_NONE;
+}
+
+int inputmethod_context_get_autocapital_type(inputmethod_context_h context, Ecore_IMF_Autocapital_Type *autocapital_type)
+{
+    if (!context || !autocapital_type)
+        return INPUTMETHOD_ERROR_INVALID_PARAMETER;
+
+    if (!g_running)
+        return INPUTMETHOD_ERROR_NOT_RUNNING;
+
+    *autocapital_type = context->autocapital_type;
+
+    return INPUTMETHOD_ERROR_NONE;
+}
+
+int inputmethod_context_get_return_key_type(inputmethod_context_h context, Ecore_IMF_Input_Panel_Return_Key_Type *return_key_type)
+{
+    if (!context || !return_key_type)
+        return INPUTMETHOD_ERROR_INVALID_PARAMETER;
+
+    if (!g_running)
+        return INPUTMETHOD_ERROR_NOT_RUNNING;
+
+    *return_key_type = context->return_key_type;
+
+    return INPUTMETHOD_ERROR_NONE;
+}
+
+int inputmethod_context_get_return_key_state(inputmethod_context_h context, bool *return_key_state)
+{
+    if (!context || !return_key_state)
+        return INPUTMETHOD_ERROR_INVALID_PARAMETER;
+
+    if (!g_running)
+        return INPUTMETHOD_ERROR_NOT_RUNNING;
+
+    *return_key_state = static_cast<bool>(context->return_key_disabled);
+
+    return INPUTMETHOD_ERROR_NONE;
+}
+
+int inputmethod_context_get_prediction_mode(inputmethod_context_h context, bool *prediction_mode)
+{
+    if (!context || !prediction_mode)
+        return INPUTMETHOD_ERROR_INVALID_PARAMETER;
+
+    if (!g_running)
+        return INPUTMETHOD_ERROR_NOT_RUNNING;
+
+    *prediction_mode = static_cast<bool>(context->prediction_allow);
+
+    return INPUTMETHOD_ERROR_NONE;
+}
+
+int inputmethod_context_get_password_mode(inputmethod_context_h context, bool *password_mode)
+{
+    if (!context || !password_mode)
+        return INPUTMETHOD_ERROR_INVALID_PARAMETER;
+
+    if (!g_running)
+        return INPUTMETHOD_ERROR_NOT_RUNNING;
+
+    *password_mode = static_cast<bool>(context->password_mode);
+
+    return INPUTMETHOD_ERROR_NONE;
+}
+
+int inputmethod_context_get_input_hint(inputmethod_context_h context, Ecore_IMF_Input_Hints *input_hint)
+{
+    if (!context || !input_hint)
+        return INPUTMETHOD_ERROR_INVALID_PARAMETER;
+
+    if (!g_running)
+        return INPUTMETHOD_ERROR_NOT_RUNNING;
+
+    *input_hint = context->input_hint;
+
+    return INPUTMETHOD_ERROR_NONE;
 }
+
+int inputmethod_context_get_bidi_direction(inputmethod_context_h context, Ecore_IMF_BiDi_Direction *bidi)
+{
+    if (!context || !bidi)
+        return INPUTMETHOD_ERROR_INVALID_PARAMETER;
+
+    if (!g_running)
+        return INPUTMETHOD_ERROR_NOT_RUNNING;
+
+    *bidi = context->bidi_direction;
+
+    return INPUTMETHOD_ERROR_NONE;
+}
+
+int inputmethod_context_get_language(inputmethod_context_h context, Ecore_IMF_Input_Panel_Lang *language)
+{
+    if (!context || !language)
+        return INPUTMETHOD_ERROR_INVALID_PARAMETER;
+
+    if (!g_running)
+        return INPUTMETHOD_ERROR_NOT_RUNNING;
+
+    *language = context->language;
+
+    return INPUTMETHOD_ERROR_NONE;
+}
+