Skip to content

Why is event input of type std::string and not char? #374

Answered by ArthurSonzogni
atinba asked this question in Q&A
Discussion options

You must be logged in to vote

UTF8 characters can take up to 4 char.
Also, an event can be some mouse event, which can take 11 char.

You can try the example:
https://arthursonzogni.com/FTXUI/examples/?file=component/print_key_press

It prints on the left, the array of char the terminal sent us.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by atinba
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants