From: fujiwarat Date: Thu, 21 Oct 2010 08:30:42 +0000 (+0900) Subject: Fix keyval and state in __keycode_button_clicked_cb X-Git-Tag: 1.3.8~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=15db48fc217cb6e91c91e1819f2347dfdac905e0;p=platform%2Fupstream%2Fibus.git Fix keyval and state in __keycode_button_clicked_cb --- diff --git a/data/ibus.schemas.in b/data/ibus.schemas.in index 4695d0b..aa66aa5 100644 --- a/data/ibus.schemas.in +++ b/data/ibus.schemas.in @@ -18,7 +18,7 @@ ibus list string - [Control+space,Zenkaku_Hankaku,Alt+Zenkaku_Hankaku,Alt+grave,Hangul,Alt+Release+Alt_R] + [Control+space,Zenkaku_Hankaku,Alt+Kanji,Alt+grave,Hangul,Alt+Release+Alt_R] Trigger shortcut keys The shortcut keys for turning input method on or off diff --git a/setup/keyboardshortcut.py b/setup/keyboardshortcut.py index 58d15ee..bde6f50 100644 --- a/setup/keyboardshortcut.py +++ b/setup/keyboardshortcut.py @@ -235,16 +235,19 @@ class KeyboardShortcutSelection(gtk.VBox): dlg.set_markup(message) dlg.set_title(_("Please press a key (or a key combination)")) - def __key_release_event(d, k, out): + def __key_press_event(d, k, out): out.append(k.copy()) + + def __key_release_event(d, k, out): d.response(gtk.RESPONSE_OK) - dlg.connect("key-release-event", __key_release_event, out) + dlg.connect("key-press-event", __key_press_event, out) + dlg.connect("key-release-event", __key_release_event, None) id = dlg.run() dlg.destroy() if id != gtk.RESPONSE_OK or not out: return - keyevent = out[0] + keyevent = out[len(out) - 1] state = keyevent.state & (gdk.CONTROL_MASK | \ gdk.SHIFT_MASK | \ gdk.MOD1_MASK | \