mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-25 16:14:36 +00:00
fix: Correctly handles unbound keybinds (#2854)
Resolves #2652 #2291 ## Description: Resolves a regression after a new design changes where keybinds explicitly set to "Null" were incorrectly reverted to default values instead of remaining unbound. Updates the input handler to preserve "Null" as the designated value for an unbound key. The UI now reflects this by displaying "None" for keybinds that are set to "Null", providing clear user feedback. Before/After: <img width="378" height="371" alt="image" src="https://github.com/user-attachments/assets/d1d640f2-93aa-47f1-be8e-7d8c68183aa1" /> <img width="379" height="370" alt="image" src="https://github.com/user-attachments/assets/f0512cce-c6e9-4180-9517-7669aed76f6f" /> ## Please complete the following: - [x] I have added screenshots for all UI updates - [x] I process any text displayed to the user through translateText() and I've added it to the en.json file - [x] I have added relevant tests to the test directory - [x] I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced ## Please put your Discord username so you can be contacted if a bug or regression is found: webdev.js Co-authored-by: antigrid <Stepan.Hembarovskyi@Inu.edu.ua>
This commit is contained in:
committed by
GitHub
parent
a4209912a7
commit
97fffaf49e
@@ -78,7 +78,7 @@ export class SettingKeybind extends LitElement {
|
||||
}
|
||||
|
||||
private displayKey(key: string): string {
|
||||
if (!key) return translateText("user_setting.press_a_key");
|
||||
if (!key || key === "Null") return translateText("common.none");
|
||||
return formatKeyForDisplay(key);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user