fix(nds): input fighting
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user