switch (data->message)
{
/* Keyboard input notifications */
+ case WM_CHAR:
+ _ecore_wince_event_handle_key_press(data, 0);
+ break;
case WM_HOTKEY:
- _ecore_wince_event_handle_key_press(data);
+ _ecore_wince_event_handle_key_press(data, 1);
break;
case WM_KEYDOWN:
- _ecore_wince_event_handle_key_press(data);
+ case WM_SYSKEYDOWN:
+ _ecore_wince_event_handle_key_press(data, 1);
break;
case WM_KEYUP:
- _ecore_wince_event_handle_key_release(data);
+ case WM_SYSKEYUP:
+ _ecore_wince_event_handle_key_release(data, 1);
break;
case WM_SETFOCUS:
_ecore_wince_event_handle_focus_in(data);
/***** Global functions *****/
void
-_ecore_wince_event_handle_key_press(Ecore_WinCE_Callback_Data *msg)
+_ecore_wince_event_handle_key_press(Ecore_WinCE_Callback_Data *msg,
+ int is_keystroke)
{
Ecore_WinCE_Event_Key_Down *e;
e = (Ecore_WinCE_Event_Key_Down *)malloc(sizeof(Ecore_WinCE_Event_Key_Down));
if (!e) return;
- if (!_ecore_wince_event_keystroke_get(LOWORD(msg->window_param),
+ if (is_keystroke)
+ {
+ if (!_ecore_wince_event_keystroke_get(LOWORD(msg->window_param),
+ &e->keyname,
+ &e->keysymbol,
+ &e->keycompose))
+ {
+ free(e);
+ return;
+ }
+ }
+ else
+ {
+ if (!_ecore_wince_event_char_get(LOWORD(msg->window_param),
&e->keyname,
&e->keysymbol,
&e->keycompose))
- {
- free(e);
- return;
+ {
+ free(e);
+ return;
+ }
}
e->window = (void *)GetWindowLong(msg->window, GWL_USERDATA);
}
void
-_ecore_wince_event_handle_key_release(Ecore_WinCE_Callback_Data *msg)
+_ecore_wince_event_handle_key_release(Ecore_WinCE_Callback_Data *msg,
+ int is_keystroke)
{
Ecore_WinCE_Event_Key_Up *e;
e = (Ecore_WinCE_Event_Key_Up *)calloc(1, sizeof(Ecore_WinCE_Event_Key_Up));
if (!e) return;
- if (!_ecore_wince_event_keystroke_get(LOWORD(msg->window_param),
+ if (is_keystroke)
+ {
+ if (!_ecore_wince_event_keystroke_get(LOWORD(msg->window_param),
+ &e->keyname,
+ &e->keysymbol,
+ &e->keycompose))
+ {
+ free(e);
+ return;
+ }
+ }
+ else
+ {
+ if (!_ecore_wince_event_char_get(LOWORD(msg->window_param),
&e->keyname,
&e->keysymbol,
&e->keycompose))
- {
- free(e);
- return;
+ {
+ free(e);
+ return;
+ }
}
e->window = (void *)GetWindowLong(msg->window, GWL_USERDATA);
/***** Private functions definitions *****/
static void
-_ecore_wince_event_free_key_down(void *data,
+_ecore_wince_event_free_key_down(void *data __UNUSED__,
void *ev)
{
Ecore_WinCE_Event_Key_Down *e;
}
static void
-_ecore_wince_event_free_key_up(void *data,
+_ecore_wince_event_free_key_up(void *data __UNUSED__,
void *ev)
{
Ecore_WinCE_Event_Key_Up *e;
ks = "F24";
kc = "";
break;
+ case VK_APPS:
+ kn = "Application";
+ ks = "Application";
+ kc = "";
+ break;
+ case VK_MENU:
+ kn = "Menu";
+ ks = "Menu";
+ kc = "";
+ break;
default:
/* other non keystroke characters */
return 0;
extern HINSTANCE _ecore_wince_instance;
-void _ecore_wince_event_handle_key_press(Ecore_WinCE_Callback_Data *msg);
-void _ecore_wince_event_handle_key_release(Ecore_WinCE_Callback_Data *msg);
+void _ecore_wince_event_handle_key_press(Ecore_WinCE_Callback_Data *msg, int is_keystroke);
+void _ecore_wince_event_handle_key_release(Ecore_WinCE_Callback_Data *msg, int is_keystroke);
void _ecore_wince_event_handle_button_press(Ecore_WinCE_Callback_Data *msg, int button);
void _ecore_wince_event_handle_button_release(Ecore_WinCE_Callback_Data *msg, int button);
void _ecore_wince_event_handle_motion_notify(Ecore_WinCE_Callback_Data *msg);