Keep notebook rename keys out of inventory shortcuts
Build / build (push) Canceled after 0s

This commit is contained in:
dnorberg committed 2026-09-24 04:27:51 -04:00
1 parent dc5157f973
commit 143da0a940
2 files changed
+13 -3

No files matched your search

@@ -163,8 +163,18 @@ public final class NotebookScreen extends AbstractContainerScreen<NotebookMenu>
@Override
public boolean keyPressed(int keyCode, int scanCode, int modifiers) {
if (renaming && textInput.isFocused() && (keyCode == 257 || keyCode == 335)) {
finishRename();
if (textInput.isFocused()) {
if (renaming && (keyCode == 257 || keyCode == 335)) {
finishRename();
} else if (keyCode == 256) {
if (renaming) finishRename();
setFocused(null);
textInput.setFocused(false);
} else {
textInput.keyPressed(keyCode, scanCode, modifiers);
}
// EditBox does not consume ordinary letter key presses; the matching charTyped
// event handles text input. Do not pass them to the container's inventory keys.
return true;
}
if (!textInput.isFocused() && keyCode == 82 && selectedSlot >= 0) {