Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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