Different implementation of KeyPress::operator==

Fixes some key mapping issues.
master
Kahrl 2011-09-12 23:26:57 +02:00 committed by Perttu Ahola
parent 4547ace59a
commit 1bbfd0b6d2
1 changed files with 2 additions and 1 deletions

View File

@ -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;