fix(nds): input fighting

This commit is contained in:
2026-02-25 23:57:37 +01:00
parent 2d39c7bebd
commit ea2547425a
3 changed files with 7 additions and 8 deletions

View File

@@ -13,12 +13,10 @@ export const useKeyDown = (callback: KeyDownCallback) => {
if (app.lagDetected) return;
const ndsButton = mapCodeToNDS(event.code);
if (
ndsButton &&
document.activeElement &&
document.activeElement !== document.body
)
return;
if (ndsButton && document.activeElement && document.activeElement !== document.body) {
(document.activeElement as HTMLElement).blur();
}
callback({
key: ndsButton ? `NDS_${ndsButton}` : event.key,
ndsButton,