aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/keycode.h3
1 files changed, 2 insertions, 1 deletions
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;