/PreloadKeyboardIse = true
/LaunchIseOnRequest = false
/ChangeKeyboardModeByTouch = false
+/SupportHWKeyboardMode = false
static bool _on_the_spot = true;
static bool _shared_input_method = false;
static bool _change_keyboard_mode_by_touch = false;
+static bool _support_hw_keyboard_mode = false;
static double space_key_time = 0.0;
}
}
- if (!strcmp (ev->keyname, "XF86MenuKB")) {
+ if (_support_hw_keyboard_mode && !strcmp (ev->keyname, "XF86MenuKB")) {
if (ecore_imf_context_input_panel_state_get (active_ctx) == ECORE_IMF_INPUT_PANEL_STATE_SHOW) {
ecore_imf_context_input_panel_hide (active_ctx);
} else {
timestamp = ev->timestamp;
/* Hardware input detect code */
- if (ev->timestamp > 1 && get_keyboard_mode () == TOOLBAR_HELPER_MODE &&
+ if (ev->timestamp > 1 && get_keyboard_mode () == TOOLBAR_HELPER_MODE && _support_hw_keyboard_mode &&
scim_string_to_key (key, ev->key) &&
key.code != 0xFF69 /* Cancel (Power + Volume down) key */) {
isf_imf_context_set_keyboard_mode (ctx, TOOLBAR_KEYBOARD_MODE);
_on_the_spot = config->read (String (SCIM_CONFIG_FRONTEND_ON_THE_SPOT), _on_the_spot);
_shared_input_method = config->read (String (SCIM_CONFIG_FRONTEND_SHARED_INPUT_METHOD), _shared_input_method);
_change_keyboard_mode_by_touch = scim_global_config_read (String (SCIM_GLOBAL_CONFIG_CHANGE_KEYBOARD_MODE_BY_TOUCH), _change_keyboard_mode_by_touch);
+ _support_hw_keyboard_mode = scim_global_config_read (String (SCIM_GLOBAL_CONFIG_SUPPORT_HW_KEYBOARD_MODE), _support_hw_keyboard_mode);
// Get keyboard layout setting
// Flush the global config first, in order to load the new configs from disk.
*/
#define Uses_SCIM_TRANSACTION
+#define Uses_SCIM_HOTKEY
/* IM control UI part */
static Eina_Bool received_will_hide_event = EINA_FALSE;
static Eina_Bool received_candidate_will_hide_event = EINA_FALSE;
static Eina_Bool will_hide = EINA_FALSE;
+static bool _support_hw_keyboard_mode = false;
static void _send_input_panel_hide_request ();
ecore_x_event_mask_set (_control_win, ECORE_X_EVENT_MASK_WINDOW_PROPERTY);
_prop_change_handler = ecore_event_handler_add (ECORE_X_EVENT_WINDOW_PROPERTY, _prop_change, NULL);
+ _support_hw_keyboard_mode = scim_global_config_read (String (SCIM_GLOBAL_CONFIG_SUPPORT_HW_KEYBOARD_MODE), _support_hw_keyboard_mode);
- if (!prop_x_keyboard_input_detected)
- prop_x_keyboard_input_detected = ecore_x_atom_get (PROP_X_EXT_KEYBOARD_INPUT_DETECTED);
+ if (_support_hw_keyboard_mode){
+ if (!prop_x_keyboard_input_detected)
+ prop_x_keyboard_input_detected = ecore_x_atom_get (PROP_X_EXT_KEYBOARD_INPUT_DETECTED);
- if (ecore_x_window_prop_card32_get (_control_win, prop_x_keyboard_input_detected, &val, 1) > 0){
- if (val == 1){
- kbd_mode = TOOLBAR_KEYBOARD_MODE;
+ if (ecore_x_window_prop_card32_get (_control_win, prop_x_keyboard_input_detected, &val, 1) > 0){
+ if (val == 1){
+ kbd_mode = TOOLBAR_KEYBOARD_MODE;
+ } else {
+ kbd_mode = TOOLBAR_HELPER_MODE;
+ }
} else {
kbd_mode = TOOLBAR_HELPER_MODE;
}
- } else {
- kbd_mode = TOOLBAR_HELPER_MODE;
}
LOGD ("keyboard mode(0:H/W Keyboard, 1:S/W Keyboard): %d\n", kbd_mode);
}
if (IfInitContext == false) {
_isf_imf_context_init ();
}
+ _support_hw_keyboard_mode = scim_global_config_read (String (SCIM_GLOBAL_CONFIG_SUPPORT_HW_KEYBOARD_MODE), _support_hw_keyboard_mode);
- kbd_mode = mode;
- SECURE_LOGD ("keyboard mode : %d\n", kbd_mode);
- _isf_imf_context_set_keyboard_mode (_get_context_id (ctx), mode);
+ if (_support_hw_keyboard_mode) {
+ kbd_mode = mode;
+ SECURE_LOGD ("keyboard mode : %d\n", kbd_mode);
+ _isf_imf_context_set_keyboard_mode (_get_context_id (ctx), mode);
+ }
}
void isf_imf_context_input_panel_send_candidate_will_hide_ack (Ecore_IMF_Context *ctx)
String helper_uuid = _config->read (SCIM_CONFIG_DEFAULT_HELPER_ISE, String (""));
String default_uuid = scim_global_config_read (String (SCIM_GLOBAL_CONFIG_DEFAULT_ISE_UUID), String (""));
+ bool _support_hw_keyboard_mode = scim_global_config_read (String (SCIM_GLOBAL_CONFIG_SUPPORT_HW_KEYBOARD_MODE), _support_hw_keyboard_mode);
- if (mode == TOOLBAR_KEYBOARD_MODE) {
+ if (mode == TOOLBAR_KEYBOARD_MODE && _support_hw_keyboard_mode) {
if (_panel_agent->get_current_toolbar_mode () == TOOLBAR_KEYBOARD_MODE) {
LOGD ("HARDWARE_KEYBOARD_MODE return");
return;
#define SCIM_GLOBAL_CONFIG_PRELOAD_KEYBOARD_ISE "/PreloadKeyboardIse"
#define SCIM_GLOBAL_CONFIG_LAUNCH_ISE_ON_REQUEST "/LaunchIseOnRequest"
#define SCIM_GLOBAL_CONFIG_CHANGE_KEYBOARD_MODE_BY_TOUCH "/ChangeKeyboardModeByTouch"
+#define SCIM_GLOBAL_CONFIG_SUPPORT_HW_KEYBOARD_MODE "/SupportHWKeyboardMode"
#define ISF_CONFIG_HARDWARE_KEYBOARD_DETECT "/isf/hw_keyboard_detect"