useHeroRender

This commit is contained in:
2025-10-19 02:30:50 +01:00
parent f302c67778
commit 310355104a
4 changed files with 82 additions and 5 deletions
+2 -2
View File
@@ -56,7 +56,7 @@ export const useKeyBindings = ({ cursor, gameStatus }: UseKeyBindingsParams) =>
return;
}
const isDigit = ev.key >= "0" && e.key <= "9";
const isDigit = ev.key >= "0" && ev.key <= "9";
if (isDigit) {
if (ev.key === "0" && cursor.getCount() === "") return;
recordKey(ev.key);
@@ -71,7 +71,7 @@ export const useKeyBindings = ({ cursor, gameStatus }: UseKeyBindingsParams) =>
}
if (ev.key === "^" || ev.key === "$") {
recordKey(e.key);
recordKey(ev.key);
cursor.resetCount();
if (ev.key === "^") {
cursor.moveToStart();