Branch: refs/heads/master Author: Jiří Techet techet@gmail.com Committer: Jiří Techet techet@gmail.com Date: Sun, 07 May 2023 19:05:17 UTC Commit: 20a0343120e7cee1366d1cd74c14d53eb9d62f7c https://github.com/geany/geany-plugins/commit/20a0343120e7cee1366d1cd74c14d5...
Log Message: ----------- vimode: fix escape not working when numlock is on
It seems that GDK_MOD2_MASK isn't the right modifier to check for command pressed - its mapping is platform-specific and while this works on macOS, it has undesirable side-effects on linux. Use GDK_META_MASK instead which based on my testing seems to do the right thing both on macOS and linux.
Modified Paths: -------------- vimode/src/keypress.c
Modified: vimode/src/keypress.c 2 lines changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -26,7 +26,7 @@ KeyPress *kp_from_event_key(GdkEventKey *ev) KeyPress *kp;
/* ignore keypresses containing Alt and Command on macOS - no Vim command uses them */ - if (ev->state & (GDK_MOD1_MASK | GDK_MOD2_MASK)) + if (ev->state & (GDK_MOD1_MASK | GDK_META_MASK)) return NULL;
switch (ev->keyval)
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).