Correct key names based on keyboard layout

This commit is contained in:
Anuken
2026-02-04 21:34:19 -05:00
parent 82dfc3eba3
commit 05771f4337
2 changed files with 6 additions and 3 deletions
@@ -97,7 +97,7 @@ public class KeybindDialog extends Dialog{
table.labelWrap(() -> {
Axis axis = keybind.value;
return axis.key != null ? axis.key.toString() : axis.min + " [red]/[] " + axis.max;
return axis.key != null ? axis.key.getName() : axis.min.getName() + " [red]/[] " + axis.max.getName();
}).color(Pal.accent).left().minWidth(90).fillX().padRight(20);
table.button("@settings.rebind", tstyle, () -> {
@@ -107,7 +107,10 @@ public class KeybindDialog extends Dialog{
}).size(bw, bh);
}else{
table.add(bundle.get("keybind." + keybind.name + ".name", Strings.capitalize(keybind.name)), Color.white).left().padRight(40).padLeft(8);
table.label(() -> keybind.value.key.toString()).color(Pal.accent).left().minWidth(90).padRight(20);
table.add(keybind.value.key.getName()).update(l -> {
l.setText(keybind.value.key.getName());
l.setColor(keybind.value.key == KeyCode.unset ? Color.darkGray : Pal.accent);
}).color(Pal.accent).left().minWidth(90).padRight(20);
table.button("@settings.rebind", tstyle, () -> {
rebindAxis = false;