From 5f624431f1711b5f08a364cdb0f39649f42e6b5a Mon Sep 17 00:00:00 2001 From: ArthurSonzogni Date: Tue, 21 Jul 2020 19:04:43 +0200 Subject: [PATCH] Set the correct key for "return" on Window. This is related to: https://github.com/ArthurSonzogni/FTXUI/issues/27 --- src/ftxui/component/event.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ftxui/component/event.cpp b/src/ftxui/component/event.cpp index f595846..b0222cc 100644 --- a/src/ftxui/component/event.cpp +++ b/src/ftxui/component/event.cpp @@ -166,7 +166,11 @@ Event Event::ArrowDown = Event::Special("\x1B[B"); Event Event::Backspace = Event::Special({127}); Event Event::Delete = Event::Special("\x1B[3~"); Event Event::Escape = Event::Special("\x1B"); +#if defined(_WIN32) +Event Event::Return = Event::Special({13}); +#else Event Event::Return = Event::Special({10}); +#endif Event Event::Tab = Event::Special({9}); Event Event::TabReverse = Event::Special({27, 91, 90}); Event Event::F1 = Event::Special("\x1B[OP");