From f6d5dfde1528093fc7f3a0877a7b1c009698012e Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Sun, 19 Jun 2022 11:38:57 -0700 Subject: [PATCH] keyboard: fix key up events in neovim + kitty keyboard protocol refs: https://github.com/wez/wezterm/issues/1141 --- termwiz/src/input.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/termwiz/src/input.rs b/termwiz/src/input.rs index 3b8bc44a0..6e955fe63 100644 --- a/termwiz/src/input.rs +++ b/termwiz/src/input.rs @@ -326,6 +326,10 @@ impl KeyCode { ) -> Result { use KeyCode::*; + if !flags.contains(KittyKeyboardFlags::REPORT_EVENT_TYPES) && !is_down { + return Ok(String::new()); + } + // Normalize let key = match self { Char('\r') => Enter,