From 1bbfd0b6d26e5fd683e5e103feb35802e4ac595f Mon Sep 17 00:00:00 2001 From: Kahrl Date: Mon, 12 Sep 2011 23:26:57 +0200 Subject: [PATCH] Different implementation of KeyPress::operator== Fixes some key mapping issues. --- src/keycode.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/keycode.h b/src/keycode.h index 28fb3f1f..51d9adf7 100644 --- a/src/keycode.h +++ b/src/keycode.h @@ -36,7 +36,8 @@ public: bool operator==(const KeyPress &o) const { - return valid_kcode(Key) ? Key == o.Key : Char == o.Char; + return (Char > 0 && Char == o.Char) || + (valid_kcode(Key) && Key == o.Key); } const char *sym() const; -- 2.30.2