From: Philip Chimento Date: Sun, 2 May 2010 20:11:17 +0000 (+0000) Subject: Fixed bug: modifier keys no longer count as char input X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;h=a42172b750d8736150de2843f11601b694c0d001;p=rodin%2Fchimara.git Fixed bug: modifier keys no longer count as char input git-svn-id: http://lassie.dyndns-server.com/svn/gargoyle-gtk@261 ddfedd41-794f-dd11-ae45-00112f111e67 --- diff --git a/libchimara/input.c b/libchimara/input.c index 8b6d4c2..a4511dc 100644 --- a/libchimara/input.c +++ b/libchimara/input.c @@ -417,6 +417,11 @@ on_shutdown_key_press_event(GtkWidget *widget, GdkEventKey *event, winid_t win) gboolean on_char_input_key_press_event(GtkWidget *widget, GdkEventKey *event, winid_t win) { + /* Ignore modifier keys, otherwise the char input will already trigger on + the shift key when the user tries to type a capital letter */ + if(event->is_modifier) + return FALSE; /* don't stop the event */ + glui32 keycode = keyval_to_glk_keycode(event->keyval, win->input_request_type == INPUT_REQUEST_CHARACTER_UNICODE); ChimaraGlk *glk = CHIMARA_GLK(gtk_widget_get_ancestor(widget, CHIMARA_TYPE_GLK));