From a1dd32b1211ce25eacfdc9724db3c954aa637bc0 Mon Sep 17 00:00:00 2001 From: Daiki Ueno Date: Tue, 1 Feb 2011 17:37:52 +0900 Subject: [PATCH] Ignore modifier keys in AccessibleKeystrokeListener. --- src/system-client.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/system-client.c b/src/system-client.c index 3f30e412..78dfc13f 100644 --- a/src/system-client.c +++ b/src/system-client.c @@ -350,6 +350,16 @@ keystroke_listener_cb (const AccessibleKeystroke *stroke, void *user_data) { EekboardSystemClient *client = user_data; + EekKey *key; + + /* Ignore modifiers since the keystroke listener does not called + when a modifier key is released. */ + key = eek_keyboard_find_key_by_keycode (client->keyboard, stroke->keycode); + if (key) { + EekSymbol *symbol = eek_key_get_symbol_with_fallback (key, 0, 0); + if (symbol && eek_symbol_is_modifier (symbol)) + return FALSE; + } if (stroke->type == SPI_KEY_PRESSED) eekboard_proxy_press_key (client->proxy, stroke->keycode);