fix(common): avoid duplicate key input coming from phyiscal buttons
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user