Move the cursor to the input location.

Most CJK users use IME (input method) to type CJK characters. They need
the cursor to be at the correct location, not in the bottom right
corner.

This CL does:
 * Move the cursor the focus() element.
 * Hide the cursor (and show it at exit)
 * Intercept SIGINT to guarantee proper cleanup all the time.

This should fix the second issue mentionned on:
https://github.com/ArthurSonzogni/FTXUI/issues/2
This commit is contained in:
ArthurSonzogni
2019-06-29 18:52:58 +02:00
parent 38df095b4a
commit 86c3b60a6f
6 changed files with 85 additions and 30 deletions

View File

@@ -44,6 +44,9 @@ class ScreenInteractive : public Screen {
std::mutex events_queue_mutex;
std::queue<Event> events_queue;
std::atomic<bool> quit_ = false;
std::string set_cursor_position;
std::string reset_cursor_position;
};
} // namespace ftxui