}
}
}
+
+#ifdef _TV
+static Eina_Bool read_devices = EINA_FALSE;
+char ** device_names = NULL;
+
+static Eina_Bool
+filter_devices (const char *dev_name)
+{
+ int i;
+ LOGD("");
+
+ if (!dev_name)
+ return EINA_FALSE;
+
+ if (read_devices == EINA_FALSE) {
+ char *devices = getenv("ISF_REMOTE_CONTROL_DEVICES");
+ if (devices) {
+ device_names = eina_str_split(devices, ",", 0);
+ }
+ read_devices = EINA_TRUE;
+ }
+
+ if (device_names == NULL) {
+ return EINA_FALSE;
+ }
+
+ for (i = 0; device_names[i]; i++) {
+ if (!strcmp (dev_name, device_names[i])) {
+ return EINA_TRUE;
+ }
+ }
+
+ return EINA_FALSE;
+}
+#endif
#endif
void wayland_im_initialize ()
vconf_ignore_key_changed (VCONFKEY_AUTOCAPITAL_ALLOW_BOOL, autocapital_allow_changed_cb);
vconf_ignore_key_changed (VCONFKEY_ISF_INPUT_LANGUAGE, input_language_changed_cb);
vconf_ignore_key_changed (VCONFKEY_ISF_HW_KEYBOARD_INPUT_DETECTED, keyboard_mode_changed_cb);
+
+#ifdef _TV
+ if (device_names) {
+ if (device_names[0])
+ free (device_names[0]);
+ free (device_names);
+ device_names = NULL;
+ }
+#endif
#endif
if (_ime_device) {
return EINA_FALSE;
}
+#ifdef _TV
+ if (strcmp (ecore_key_ev.keyname, "Return") == 0 && type == ECORE_IMF_EVENT_KEY_DOWN && filter_devices (key_dev_name) && hw_keyboard_mode == EINA_TRUE) {
+ LOGD ("Changed keyboard mode from H/W to S/W ");
+ hw_keyboard_mode = EINA_FALSE;
+ vconf_set_bool (VCONFKEY_ISF_HW_KEYBOARD_INPUT_DETECTED, 0);
+
+ if (ecore_imf_context_input_panel_enabled_get (ctx)) {
+ ecore_imf_context_input_panel_show (ctx);
+ }
+ return EINA_TRUE;
+ }
+#endif
+
do {
if (!ecore_key_ev.timestamp && (ecore_key_ev.modifiers & MOD_Mod5_MASK)) {
if (type == ECORE_IMF_EVENT_KEY_DOWN) {