[geany/geany-plugins] c22f69: vimode: ignore key-presses containing command on macOS

Jiří Techet git-noreply at xxxxx
Wed Sep 29 17:11:30 UTC 2021

Branch:      refs/heads/master
Author:      Jiří Techet <techet at gmail.com>
Committer:   Jiří Techet <techet at gmail.com>
Date:        Fri, 13 Aug 2021 22:04:57 UTC
Commit:      c22f69f3c8452039058f1844b5dffc00de226c97

Log Message:
vimode: ignore key-presses containing command on macOS

No vi command uses the command key so we can ignore such key presses
so Geany's keybindings can be performed instead.

Fixes #991

Modified Paths:

Modified: vimode/src/keypress.c
4 lines changed, 2 insertions(+), 2 deletions(-)
@@ -25,8 +25,8 @@ KeyPress *kp_from_event_key(GdkEventKey *ev)
 	KeyPress *kp;
-	/* ignore keypresses containing Alt - no Vim command uses it */
-	if (ev->state & GDK_MOD1_MASK)
+	/* ignore keypresses containing Alt and Command on macOS - no Vim command uses them */
+	if (ev->state & (GDK_MOD1_MASK | GDK_MOD2_MASK))
 		return NULL;
 	switch (ev->keyval)

This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).

More information about the Plugins-Commits mailing list