1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-09-05 11:57:56 +00:00

Ignore unrepresentable characters when typing

In 94ad6dab0e, we changed it so typing
characters outside of CC's codepage were replaced with '?' rather than
ignored. This can be quite annoying for non-European users (where latin1
isn't very helpful!), so it makes sense to revert this change.

See discussion in #860 for more context.
This commit is contained in:
Jonathan Coates
2025-02-12 18:41:45 +00:00
parent 88cb03be6b
commit 0f123b5efd
3 changed files with 16 additions and 14 deletions

View File

@@ -51,7 +51,7 @@ public class InputState {
public void onCharEvent(int codepoint) {
var terminalChar = StringUtil.unicodeToTerminal(codepoint);
if (StringUtil.isTypableChar(terminalChar)) ComputerEvents.charTyped(computer, terminalChar);
if (StringUtil.isTypableChar(terminalChar)) ComputerEvents.charTyped(computer, (byte) terminalChar);
}
public void onKeyEvent(long window, int key, int action, int modifiers) {