fix backspace not working
@@ -112,10 +112,12 @@ public class CheckPasswordScreen extends Screen {
@Override
public boolean keyPressed(int keyCode, int scanCode, int modifiers) {
- if (!super.keyPressed(keyCode, scanCode, modifiers)) {
+ boolean isBackspace = keyCode == GLFW.GLFW_KEY_BACKSPACE;
+
+ if (isBackspace || !super.keyPressed(keyCode, scanCode, modifiers)) {
if (minecraft.options.keyInventory.isActiveAndMatches(InputConstants.getKey(keyCode, scanCode)))
onClose();
- else if (keyCode == GLFW.GLFW_KEY_BACKSPACE && currentString.length() > 0) {
+ else if (isBackspace && currentString.length() > 0) {
Minecraft.getInstance().player.playSound(SoundEvents.UI_BUTTON_CLICK.get(), 0.15F, 1.0F);
removeLastCharacter();
}
