diff --git a/src/lib/components/modal.svelte b/src/lib/components/modal.svelte
index 92aa912..af08125 100644
--- a/src/lib/components/modal.svelte
+++ b/src/lib/components/modal.svelte
@@ -21,8 +21,15 @@
function close() {
open = false;
}
+
+ function escape(event: KeyboardEvent) {
+ if (event.key === 'Escape') {
+ close();
+ }
+ }
+