Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
JTK222 committed Oct 31, 2024
1 parent 35a652c commit eb6ac36
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.client.option.KeyBinding;
import net.minecraft.client.util.InputUtil;

import org.lwjgl.glfw.GLFW;

@Environment(EnvType.CLIENT)
public class KeyHandler {
public static final KeyBinding ATLAS_KEYMAPPING = new KeyBinding("key.openatlas.desc", InputUtil.Type.KEYSYM, 77, "key.antiqueatlas.category");
public static final KeyBinding ATLAS_KEYMAPPING = new KeyBinding("key.openatlas.desc", InputUtil.Type.KEYSYM, GLFW.GLFW_KEY_M, "key.antiqueatlas.category");

public static void registerBindings() {
KeyMappingRegistry.register(ATLAS_KEYMAPPING);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,7 @@ public boolean keyPressed(int keyCode, int scanCode, int modifiers) {
setMapScale(mapScale * 2);
} else if (keyCode == GLFW.GLFW_KEY_MINUS || keyCode == GLFW.GLFW_KEY_KP_SUBTRACT) {
setMapScale(mapScale / 2);
} else if (keyCode == GLFW.GLFW_KEY_ESCAPE) {
} else if (keyCode == GLFW.GLFW_KEY_ESCAPE || (AntiqueAtlasMod.CONFIG.itemNeeded &&KeyHandler.ATLAS_KEYMAPPING.matchesKey(keyCode, scanCode))) {
close();
} else {
KeyBinding[] hotbarKeys = MinecraftClient.getInstance().options.hotbarKeys;
Expand Down

0 comments on commit eb6ac36

Please sign in to comment.