free(context);
}
-static Eina_Bool is_number_key(const char *str)
- {
- if (!str) return EINA_FALSE;
-
- int result = atoi(str);
-
- if (result == 0)
- {
- if (!strcmp(str, "0"))
- return EINA_TRUE;
- else
- return EINA_FALSE;
- }
- else
- return EINA_TRUE;
-}
-
static Eina_Bool
_e_mod_ecore_key_down_cb(void *data, int type, void *event)
{
return ECORE_CALLBACK_PASS_ON;
/* process remote controller key exceptionally */
+ if (ecore_device_class_get(ev->dev) == ECORE_DEVICE_CLASS_KEYBOARD &&
+ ecore_device_subclass_get(ev->dev) == ECORE_DEVICE_SUBCLASS_REMOCON)
+ return ECORE_CALLBACK_PASS_ON;
+
+ /* process up/down/left/right and enter key exceptionally */
+ /* KP_XXX key is used as arrow key and number key in keypad, so ev->string is used for checking whether KP_XXX key is number key or not */
if (((!strcmp(ev->key, "Down") ||
!strcmp(ev->key, "KP_Down") ||
!strcmp(ev->key, "Up") ||
!strcmp(ev->key, "KP_Right") ||
!strcmp(ev->key, "Left") ||
!strcmp(ev->key, "KP_Left")) && !ev->string) ||
- !strcmp(ev->key, "Return") ||
- !strcmp(ev->key, "Pause") ||
- !strcmp(ev->key, "NoSymbol") ||
- !strncmp(ev->key, "XF86", 4) ||
- !strncmp(ev->key, "Cancel", 5) ||
- (is_number_key(ev->string) && _TV))
+ !strcmp(ev->key, "Return"))
return ECORE_CALLBACK_PASS_ON;
SECURE_LOGI("Hide IME (key : %s)", ev->key);