From: raster Date: Thu, 5 Jul 2012 14:18:29 +0000 (+0000) Subject: fix ecore-fb.. so terminology works 100% perfectly in fb! X-Git-Tag: submit/trunk/20120815.175442~82 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e1f9e07ca2e0ed2ca9210db4caf10dce88ebd653;p=profile%2Fivi%2Fecore.git fix ecore-fb.. so terminology works 100% perfectly in fb! git-svn-id: http://svn.enlightenment.org/svn/e/trunk/ecore@73354 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/ChangeLog b/ChangeLog index a5b73f5..967c5fd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -809,4 +809,6 @@ * Add ecore_evas_screen_dpi_get() * Fix ecore_evas_screen_geometry_get(0 for x11 to return zone pos/size as it should. + * Fix ecore-fb to use key repeat like x so apps dont break in fb + * Fix ecore-fb string lookup table to include ctrl+keys diff --git a/src/lib/ecore_fb/ecore_fb_kbd.c b/src/lib/ecore_fb/ecore_fb_kbd.c index bf81e66..f9cdc3d 100644 --- a/src/lib/ecore_fb/ecore_fb_kbd.c +++ b/src/lib/ecore_fb/ecore_fb_kbd.c @@ -1,7 +1,7 @@ static void _ecore_fb_event_free_key_down(void *data, void *ev); static void _ecore_fb_event_free_key_up(void *data, void *ev); -static const char *_ecore_fb_kbd_syms[128 * 6] = +static const char *_ecore_fb_kbd_syms[128 * 7] = { #include "ecore_fb_keytable.h" }; @@ -179,9 +179,9 @@ _ecore_fb_kbd_fd_handler(void *data __UNUSED__, Ecore_Fd_Handler *fd_handler __U if (_ecore_fb_shift) add = 1; else if (_ecore_fb_lock) add = 2; - e->keyname = strdup(_ecore_fb_kbd_syms[(buf & 0x7f) * 6]); - e->keysymbol = strdup(_ecore_fb_kbd_syms[((buf & 0x7f) * 6) + add]); - e->key_compose = strdup(_ecore_fb_kbd_syms[((buf & 0x7f) * 6) + 3 + add]); + e->keyname = strdup(_ecore_fb_kbd_syms[(buf & 0x7f) * 7]); + e->keysymbol = strdup(_ecore_fb_kbd_syms[((buf & 0x7f) * 7) + add]); + e->key_compose = strdup(_ecore_fb_kbd_syms[((buf & 0x7f) * 7) + 3 + add]); } else e->keyname = strdup(_ecore_fb_btn_syms[buf & 0x7f]); @@ -195,7 +195,6 @@ _ecore_fb_kbd_fd_handler(void *data __UNUSED__, Ecore_Fd_Handler *fd_handler __U e->root_window = e->window; e->same_screen = 1; e->timestamp = ecore_loop_time_get() * 1000.0; - ecore_event_add(ECORE_FB_EVENT_KEY_DOWN, e, _ecore_fb_event_free_key_down, NULL); if (!strcmp(e->keyname, "Control_L")) _ecore_fb_ctrl++; else if (!strcmp(e->keyname, "Control_R")) @@ -224,10 +223,22 @@ _ecore_fb_kbd_fd_handler(void *data __UNUSED__, Ecore_Fd_Handler *fd_handler __U else if (!strcmp(e->keyname, "F12")) vt_switch = 11; if (_ecore_fb_ctrl > 2) _ecore_fb_ctrl = 2; if (_ecore_fb_alt > 2) _ecore_fb_alt = 2; + if ((_ecore_fb_kbd_fd == _ecore_fb_tty_fd) && + (_ecore_fb_ctrl)) + { + const char *ts = _ecore_fb_kbd_syms[(buf & 0x7f) + 3 + 3]; + + if (ts) + { + if (e->key_compose) free(e->key_compose); + e->key_compose = strdup(ts); + } + } if ((vt_switch >= 0) && (_ecore_fb_ctrl) && (_ecore_fb_alt)) _ecore_fb_vt_switch(vt_switch); + ecore_event_add(ECORE_FB_EVENT_KEY_DOWN, e, _ecore_fb_event_free_key_down, NULL); } else { @@ -242,9 +253,9 @@ _ecore_fb_kbd_fd_handler(void *data __UNUSED__, Ecore_Fd_Handler *fd_handler __U if (_ecore_fb_shift) add = 1; else if (_ecore_fb_lock) add = 2; - e->keyname = strdup(_ecore_fb_kbd_syms[(buf & 0x7f) * 6]); - e->keysymbol = strdup(_ecore_fb_kbd_syms[((buf & 0x7f) * 6) + add]); - e->key_compose = strdup(_ecore_fb_kbd_syms[((buf & 0x7f) * 6) + 3 + add]); + e->keyname = strdup(_ecore_fb_kbd_syms[(buf & 0x7f) * 7]); + e->keysymbol = strdup(_ecore_fb_kbd_syms[((buf & 0x7f) * 7) + add]); + e->key_compose = strdup(_ecore_fb_kbd_syms[((buf & 0x7f) * 7) + 3 + add]); } else e->keyname = strdup(_ecore_fb_btn_syms[buf & 0x7f]); diff --git a/src/lib/ecore_fb/ecore_fb_keytable.h b/src/lib/ecore_fb/ecore_fb_keytable.h index 38de7bf..70bf6b9 100644 --- a/src/lib/ecore_fb/ecore_fb_keytable.h +++ b/src/lib/ecore_fb/ecore_fb_keytable.h @@ -1,129 +1,129 @@ /* this table was taken from ecore_fb, is the default en layout */ - "0x00", "0x00", "0x00", /**/"", "", "",/***/ - "Escape", "Escape", "Escape", /**/"", "", "",/***/ - "1", "exclam", "1", /**/"1", "!", "1",/***/ - "2", "at", "2", /**/"2", "@", "2",/***/ - "3", "numbersign", "3", /**/"3", "#", "3",/***/ - "4", "dollar", "4", /**/"4", "$", "4",/***/ - "5", "percent", "5", /**/"5", "%", "5",/***/ - "6", "asciicircumm", "6", /**/"6", "^", "6",/***/ - "7", "ampersand", "7", /**/"7", "&", "7",/***/ - "8", "asterisk", "8", /**/"8", "*", "8",/***/ - "9", "parenleft", "9", /**/"9", "(", "9",/***/ - "0", "parenright", "0", /**/"0", ")", "0",/***/ - "minus", "underscore", "minus", /**/"-", "_", "-",/***/ - "equal", "plus", "equal", /**/"=", "+", "=",/***/ - "BackSpace", "BackSpace", "BackSpace", /**/"\010","\010","\010",/***/ - "Tab", "ISO_Left_Tab", "Tab", /**/"\011","", "\011",/***/ - "q", "Q", "Q", /**/"q", "Q", "Q",/***/ - "w", "W", "W", /**/"w", "W", "W",/***/ - "e", "E", "E", /**/"e", "E", "E",/***/ - "r", "R", "R", /**/"r", "R", "R",/***/ - "t", "T", "T", /**/"t", "T", "T",/***/ - "y", "Y", "Y", /**/"y", "Y", "Y",/***/ - "u", "U", "U", /**/"u", "U", "U",/***/ - "i", "I", "I", /**/"i", "I", "I",/***/ - "o", "O", "O", /**/"o", "O", "O",/***/ - "p", "P", "P", /**/"p", "P", "P",/***/ - "bracketleft", "braceleft", "bracketleft", /**/"[", "{", "[",/***/ - "bracketright", "braceright", "bracketright", /**/"]", "}", "]",/***/ - "Return", "Return", "Return", /**/"\015","\015","\015",/***/ - "Control_L", "Control_L", "Control_L", /**/"", "", "",/***/ - "a", "A", "A", /**/"a", "A", "A",/***/ - "s", "S", "S", /**/"s", "S", "S",/***/ - "d", "D", "D", /**/"d", "D", "D",/***/ - "f", "F", "F", /**/"f", "F", "F",/***/ - "g", "G", "G", /**/"g", "G", "G",/***/ - "h", "h", "H", /**/"h", "H", "H",/***/ - "j", "J", "J", /**/"j", "J", "J",/***/ - "k", "K", "K", /**/"k", "K", "K",/***/ - "l", "L", "L", /**/"l", "L", "L",/***/ - "semicolon", "colon", "semicolon", /**/";", ":", ";",/***/ - "apostrophe", "quotedbl", "apostrophe", /**/"'", "\"", "'",/***/ - "grave", "asciitilde", "grave", /**/"`", "~", "`",/***/ - "Shift_L", "Shift_L", "Shift_L", /**/"", "", "",/***/ - "backslash", "bar", "backslash", /**/"\\", "|", "\\",/***/ - "z", "Z", "Z", /**/"z", "Z", "Z",/***/ - "x", "X", "X", /**/"x", "X", "X",/***/ - "c", "C", "C", /**/"c", "C", "C",/***/ - "v", "V", "V", /**/"v", "V", "V",/***/ - "b", "B", "B", /**/"b", "B", "B",/***/ - "n", "N", "N", /**/"n", "N", "N",/***/ - "m", "M", "M", /**/"m", "M", "M",/***/ - "comma", "less", "comma", /**/",", "<", ",",/***/ - "period", "greater", "period", /**/".", ">", ".",/***/ - "slash", "question", "slash", /**/"/", "?", "/",/***/ - "Shift_R", "Shift_R", "Shift_R", /**/"", "", "",/***/ - "KP_Multiply", "KP_Multiply", "KP_Multiply", /**/"", "*", "",/***/ - "Alt_L", "Alt_L", "Alt_L", /**/"", "", "",/***/ - "space", "space", "space", /**/" ", " ", " ",/***/ - "Caps_Lock", "Caps_Lock", "Caps_Lock", /**/"", "", "",/***/ - "F1", "F1", "F1", /**/"", "", "",/***/ - "F2", "F2", "F2", /**/"", "", "",/***/ - "F3", "F3", "F3", /**/"", "", "",/***/ - "F4", "F4", "F4", /**/"", "", "",/***/ - "F5", "F5", "F5", /**/"", "", "",/***/ - "F6", "F6", "F6", /**/"", "", "",/***/ - "F7", "F7", "F7", /**/"", "", "",/***/ - "F8", "F8", "F8", /**/"", "", "",/***/ - "F9", "F9", "F9", /**/"", "", "",/***/ - "F10", "F10", "F10", /**/"", "", "",/***/ - "Num_Lock", "Num_Lock", "Num_Lock", /**/"", "", "",/***/ - "Scroll_Lock", "Scroll_Lock", "Scroll_Lock", /**/"", "", "",/***/ - "KP_Home", "KP_7", "KP_Home", /**/"", "7", "",/***/ - "KP_Up", "KP_8", "KP_Up", /**/"", "8", "",/***/ - "KP_Prior", "KP_9", "KP_Prior", /**/"", "9", "",/***/ - "KP_Subtract", "KP_Subtract", "KP_Subtract", /**/"", "", "",/***/ - "KP_Left", "KP_4", "KP_Left", /**/"", "4", "",/***/ - "KP_Begin", "KP_5", "KP_Begin", /**/"", "5", "",/***/ - "KP_Right", "KP_6", "KP_Right", /**/"", "6", "",/***/ - "KP_Add", "KP_Add", "KP_Add", /**/"", "", "",/***/ - "KP_End", "KP_1", "KP_End", /**/"", "1", "",/***/ - "KP_Down", "KP_2", "KP_Down", /**/"", "2", "",/***/ - "KP_Next", "KP_3", "KP_Next", /**/"", "3", "",/***/ - "KP_Insert", "KP_0", "KP_Insert", /**/"", "0", "",/***/ - "KP_Delete", "KP_Decimal", "KP_Delete", /**/"", ".", "",/***/ - "0x54", "0x54", "0x54", /**/"", "", "",/***/ - "0x55", "0x55", "0x55", /**/"", "", "",/***/ - "0x56", "0x56", "0x56", /**/"", "", "",/***/ - "F11", "F11", "F11", /**/"", "", "",/***/ - "F12", "F12", "F12", /**/"", "", "",/***/ - "0x59", "0x59", "0x59", /**/"", "", "",/***/ - "0x5a", "0x5a", "0x5a", /**/"", "", "",/***/ - "0x5b", "0x5b", "0x5b", /**/"", "", "",/***/ - "0x5c", "0x5c", "0x5c", /**/"", "", "",/***/ - "0x5d", "0x5d", "0x5d", /**/"", "", "",/***/ - "0x5e", "0x5e", "0x5e", /**/"", "", "",/***/ - "0x5f", "0x5f", "0x5f", /**/"", "", "",/***/ - "KP_Enter", "KP_Enter", "KP_Enter", /**/"", "", "",/***/ - "Control_R", "Control_R", "Control_R", /**/"", "", "",/***/ - "KP_Divide", "KP_Divide", "KP_Divide", /**/"", "", "",/***/ - "Print", "Print", "Print", /**/"", "", "",/***/ - "Alt_R", "Alt_R", "Alt_R", /**/"", "", "",/***/ - "0x65", "0x65", "0x65", /**/"", "", "",/***/ - "Home", "Home", "Home", /**/"", "", "",/***/ - "Up", "Up", "Up", /**/"", "", "",/***/ - "Prior", "Prior", "Prior", /**/"", "", "",/***/ - "Left", "Left", "Left", /**/"", "", "",/***/ - "Right", "Right", "Right", /**/"", "", "",/***/ - "End", "End", "End", /**/"", "", "",/***/ - "Down", "Down", "Down", /**/"", "", "",/***/ - "Next", "Next", "Next", /**/"", "", "",/***/ - "Insert", "Insert", "Insert", /**/"", "", "",/***/ - "Delete", "Delete", "Delete", /**/"\177","\177","\177",/***/ - "0x70", "0x70", "0x70", /**/"", "", "",/***/ - "0x71", "0x71", "0x71", /**/"", "", "",/***/ - "0x72", "0x72", "0x72", /**/"", "", "",/***/ - "0x73", "0x73", "0x73", /**/"", "", "",/***/ - "0x74", "0x74", "0x74", /**/"", "", "",/***/ - "0x75", "0x75", "0x75", /**/"", "", "",/***/ - "0x76", "0x76", "0x76", /**/"", "", "",/***/ - "Pause", "Pause", "Pause", /**/"", "", "",/***/ - "0x78", "0x78", "0x78", /**/"", "", "",/***/ - "0x79", "0x79", "0x79", /**/"", "", "",/***/ - "0x7a", "0x7a", "0x7a", /**/"", "", "",/***/ - "0x7b", "0x7b", "0x7b", /**/"", "", "",/***/ - "0x7c", "0x7c", "0x7c", /**/"", "", "",/***/ - "Super_L", "Super_L", "Super_L", /**/"", "", "",/***/ - "Super_R", "Super_R", "Super_R", /**/"", "", "",/***/ - "0x7f", "0x7f", "0x7f", /**/"", "", "" /***/ + "0x00", "0x00", "0x00", /**/"", "", "", NULL,/***/ + "Escape", "Escape", "Escape", /**/"", "", "", "\x1b",/***/ + "1", "exclam", "1", /**/"1", "!", "1", NULL,/***/ + "2", "at", "2", /**/"2", "@", "2", "",/***/ + "3", "numbersign", "3", /**/"3", "#", "3", "\x1b",/***/ + "4", "dollar", "4", /**/"4", "$", "4", "\x1c",/***/ + "5", "percent", "5", /**/"5", "%", "5", "\x1d",/***/ + "6", "asciicircumm", "6", /**/"6", "^", "6", "\x1e",/***/ + "7", "ampersand", "7", /**/"7", "&", "7", "\x1f",/***/ + "8", "asterisk", "8", /**/"8", "*", "8", "\x7f",/***/ + "9", "parenleft", "9", /**/"9", "(", "9", NULL,/***/ + "0", "parenright", "0", /**/"0", ")", "0", NULL,/***/ + "minus", "underscore", "minus", /**/"-", "_", "-", NULL,/***/ + "equal", "plus", "equal", /**/"=", "+", "=", NULL,/***/ + "BackSpace", "BackSpace", "BackSpace", /**/"\010","\010","\010", NULL,/***/ + "Tab", "ISO_Left_Tab", "Tab", /**/"\011","", "\011", NULL,/***/ + "q", "Q", "Q", /**/"q", "Q", "Q", "\x11",/***/ + "w", "W", "W", /**/"w", "W", "W", "\x17",/***/ + "e", "E", "E", /**/"e", "E", "E", "\x05",/***/ + "r", "R", "R", /**/"r", "R", "R", "\x12",/***/ + "t", "T", "T", /**/"t", "T", "T", "\x14",/***/ + "y", "Y", "Y", /**/"y", "Y", "Y", "\x19",/***/ + "u", "U", "U", /**/"u", "U", "U", "\x15",/***/ + "i", "I", "I", /**/"i", "I", "I", "\x09",/***/ + "o", "O", "O", /**/"o", "O", "O", "\x0f",/***/ + "p", "P", "P", /**/"p", "P", "P", "\x10",/***/ + "bracketleft", "braceleft", "bracketleft", /**/"[", "{", "[", "\x1b",/***/ + "bracketright", "braceright", "bracketright", /**/"]", "}", "]", "\x1d",/***/ + "Return", "Return", "Return", /**/"\015","\015","\015", NULL,/***/ + "Control_L", "Control_L", "Control_L", /**/"", "", "", NULL,/***/ + "a", "A", "A", /**/"a", "A", "A", "\x01",/***/ + "s", "S", "S", /**/"s", "S", "S", "\x13",/***/ + "d", "D", "D", /**/"d", "D", "D", "\x04",/***/ + "f", "F", "F", /**/"f", "F", "F", "\x06",/***/ + "g", "G", "G", /**/"g", "G", "G", "\x07",/***/ + "h", "h", "H", /**/"h", "H", "H", "\x08",/***/ + "j", "J", "J", /**/"j", "J", "J", "\x0a",/***/ + "k", "K", "K", /**/"k", "K", "K", "\x0b",/***/ + "l", "L", "L", /**/"l", "L", "L", "\x0c",/***/ + "semicolon", "colon", "semicolon", /**/";", ":", ";", NULL,/***/ + "apostrophe", "quotedbl", "apostrophe", /**/"'", "\"", "'", NULL,/***/ + "grave", "asciitilde", "grave", /**/"`", "~", "`", "",/***/ + "Shift_L", "Shift_L", "Shift_L", /**/"", "", "", NULL,/***/ + "backslash", "bar", "backslash", /**/"\\", "|", "\\", "\x1c",/***/ + "z", "Z", "Z", /**/"z", "Z", "Z", "\x1a",/***/ + "x", "X", "X", /**/"x", "X", "X", "\x18",/***/ + "c", "C", "C", /**/"c", "C", "C", "\x03",/***/ + "v", "V", "V", /**/"v", "V", "V", "\x16",/***/ + "b", "B", "B", /**/"b", "B", "B", "\x02",/***/ + "n", "N", "N", /**/"n", "N", "N", "\x0e",/***/ + "m", "M", "M", /**/"m", "M", "M", "\x0d",/***/ + "comma", "less", "comma", /**/",", "<", ",", NULL,/***/ + "period", "greater", "period", /**/".", ">", ".", NULL,/***/ + "slash", "question", "slash", /**/"/", "?", "/", "",/***/ + "Shift_R", "Shift_R", "Shift_R", /**/"", "", "", NULL,/***/ + "KP_Multiply", "KP_Multiply", "KP_Multiply", /**/"", "*", "", NULL,/***/ + "Alt_L", "Alt_L", "Alt_L", /**/"", "", "", NULL,/***/ + "space", "space", "space", /**/" ", " ", " ", "",/***/ + "Caps_Lock", "Caps_Lock", "Caps_Lock", /**/"", "", "", NULL,/***/ + "F1", "F1", "F1", /**/"", "", "", NULL,/***/ + "F2", "F2", "F2", /**/"", "", "", NULL,/***/ + "F3", "F3", "F3", /**/"", "", "", NULL,/***/ + "F4", "F4", "F4", /**/"", "", "", NULL,/***/ + "F5", "F5", "F5", /**/"", "", "", NULL,/***/ + "F6", "F6", "F6", /**/"", "", "", NULL,/***/ + "F7", "F7", "F7", /**/"", "", "", NULL,/***/ + "F8", "F8", "F8", /**/"", "", "", NULL,/***/ + "F9", "F9", "F9", /**/"", "", "", NULL,/***/ + "F10", "F10", "F10", /**/"", "", "", NULL,/***/ + "Num_Lock", "Num_Lock", "Num_Lock", /**/"", "", "", NULL,/***/ + "Scroll_Lock", "Scroll_Lock", "Scroll_Lock", /**/"", "", "", NULL,/***/ + "KP_Home", "KP_7", "KP_Home", /**/"", "7", "", NULL,/***/ + "KP_Up", "KP_8", "KP_Up", /**/"", "8", "", NULL,/***/ + "KP_Prior", "KP_9", "KP_Prior", /**/"", "9", "", NULL,/***/ + "KP_Subtract", "KP_Subtract", "KP_Subtract", /**/"", "", "", NULL,/***/ + "KP_Left", "KP_4", "KP_Left", /**/"", "4", "", NULL,/***/ + "KP_Begin", "KP_5", "KP_Begin", /**/"", "5", "", NULL,/***/ + "KP_Right", "KP_6", "KP_Right", /**/"", "6", "", NULL,/***/ + "KP_Add", "KP_Add", "KP_Add", /**/"", "", "", NULL,/***/ + "KP_End", "KP_1", "KP_End", /**/"", "1", "", NULL,/***/ + "KP_Down", "KP_2", "KP_Down", /**/"", "2", "", NULL,/***/ + "KP_Next", "KP_3", "KP_Next", /**/"", "3", "", NULL,/***/ + "KP_Insert", "KP_0", "KP_Insert", /**/"", "0", "", NULL,/***/ + "KP_Delete", "KP_Decimal", "KP_Delete", /**/"", ".", "", NULL,/***/ + "0x54", "0x54", "0x54", /**/"", "", "", NULL,/***/ + "0x55", "0x55", "0x55", /**/"", "", "", NULL,/***/ + "0x56", "0x56", "0x56", /**/"", "", "", NULL,/***/ + "F11", "F11", "F11", /**/"", "", "", NULL,/***/ + "F12", "F12", "F12", /**/"", "", "", NULL,/***/ + "0x59", "0x59", "0x59", /**/"", "", "", NULL,/***/ + "0x5a", "0x5a", "0x5a", /**/"", "", "", NULL,/***/ + "0x5b", "0x5b", "0x5b", /**/"", "", "", NULL,/***/ + "0x5c", "0x5c", "0x5c", /**/"", "", "", NULL,/***/ + "0x5d", "0x5d", "0x5d", /**/"", "", "", NULL,/***/ + "0x5e", "0x5e", "0x5e", /**/"", "", "", NULL,/***/ + "0x5f", "0x5f", "0x5f", /**/"", "", "", NULL,/***/ + "KP_Enter", "KP_Enter", "KP_Enter", /**/"\015", "\015", "\015", NULL,/***/ + "Control_R", "Control_R", "Control_R", /**/"", "", "", NULL,/***/ + "KP_Divide", "KP_Divide", "KP_Divide", /**/"", "", "", NULL,/***/ + "Print", "Print", "Print", /**/"", "", "", NULL,/***/ + "Alt_R", "Alt_R", "Alt_R", /**/"", "", "", NULL,/***/ + "0x65", "0x65", "0x65", /**/"", "", "", NULL,/***/ + "Home", "Home", "Home", /**/"", "", "", NULL,/***/ + "Up", "Up", "Up", /**/"", "", "", NULL,/***/ + "Prior", "Prior", "Prior", /**/"", "", "", NULL,/***/ + "Left", "Left", "Left", /**/"", "", "", NULL,/***/ + "Right", "Right", "Right", /**/"", "", "", NULL,/***/ + "End", "End", "End", /**/"", "", "", NULL,/***/ + "Down", "Down", "Down", /**/"", "", "", NULL,/***/ + "Next", "Next", "Next", /**/"", "", "", NULL,/***/ + "Insert", "Insert", "Insert", /**/"", "", "", NULL,/***/ + "Delete", "Delete", "Delete", /**/"\177","\177","\177", NULL,/***/ + "0x70", "0x70", "0x70", /**/"", "", "", NULL,/***/ + "0x71", "0x71", "0x71", /**/"", "", "", NULL,/***/ + "0x72", "0x72", "0x72", /**/"", "", "", NULL,/***/ + "0x73", "0x73", "0x73", /**/"", "", "", NULL,/***/ + "0x74", "0x74", "0x74", /**/"", "", "", NULL,/***/ + "0x75", "0x75", "0x75", /**/"", "", "", NULL,/***/ + "0x76", "0x76", "0x76", /**/"", "", "", NULL,/***/ + "Pause", "Pause", "Pause", /**/"", "", "", NULL,/***/ + "0x78", "0x78", "0x78", /**/"", "", "", NULL,/***/ + "0x79", "0x79", "0x79", /**/"", "", "", NULL,/***/ + "0x7a", "0x7a", "0x7a", /**/"", "", "", NULL,/***/ + "0x7b", "0x7b", "0x7b", /**/"", "", "", NULL,/***/ + "0x7c", "0x7c", "0x7c", /**/"", "", "", NULL,/***/ + "Super_L", "Super_L", "Super_L", /**/"", "", "", NULL,/***/ + "Super_R", "Super_R", "Super_R", /**/"", "", "", NULL,/***/ + "0x7f", "0x7f", "0x7f", /**/"", "", "", NULL, /***/ diff --git a/src/lib/ecore_fb/ecore_fb_li.c b/src/lib/ecore_fb/ecore_fb_li.c index bc28261..3c37120 100644 --- a/src/lib/ecore_fb/ecore_fb_li.c +++ b/src/lib/ecore_fb/ecore_fb_li.c @@ -11,7 +11,7 @@ static Eina_List *_ecore_fb_li_devices = NULL; -static const char *_ecore_fb_li_kbd_syms[128 * 6] = +static const char *_ecore_fb_li_kbd_syms[128 * 7] = { #include "ecore_fb_keytable.h" }; @@ -46,31 +46,33 @@ _ecore_fb_li_device_event_key(Ecore_Fb_Input_Device *dev, struct input_event *ie if ((iev->code >= KEY_ESC) && (iev->code <= KEY_COMPOSE)) { int offset = 0; - const char *keyname = _ecore_fb_li_kbd_syms[iev->code * 6]; + const char *keyname = _ecore_fb_li_kbd_syms[iev->code * 7]; + /* check the key table */ if (iev->value) { /* its a repeated key, dont increment */ - if (iev->value == 2) - return; - if (!strcmp(keyname, "Control_L")) - dev->keyboard.ctrl++; - else if (!strcmp(keyname, "Control_R")) - dev->keyboard.ctrl++; - else if (!strcmp(keyname, "Alt_L")) - dev->keyboard.alt++; - else if (!strcmp(keyname, "Alt_R")) - dev->keyboard.alt++; - else if (!strcmp(keyname, "Shift_L")) - dev->keyboard.shift++; - else if (!strcmp(keyname, "Shift_R")) - dev->keyboard.shift++; - else if (!strcmp(keyname, "Caps_Lock")) - dev->keyboard.lock = !dev->keyboard.lock; - if (dev->keyboard.ctrl > 2) dev->keyboard.ctrl = 2; - if (dev->keyboard.alt > 2) dev->keyboard.alt = 2; - if (dev->keyboard.shift > 2) dev->keyboard.shift = 2; - if (dev->keyboard.lock > 1) dev->keyboard.lock = 1; + if (iev->value != 2) + { + if (!strcmp(keyname, "Control_L")) + dev->keyboard.ctrl++; + else if (!strcmp(keyname, "Control_R")) + dev->keyboard.ctrl++; + else if (!strcmp(keyname, "Alt_L")) + dev->keyboard.alt++; + else if (!strcmp(keyname, "Alt_R")) + dev->keyboard.alt++; + else if (!strcmp(keyname, "Shift_L")) + dev->keyboard.shift++; + else if (!strcmp(keyname, "Shift_R")) + dev->keyboard.shift++; + else if (!strcmp(keyname, "Caps_Lock")) + dev->keyboard.lock = !dev->keyboard.lock; + if (dev->keyboard.ctrl > 2) dev->keyboard.ctrl = 2; + if (dev->keyboard.alt > 2) dev->keyboard.alt = 2; + if (dev->keyboard.shift > 2) dev->keyboard.shift = 2; + if (dev->keyboard.lock > 1) dev->keyboard.lock = 1; + } } else { @@ -98,8 +100,15 @@ _ecore_fb_li_device_event_key(Ecore_Fb_Input_Device *dev, struct input_event *ie if (dev->keyboard.shift) offset = 1; else if (dev->keyboard.lock) offset = 2; - const char *key = _ecore_fb_li_kbd_syms[(iev->code * 6) + offset]; - const char *compose = _ecore_fb_li_kbd_syms[(iev->code * 6) + 3 + offset]; + const char *key = _ecore_fb_li_kbd_syms[(iev->code * 7) + offset]; + const char *compose = _ecore_fb_li_kbd_syms[(iev->code * 7) + 3 + offset]; + + if (dev->keyboard.ctrl) + { + const char *ts = _ecore_fb_li_kbd_syms[(iev->code * 7) + 3 + 3]; + + if (ts) compose = ts; + } e = calloc(1, sizeof(Ecore_Event_Key) + strlen(key) + strlen(keyname) + (compose ? strlen(compose) : 0) + 3); @@ -210,21 +219,21 @@ _ecore_fb_li_device_event_rel(Ecore_Fb_Input_Device *dev, struct input_event *ie case REL_Y: { Ecore_Event_Mouse_Move *e; - if(iev->code == REL_X) + if (iev->code == REL_X) { dev->mouse.x += iev->value; - if(dev->mouse.x > dev->mouse.w - 1) - dev->mouse.x = dev->mouse.w; + if (dev->mouse.x > dev->mouse.w - 1) + dev->mouse.x = dev->mouse.w; else if(dev->mouse.x < 0) - dev->mouse.x = 0; + dev->mouse.x = 0; } else { dev->mouse.y += iev->value; - if(dev->mouse.y > dev->mouse.h - 1) - dev->mouse.y = dev->mouse.h; + if (dev->mouse.y > dev->mouse.h - 1) + dev->mouse.y = dev->mouse.h; else if(dev->mouse.y < 0) - dev->mouse.y = 0; + dev->mouse.y = 0; } e = calloc(1, sizeof(Ecore_Event_Mouse_Move)); @@ -314,7 +323,7 @@ _ecore_fb_li_device_event_abs(Ecore_Fb_Input_Device *dev, struct input_event *ie break; case ABS_Y: - if(dev->mouse.h != 0) + if (dev->mouse.h != 0) { int tmp; @@ -537,8 +546,8 @@ ecore_fb_input_device_open(const char *dev) /* set info */ for (event_type = 0; event_type < EV_MAX; event_type++) { - if(!test_bit(event_type, event_type_bitmask)) - continue; + if (!test_bit(event_type, event_type_bitmask)) + continue; switch (event_type) { case EV_SYN: