Branch: refs/heads/master Author: Jiří Techet techet@gmail.com Committer: Jiří Techet techet@gmail.com Date: Wed, 06 May 2020 16:53:52 UTC Commit: c9e4c59676ad7f8e2821f2672ab6a7815c1a0215 https://github.com/geany/geany-plugins/commit/c9e4c59676ad7f8e2821f2672ab6a7...
Log Message: ----------- vimode: Correctly ignore unwanted modifiers
Use gtk_accelerator_get_default_mod_mask() which should ignore caps lock and num lock keys for us.
Fixes #941.
Modified Paths: -------------- vimode/src/cmd-runner.c vimode/src/excmd-prompt.c
Modified: vimode/src/cmd-runner.c 2 lines changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -431,7 +431,7 @@ static gboolean is_cmdpart(GSList *kpl, CmdDef *cmds)
static gboolean is_printable(GSList *kpl) { - guint mask = GDK_MODIFIER_MASK & ~(GDK_SHIFT_MASK | GDK_LOCK_MASK); + guint mask = gtk_accelerator_get_default_mod_mask() & ~GDK_SHIFT_MASK; KeyPress *kp = g_slist_nth_data(kpl, 0);
if (kp->modif & mask)
Modified: vimode/src/excmd-prompt.c 2 lines changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -71,7 +71,7 @@ static void set_prompt_text(const gchar *val) static gboolean on_prompt_key_press_event(GtkWidget *widget, GdkEventKey *event, gpointer dummy) { const gchar *text = gtk_entry_get_text(GTK_ENTRY(entry)); - guint modif_mask = GDK_MODIFIER_MASK & ~GDK_LOCK_MASK; + guint modif_mask = gtk_accelerator_get_default_mod_mask();
ignore_change = FALSE;
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).