This PR aims to fix a bug with chat: if two keys are pressed simultaneously, chimera replays the first input instead.
The issue is that Halo stores an array of buffered input (up to 64), but chimera was only ever referencing the first element of the array.
_static bool ignore_nextkey was a symptom of this, as entering backspace would result in input in the following order:
character = 0xFF, key_code = 0x1D
character = 0x08, key_code = 0xFF
Since the second input replays the first, every time the user hit backspace chimera would see two special backspace characters, thus requiring that every other backspace chimera saw be dropped.
Therefore, this PR also makes changes to prevent control characters (as determined by std::iscntrl) from being inserted into chat_input_buffer and removes the ignore_next_key adjustment.
This PR aims to fix a bug with chat: if two keys are pressed simultaneously, chimera replays the first input instead. The issue is that Halo stores an array of buffered input (up to 64), but chimera was only ever referencing the first element of the array. _static bool ignore_nextkey was a symptom of this, as entering backspace would result in input in the following order:
Since the second input replays the first, every time the user hit backspace chimera would see two special backspace characters, thus requiring that every other backspace chimera saw be dropped. Therefore, this PR also makes changes to prevent control characters (as determined by
std::iscntrl
) from being inserted intochat_input_buffer
and removes theignore_next_key
adjustment.