feat(nds): case insensitive input
This commit is contained in:
@@ -217,7 +217,7 @@ const keyToButton: Record<string, string> = {
|
||||
};
|
||||
|
||||
useKeyDown((key) => {
|
||||
const button = keyToButton[key];
|
||||
const button = keyToButton[key.toLowerCase()];
|
||||
if (button) {
|
||||
physicalButtonsDown.add(button);
|
||||
window.dispatchEvent(
|
||||
@@ -227,7 +227,7 @@ useKeyDown((key) => {
|
||||
});
|
||||
|
||||
useKeyUp((key) => {
|
||||
const button = keyToButton[key];
|
||||
const button = keyToButton[key.toLowerCase()];
|
||||
if (button) {
|
||||
physicalButtonsDown.delete(button);
|
||||
window.dispatchEvent(new KeyboardEvent("keyup", { key: `NDS_${button}` }));
|
||||
|
||||
Reference in New Issue
Block a user