From 1bbfd0b6d26e5fd683e5e103feb35802e4ac595f Mon Sep 17 00:00:00 2001 From: Kahrl Date: Mon, 12 Sep 2011 23:26:57 +0200 Subject: Different implementation of KeyPress::operator== Fixes some key mapping issues. --- src/keycode.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/keycode.h b/src/keycode.h index 28fb3f1fb..51d9adf72 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; -- cgit v1.2.3