Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
f651c23
add keyboard hud element
noramibu Jan 11, 2026
5f6ed04
rewrite custom keys to use a setting type
crosby-moe Jan 11, 2026
7d2a04b
slight cleanup
crosby-moe Jan 11, 2026
2984546
fix for negative offsets
noramibu Jan 11, 2026
f4d6ab5
keyboard preset
crosby-moe Jan 12, 2026
f771e92
map more keyboard buttons
crosby-moe Jan 12, 2026
bab4d91
optimizations, cleanups, and cleandowns
crosby-moe Jan 12, 2026
ed8bf3c
refactor keyboard preset
noramibu Jan 12, 2026
c2c1259
added border, fixed rainbow
noramibu Jan 12, 2026
0995f7b
color fade & optimize color handling
crosby-moe Jan 12, 2026
bff5530
update rainbow colors
crosby-moe Jan 12, 2026
8ba0c66
improve keyboard row scaling algorithm
crosby-moe Jan 12, 2026
6387dd9
use event handling to register inputs
crosby-moe Jan 12, 2026
9f0858e
use `LongList` for the cps calculator
crosby-moe Jan 12, 2026
06303b1
default to without borders
crosby-moe Jan 12, 2026
103770f
solve issues
crosby-moe Jan 12, 2026
2f05653
added keyboard layouts
noramibu Jan 12, 2026
2b1c1e8
More improvements
Big-Iron-Cheems Jan 13, 2026
383ca3f
Use LayoutContext and KeyDimensions in all presets
Big-Iron-Cheems Jan 14, 2026
d1107dd
Better key positioning for new Custom keys
Big-Iron-Cheems Jan 14, 2026
8012739
Improve Key ctors
Big-Iron-Cheems Jan 14, 2026
6c7cebd
USe `getLast()`
Big-Iron-Cheems Jan 14, 2026
e9a6080
small refactors
Wide-Cat Feb 8, 2026
cc09cb8
Merge branch 'MeteorDevelopment:master' into keyboard-hud
noramibu Feb 8, 2026
d4c5c9f
fix KeyboardHud text scaling and centering
noramibu Feb 8, 2026
6d5cf6f
add cps option for all presets
noramibu Feb 8, 2026
8bd2bbe
Adjust padding
Wide-Cat Feb 8, 2026
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 @@ -22,6 +22,7 @@
import meteordevelopment.meteorclient.gui.widgets.pressable.WPlus;
import meteordevelopment.meteorclient.renderer.Fonts;
import meteordevelopment.meteorclient.settings.*;
import meteordevelopment.meteorclient.systems.hud.elements.keyboard.KeyboardHud;
import meteordevelopment.meteorclient.utils.Utils;
import meteordevelopment.meteorclient.utils.render.color.SettingColor;
import net.minecraft.client.resource.language.I18n;
Expand Down Expand Up @@ -71,6 +72,7 @@ public DefaultSettingsWidgetFactory(GuiTheme theme) {
factories.put(ColorListSetting.class, (table, setting) -> colorListW(table, (ColorListSetting) setting));
factories.put(FontFaceSetting.class, (table, setting) -> fontW(table, (FontFaceSetting) setting));
factories.put(Vector3dSetting.class, (table, setting) -> vector3dW(table, (Vector3dSetting) setting));
factories.put(KeyboardHud.CustomKeyListSetting.class, (table, setting) -> customKeyListW(table, (KeyboardHud.CustomKeyListSetting) setting));
}

@Override
Expand Down Expand Up @@ -466,6 +468,11 @@ private WDoubleEdit addVectorComponent(WTable table, String label, double value,
return component;
}

private void customKeyListW(WTable table, KeyboardHud.CustomKeyListSetting setting) {
WTable wtable = table.add(theme.table()).expandX().widget();
KeyboardHud.fillTable(theme, wtable, setting);
}

// Other

private void selectW(WContainer c, Setting<?> setting, Runnable action) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ public void reset() {
if (Modules.get().isBinding()) {
Modules.get().setModuleToBind(null);
}
if (action != null) action.run();
}

private void refreshLabel() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import meteordevelopment.meteorclient.systems.System;
import meteordevelopment.meteorclient.systems.Systems;
import meteordevelopment.meteorclient.systems.hud.elements.*;
import meteordevelopment.meteorclient.systems.hud.elements.keyboard.KeyboardHud;
import meteordevelopment.meteorclient.systems.hud.screens.HudEditorScreen;
import meteordevelopment.meteorclient.utils.Utils;
import meteordevelopment.meteorclient.utils.misc.Keybind;
Expand Down Expand Up @@ -130,6 +131,7 @@ public void init() {
register(PotionTimersHud.INFO);
register(CombatHud.INFO);
register(MapHud.INFO);
register(KeyboardHud.INFO);

// Default config
if (isFirstInit) resetToDefaultElements();
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
/*
* This file is part of the Meteor Client distribution (https://github.com/MeteorDevelopment/meteor-client).
* Copyright (c) Meteor Development.
*/

package meteordevelopment.meteorclient.systems.hud.elements.keyboard;

enum KeyDimensions {
// Standard sizes
UNIT_1U(1.0),
UNIT_1_25U(1.25),
UNIT_1_5U(1.5),
UNIT_1_75U(1.75),
UNIT_2U(2.0),
UNIT_2_25U(2.25),
UNIT_2_75U(2.75),
UNIT_6_25U(6.25);

public final double units;

KeyDimensions(double units) {
this.units = units;
}

/**
* Converts this dimension to pixels, accounting for gaps.
* Multi-unit keys span gaps: 2u key = 2*baseUnit + 1*gap
*/
public double toPixels(double baseUnit, double gap) {
return units * baseUnit + (units - 1.0) * gap;
}

public double toPixels(double baseUnit) {
return units * baseUnit;
}

// Aliases for common keys
public static final KeyDimensions STANDARD = UNIT_1U;
public static final KeyDimensions TAB = UNIT_1_5U;
public static final KeyDimensions CAPS_LOCK = UNIT_1_75U;
public static final KeyDimensions ENTER_ANSI = UNIT_2_25U;
public static final KeyDimensions LEFT_SHIFT_ANSI = UNIT_2_25U;
public static final KeyDimensions RIGHT_SHIFT = UNIT_2_75U;
public static final KeyDimensions BACKSPACE = UNIT_2U;
public static final KeyDimensions LEFT_SHIFT_ISO = UNIT_1_25U;
public static final KeyDimensions ENTER_ISO_WIDTH = UNIT_1_25U;
public static final KeyDimensions ENTER_ISO_HEIGHT = UNIT_2U;
public static final KeyDimensions CTRL = UNIT_1_25U;
public static final KeyDimensions ALT = UNIT_1_25U;
public static final KeyDimensions GUI = UNIT_1_25U;
public static final KeyDimensions MENU = UNIT_1_25U;
public static final KeyDimensions SPACEBAR = UNIT_6_25U;
}
Loading