Skip to content

Conversation

@isXander
Copy link

@isXander isXander commented Aug 7, 2025

This param is not the codepoint.

KeyboardHandler converts the codepoint into high/low surrogate and sends individual event for each. This is the snippet of that code:

	private void charTyped(long windowPointer, int codePoint, int modifiers) {
		if (windowPointer == this.minecraft.getWindow().getWindow()) {
			Screen screen = this.minecraft.screen;
			if (screen != null && this.minecraft.getOverlay() == null) {
				try {
					if (Character.isBmpCodePoint(codePoint)) {
						screen.charTyped((char)codePoint, modifiers);
					} else if (Character.isValidCodePoint(codePoint)) {
						screen.charTyped(Character.highSurrogate(codePoint), modifiers);
						screen.charTyped(Character.lowSurrogate(codePoint), modifiers);
					}

@isXander isXander requested a review from a team as a code owner August 7, 2025 18:20
@CLAassistant
Copy link

CLAassistant commented Aug 7, 2025

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants