Enable raw keyboard input (#832)

In order for applications to receive all keyboard inputs, including the
Ctrl-C and Ctrl-Z, the raw input mode has been enabled. As result the
SIGINT will no longer be used, instead the keyboard Ctrl-C event is used
for exiting the framework, but only if no components has made use of it.

Co-authored-by: Jørn Gustav Larsen <jgl@fasttracksoftware.com>
Co-authored-by: ArthurSonzogni <sonzogniarthur@gmail.com>
This commit is contained in:
Jørn Gustav Larsen
2024-04-28 15:17:54 +02:00
committed by GitHub
parent d38b14ffb6
commit d386df6f94
15 changed files with 643 additions and 202 deletions

View File

@@ -10,17 +10,16 @@
#include <utility> // for pair
#include "ftxui/screen/image.hpp"
#include "ftxui/screen/string.hpp" // for string_width
#include "ftxui/screen/string.hpp" // for string_width
namespace ftxui {
namespace
{
Pixel& dev_null_pixel() {
static Pixel pixel;
return pixel;
}
namespace {
Pixel& dev_null_pixel() {
static Pixel pixel;
return pixel;
}
} // namespace
Image::Image(int dimx, int dimy)
: stencil{0, dimx - 1, 0, dimy - 1},