fix(common): avoid duplicate key input coming from phyiscal buttons

This commit is contained in:
2026-02-24 00:17:10 +01:00
parent 8456fc0bd9
commit 6816f173eb
5 changed files with 6 additions and 2 deletions

View File

@@ -6,6 +6,7 @@ const props = defineProps<{
opacity?: number;
bLabel: string;
aLabel: string;
noKeyboardA?: boolean;
}>();
const emit = defineEmits<{
@@ -135,9 +136,8 @@ useKeyDown(({ key, repeated }) => {
switch (key) {
case "NDS_START":
case "NDS_A":
emit("activateA");
if (!props.noKeyboardA) emit("activateA");
break;
case "NDS_B":
emit("activateB");
break;