From 4dc1a9fff94527a1acffb60f874d8800aecb7217 Mon Sep 17 00:00:00 2001 From: Arthur Sonzogni Date: Wed, 14 Dec 2022 22:09:25 +0100 Subject: [PATCH] Fix mouse on support over PuTTY (#525) This resolves: https://github.com/ArthurSonzogni/FTXUI/issues/523 --- src/ftxui/component/screen_interactive.cpp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/ftxui/component/screen_interactive.cpp b/src/ftxui/component/screen_interactive.cpp index 71762ce..4d0e193 100644 --- a/src/ftxui/component/screen_interactive.cpp +++ b/src/ftxui/component/screen_interactive.cpp @@ -252,10 +252,15 @@ const std::string CSI = "\x1b["; // NOLINT // DEC: Digital Equipment Corporation enum class DECMode { kLineWrap = 7, - kMouseX10 = 9, kCursor = 25, + + kMouseX10 = 9, kMouseVt200 = 1000, + kMouseVt200Highlight = 1001, + + kMouseBtnEventMouse = 1002, kMouseAnyEvent = 1003, + kMouseUtf8 = 1005, kMouseSgrExtMode = 1006, kMouseUrxvtMode = 1015, @@ -568,12 +573,10 @@ void ScreenInteractive::Install() { DECMode::kLineWrap, }); - enable({ - // DECMode::kMouseVt200, - DECMode::kMouseAnyEvent, - DECMode::kMouseUtf8, - DECMode::kMouseSgrExtMode, - }); + enable({DECMode::kMouseVt200}); + enable({DECMode::kMouseAnyEvent}); + enable({DECMode::kMouseUrxvtMode}); + enable({DECMode::kMouseSgrExtMode}); // After installing the new configuration, flush it to the terminal to // ensure it is fully applied: