Different implementation of KeyPress::operator==

Fixes some key mapping issues.
This commit is contained in:
Kahrl 2011-09-12 23:26:57 +02:00 committed by Perttu Ahola
parent 4547ace59a
commit 1bbfd0b6d2

@ -36,7 +36,8 @@ public:
bool operator==(const KeyPress &o) const 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; const char *sym() const;