From 8a2b8a94980441ee5a6271ac50d15e4081562b0b Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Wed, 16 Aug 2017 00:40:45 +0700 Subject: [PATCH] Do not consider the 8th bit to mean Alt on keys that are mouse events Fix handling of mouse events for columns 128 to 223, we are still limited by ncurses for columns > 223. Fixes #1532 --- src/input_handler.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/input_handler.cc b/src/input_handler.cc index 74102279..797719f9 100644 --- a/src/input_handler.cc +++ b/src/input_handler.cc @@ -209,7 +209,8 @@ public: // Hack to parse keys sent by terminals using the 8th bit to mark the // meta key. In normal mode, give priority to a potential alt-key than // the accentuated character. - if (key.key >= 127 and key.key < 256) + if (not (key.modifiers & Key::Modifiers::MouseEvent) and + key.key >= 127 and key.key < 256) { key.modifiers |= Key::Modifiers::Alt; key.key &= 0x7f;