diff --git a/packages/frontend/src/components/MkFileCaptionEditWindow.vue b/packages/frontend/src/components/MkFileCaptionEditWindow.vue
index 39551e6b3c..8754c72b7b 100644
--- a/packages/frontend/src/components/MkFileCaptionEditWindow.vue
+++ b/packages/frontend/src/components/MkFileCaptionEditWindow.vue
@@ -17,7 +17,7 @@ SPDX-License-Identifier: AGPL-3.0-only
{{ i18n.ts.describeFile }}
-
+
{{ i18n.ts.caption }}
@@ -46,6 +46,15 @@ const dialog = shallowRef>();
const caption = ref(props.default);
+function onKeydown(ev: KeyboardEvent) {
+ if (ev.key === 'Enter' && (ev.ctrlKey || ev.metaKey)) ok();
+
+ if (ev.key === 'Escape') {
+ emit('closed');
+ dialog.value?.close();
+ }
+}
+
async function ok() {
emit('done', caption.value);
dialog.value?.close();