mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-09-17 16:38:09 +08:00
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:

committed by
GitHub

parent
d38b14ffb6
commit
d386df6f94
@@ -391,9 +391,9 @@ Screen::Screen(int dimx, int dimy) : Image{dimx, dimy} {
|
||||
#if defined(_WIN32)
|
||||
// The placement of this call is a bit weird, however we can assume that
|
||||
// anybody who instantiates a Screen object eventually wants to output
|
||||
// something to the console. If that is not the case, use an instance of Image instead.
|
||||
// As we require UTF8 for all input/output operations we will just switch to
|
||||
// UTF8 encoding here
|
||||
// something to the console. If that is not the case, use an instance of Image
|
||||
// instead. As we require UTF8 for all input/output operations we will just
|
||||
// switch to UTF8 encoding here
|
||||
SetConsoleOutputCP(CP_UTF8);
|
||||
SetConsoleCP(CP_UTF8);
|
||||
WindowsEmulateVT100Terminal();
|
||||
|
Reference in New Issue
Block a user