fix(KeyCommon): useless pointerId of KeyMacro

This commit is contained in:
AkiChase 2024-05-07 11:06:41 +08:00
parent a20ce2cef8
commit 6cd83e93fd
3 changed files with 8 additions and 3 deletions

View File

@ -222,7 +222,7 @@ function showSetting() {
@update:value="keyboardStore.edited = true" @update:value="keyboardStore.edited = true"
/> />
</NFormItem> </NFormItem>
<NFormItem label="触点ID"> <NFormItem v-if="keyMapping.type !== 'Macro'" label="触点ID">
<NInputNumber <NInputNumber
v-model:value="keyMapping.pointerId" v-model:value="keyMapping.pointerId"
:min="0" :min="0"

View File

@ -1179,7 +1179,7 @@ function applyKeyMappingConfigShortcuts(
); );
break; break;
default: default:
console.error("Invalid item type: ", item.type); console.error("Invalid item type: ", item);
break; break;
} }
} }

View File

@ -66,8 +66,13 @@ type KeyMacroList = Array<{
type: KeyMacroType; type: KeyMacroType;
args: KeyMacroArgs; args: KeyMacroArgs;
}> | null; }> | null;
interface KeyMacro extends Key {
interface KeyMacro {
type: "Macro";
key: string; key: string;
note: string;
posX: number;
posY: number;
macro: { macro: {
down: KeyMacroList; down: KeyMacroList;
loop: KeyMacroList; loop: KeyMacroList;