ecore_device_subclass_get(ev->dev) == ECORE_DEVICE_SUBCLASS_REMOCON)
return ECORE_CALLBACK_PASS_ON;
- /* process up/down/left/right and enter key exceptionally */
+ /* process up/down/left/right and some keys 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 */
+ const char *XF86_key = "XF86";
+
if ((!strcmp(ev->key, "KP_Down") ||
!strcmp(ev->key, "KP_Up") ||
!strcmp(ev->key, "KP_Right") ||
!strcmp(ev->key, "Return") ||
!strcmp(ev->key, "Pause") ||
!strcmp(ev->key, "NoSymbol") ||
- !strncmp(ev->key, "XF86", 4) ||
- !strncmp(ev->key, "Cancel", 5))
+ !strncmp(ev->key, XF86_key, strlen(XF86_key)) ||
+ !strcmp(ev->key, "Cancel"))
return ECORE_CALLBACK_PASS_ON;
SECURE_LOGI("Hide IME (key : %s)", ev->key);