diff options
author | Marcel Hollerbach <mail@marcel-hollerbach.de> | 2018-07-10 14:44:36 -0400 |
---|---|---|
committer | Chris Michael <cp.michael@samsung.com> | 2018-07-10 14:44:36 -0400 |
commit | bda4565d9cb4f5a0007fe39b6821b20092290328 (patch) | |
tree | 9da3bf87ec2b167ce28fe38a81dfb5bcaecf61f3 | |
parent | 5ad16095a4c3494f4c853d1449b7e29b7798f850 (diff) |
ecore_wl2&elput: correctly fill the key structure
Summary: the key structure has two fields key and keyname, those should be identical to the keystructures from x. the method xkb_keysym_to_utf8 however returns different values for keys like "minus" thus only relying on xkb_keysym_name files this issue.
Reviewers: eagleeye, devilhorns
Reviewed By: eagleeye
Subscribers: cedric, #committers, zmike
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D6520
-rw-r--r-- | src/lib/ecore_wl2/ecore_wl2_input.c | 10 | ||||
-rw-r--r-- | src/lib/elput/elput_evdev.c | 10 |
2 files changed, 0 insertions, 20 deletions
diff --git a/src/lib/ecore_wl2/ecore_wl2_input.c b/src/lib/ecore_wl2/ecore_wl2_input.c index 14de4dc9f0..ade74de234 100644 --- a/src/lib/ecore_wl2/ecore_wl2_input.c +++ b/src/lib/ecore_wl2/ecore_wl2_input.c | |||
@@ -592,16 +592,6 @@ in this Software without prior written authorization from The Open Group. | |||
592 | static void | 592 | static void |
593 | _ecore_wl2_input_symbol_rep_find(xkb_keysym_t keysym, char *buffer, int size, unsigned int code) | 593 | _ecore_wl2_input_symbol_rep_find(xkb_keysym_t keysym, char *buffer, int size, unsigned int code) |
594 | { | 594 | { |
595 | int n = 0; | ||
596 | |||
597 | n = xkb_keysym_to_utf8(keysym, buffer, size); | ||
598 | |||
599 | /* check if we are a control code */ | ||
600 | if (n > 0 && !( | ||
601 | (buffer[0] > 0x0 && buffer[0] <= 0x20) || /* others 0x0 to 0x20 control codes */ | ||
602 | buffer[0] == 0x7F)) /*delete control code */ | ||
603 | return; | ||
604 | |||
605 | if (xkb_keysym_get_name(keysym, buffer, size) != 0) | 595 | if (xkb_keysym_get_name(keysym, buffer, size) != 0) |
606 | return; | 596 | return; |
607 | 597 | ||
diff --git a/src/lib/elput/elput_evdev.c b/src/lib/elput/elput_evdev.c index 91bbbb2a81..635061a08c 100644 --- a/src/lib/elput/elput_evdev.c +++ b/src/lib/elput/elput_evdev.c | |||
@@ -606,16 +606,6 @@ process_key_press(xkb_keysym_t sym, Elput_Keyboard *kbd) | |||
606 | static void | 606 | static void |
607 | _elput_symbol_rep_find(xkb_keysym_t keysym, char *buffer, int size, unsigned int code) | 607 | _elput_symbol_rep_find(xkb_keysym_t keysym, char *buffer, int size, unsigned int code) |
608 | { | 608 | { |
609 | int n = 0; | ||
610 | |||
611 | n = xkb_keysym_to_utf8(keysym, buffer, size); | ||
612 | |||
613 | /* check if we are a control code */ | ||
614 | if (n > 0 && !( | ||
615 | (buffer[0] > 0x0 && buffer[0] < 0x20) || /* others 0x0 to 0x1F control codes */ | ||
616 | buffer[0] == 0x7F)) /*delete control code */ | ||
617 | return; | ||
618 | |||
619 | if (xkb_keysym_get_name(keysym, buffer, size) != 0) | 609 | if (xkb_keysym_get_name(keysym, buffer, size) != 0) |
620 | return; | 610 | return; |
621 | 611 | ||