diff --git a/src/backend/common/ConfigManager.ts b/src/backend/common/ConfigManager.ts index 1edecc2779..45ecd23737 100644 --- a/src/backend/common/ConfigManager.ts +++ b/src/backend/common/ConfigManager.ts @@ -155,6 +155,35 @@ const migrations: [string, (store: Record) => unknown][] = [ } }, ], + [ + ">=0.20", + (config) => { + // プロジェクト読み込み → プロジェクトを読み込む + const hotkeySettings = + config.hotkeySettings as ConfigType["hotkeySettings"]; + const newHotkeySettings: ConfigType["hotkeySettings"] = + hotkeySettings.map((hotkeySetting) => { + /// @ts-expect-error 名前変更なので合わない。 + if (hotkeySetting.action === "プロジェクト読み込み") { + return { + ...hotkeySetting, + action: "プロジェクトを読み込む", + }; + } + /// @ts-expect-error 名前変更なので合わない。 + if (hotkeySetting.action === "テキスト読み込む") { + return { + ...hotkeySetting, + action: "テキストを読み込む", + }; + } + return hotkeySetting; + }); + config.hotkeySettings = newHotkeySettings; + + return config; + }, + ], ]; export type Metadata = { diff --git a/src/components/Menu/MenuBar/MenuBar.vue b/src/components/Menu/MenuBar/MenuBar.vue index 8e7b072171..cd1bf1d60e 100644 --- a/src/components/Menu/MenuBar/MenuBar.vue +++ b/src/components/Menu/MenuBar/MenuBar.vue @@ -49,6 +49,8 @@ const store = useStore(); const { registerHotkeyWithCleanup } = useHotkeyManager(); const currentVersion = ref(""); +const audioKeys = computed(() => store.state.audioKeys); + // デフォルトエンジンの代替先ポート const defaultEngineAltPortTo = computed(() => { const altPortInfos = store.state.altPortInfos; @@ -316,7 +318,7 @@ const menudata = computed(() => [ }, { type: "button", - label: "プロジェクト読み込み", + label: "プロジェクトを読み込む", onClick: () => { importProject(); }, @@ -360,6 +362,18 @@ const menudata = computed(() => [ disabled: !canRedo.value, disableWhenUiLocked: true, }, + { + type: "button", + label: "全セルを選択", + onClick: async () => { + if (!uiLocked.value) { + await store.dispatch("SET_SELECTED_AUDIO_KEYS", { + audioKeys: audioKeys.value, + }); + } + }, + disableWhenUiLocked: true, + }, ...props.editSubMenuData, ], }, @@ -506,7 +520,7 @@ registerHotkeyForAllEditors({ }); registerHotkeyForAllEditors({ callback: importProject, - name: "プロジェクト読み込み", + name: "プロジェクトを読み込む", }); diff --git a/src/components/Talk/TalkEditor.vue b/src/components/Talk/TalkEditor.vue index d4c09df286..0e1064fd69 100644 --- a/src/components/Talk/TalkEditor.vue +++ b/src/components/Talk/TalkEditor.vue @@ -187,7 +187,7 @@ registerHotkeyWithCleanup({ }); registerHotkeyWithCleanup({ editor: "talk", - name: "テキスト読み込む", + name: "テキストを読み込む", callback: () => { if (!uiLocked.value) { store.dispatch("SHOW_CONNECT_AND_EXPORT_TEXT_DIALOG"); @@ -246,6 +246,18 @@ registerHotkeyWithCleanup({ } }, }); +registerHotkeyWithCleanup({ + editor: "talk", + enableInTextbox: false, + name: "全セルを選択", + callback: () => { + if (!uiLocked.value) { + store.dispatch("SET_SELECTED_AUDIO_KEYS", { + audioKeys: audioKeys.value, + }); + } + }, +}); const removeAudioItem = async () => { if (activeAudioKey.value == undefined) throw new Error(); diff --git a/src/type/preload.ts b/src/type/preload.ts index 21c92b6d72..ba0c283c91 100644 --- a/src/type/preload.ts +++ b/src/type/preload.ts @@ -137,11 +137,11 @@ export const defaultHotkeySettings: HotkeySettingType[] = [ combination: HotkeyCombination(!isMac ? "Ctrl S" : "Meta S"), }, { - action: "プロジェクト読み込み", + action: "プロジェクトを読み込む", combination: HotkeyCombination(!isMac ? "Ctrl O" : "Meta O"), }, { - action: "テキスト読み込む", + action: "テキストを読み込む", combination: HotkeyCombination(""), }, { @@ -172,6 +172,10 @@ export const defaultHotkeySettings: HotkeySettingType[] = [ action: "選択解除", combination: HotkeyCombination("Escape"), }, + { + action: "全セルを選択", + combination: HotkeyCombination(!isMac ? "Ctrl Shift A" : "Meta Shift A"), + }, ]; export const defaultToolbarButtonSetting: ToolbarSettingType = [ @@ -449,8 +453,8 @@ export const hotkeyActionNameSchema = z.enum([ "新規プロジェクト", "プロジェクトを名前を付けて保存", "プロジェクトを上書き保存", - "プロジェクト読み込み", - "テキスト読み込む", + "プロジェクトを読み込む", + "テキストを読み込む", "全体のイントネーションをリセット", "選択中のアクセント句のイントネーションをリセット", "コピー", @@ -458,6 +462,7 @@ export const hotkeyActionNameSchema = z.enum([ "貼り付け", "すべて選択", "選択解除", + "全セルを選択", ]); export type HotkeyActionNameType = z.infer;