[Github-comments] [geany/geany] Normalise key events when creating/processing keybindings (#1633)

Jiří Techet notifications at xxxxx
Tue Oct 10 08:55:06 UTC 2017


techee commented on this pull request.



> @@ -1633,8 +1633,14 @@ static gboolean prefs_dialog_key_press_response_cb(GtkWidget *dialog, GdkEventKe
 												   gpointer data)
 {
 	GeanyKeyBinding *kb = keybindings_lookup_item(GEANY_KEY_GROUP_HELP, GEANY_KEYS_HELP_HELP);
+	guint state, keyval;
+
+	if (event->keyval == 0)
+		return FALSE;
+
+	keybindings_get_normalised_event(event, &state, &keyval);

One should probably check for the "legacy" keybindings with extra modifiers here too but I'm not sure the code should be uglyfied because of that. It's just a single keybinding used in a single specific case so I think it's not worth it.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/1633#pullrequestreview-68207812
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20171010/6b35cc26/attachment.html>


More information about the Github-comments mailing list