Fix mouse on support over PuTTY (#525)

This resolves:
https://github.com/ArthurSonzogni/FTXUI/issues/523
This commit is contained in:
Arthur Sonzogni 2022-12-14 22:09:25 +01:00 committed by GitHub
parent b9f51844c3
commit 4dc1a9fff9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -252,10 +252,15 @@ const std::string CSI = "\x1b["; // NOLINT
// DEC: Digital Equipment Corporation // DEC: Digital Equipment Corporation
enum class DECMode { enum class DECMode {
kLineWrap = 7, kLineWrap = 7,
kMouseX10 = 9,
kCursor = 25, kCursor = 25,
kMouseX10 = 9,
kMouseVt200 = 1000, kMouseVt200 = 1000,
kMouseVt200Highlight = 1001,
kMouseBtnEventMouse = 1002,
kMouseAnyEvent = 1003, kMouseAnyEvent = 1003,
kMouseUtf8 = 1005, kMouseUtf8 = 1005,
kMouseSgrExtMode = 1006, kMouseSgrExtMode = 1006,
kMouseUrxvtMode = 1015, kMouseUrxvtMode = 1015,
@ -568,12 +573,10 @@ void ScreenInteractive::Install() {
DECMode::kLineWrap, DECMode::kLineWrap,
}); });
enable({ enable({DECMode::kMouseVt200});
// DECMode::kMouseVt200, enable({DECMode::kMouseAnyEvent});
DECMode::kMouseAnyEvent, enable({DECMode::kMouseUrxvtMode});
DECMode::kMouseUtf8, enable({DECMode::kMouseSgrExtMode});
DECMode::kMouseSgrExtMode,
});
// After installing the new configuration, flush it to the terminal to // After installing the new configuration, flush it to the terminal to
// ensure it is fully applied: // ensure it is fully applied: