From 46408eec17536c86751cd428fdf5a84022ef3935 Mon Sep 17 00:00:00 2001 From: yuchan Date: Wed, 12 Nov 2025 11:07:14 +0900 Subject: [PATCH] Fix: Use KeyBinding instead of hardcoded K key in command window --- src/main/java/com/steve/ai/client/SteveOverlayScreen.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/steve/ai/client/SteveOverlayScreen.java b/src/main/java/com/steve/ai/client/SteveOverlayScreen.java index cfbf088..54256ab 100644 --- a/src/main/java/com/steve/ai/client/SteveOverlayScreen.java +++ b/src/main/java/com/steve/ai/client/SteveOverlayScreen.java @@ -27,8 +27,10 @@ public void render(GuiGraphics graphics, int mouseX, int mouseY, float partialTi @Override public boolean keyPressed(int keyCode, int scanCode, int modifiers) { - // K key to close - if (keyCode == 75 && !hasShiftDown() && !hasControlDown() && !hasAltDown()) { // K + // Check if the pressed key matches the configured TOGGLE_GUI key binding + // This now respects user's key configuration instead of hardcoded K key + if (KeyBindings.TOGGLE_GUI != null && + KeyBindings.TOGGLE_GUI.matches(keyCode, scanCode) && !hasShiftDown() && !hasControlDown() && !hasAltDown()) { // K SteveGUI.toggle(); if (minecraft != null) { minecraft.setScreen(null);