@pcworld commented on this pull request.


In vimode/src/keypress.c:

> + * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include "keypress.h"
+#include "utils.h"
+
+#include <gdk/gdkkeysyms.h>
+
+KeyPress *kp_from_event_key(GdkEventKey *ev)
+{
+	guint mask = GDK_MODIFIER_MASK & ~(GDK_SHIFT_MASK | GDK_LOCK_MASK | GDK_CONTROL_MASK);
+	KeyPress *kp;
+
+	if (ev->state & mask)
+		return NULL;

I found the cause of my issue with vimode not recognizing keypresses. I have num lock enabled, which maps to GDK_MOD2_MASK in GDK in X11 (in my configuration at least). The following patch fixes it for me, however an even less restrictive mask might be appropriate in order to avoid further false positives:

--- a/vimode/src/keypress.c
+++ b/vimode/src/keypress.c
@@ -23,7 +23,7 @@
 
 KeyPress *kp_from_event_key(GdkEventKey *ev)
 {
-       guint mask = GDK_MODIFIER_MASK & ~(GDK_SHIFT_MASK | GDK_LOCK_MASK | GDK_CONTROL_MASK);
+       guint mask = GDK_MODIFIER_MASK & ~(GDK_SHIFT_MASK | GDK_LOCK_MASK | GDK_CONTROL_MASK | GDK_MOD2_MASK);
        KeyPress *kp;
 
        if (ev->state & mask)


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.