From bec87d149329c36fb424379791531002f6e258bd Mon Sep 17 00:00:00 2001 From: Zephrynis Date: Wed, 6 Aug 2025 23:53:16 +0100 Subject: [PATCH] Fix save shortcut to handle uppercase 'S' key Updated the keyboard shortcut handler to use event.key.toLowerCase() for detecting 's', ensuring the save action works regardless of key case. --- components/Editor.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/Editor.tsx b/components/Editor.tsx index b2597c7..613336c 100644 --- a/components/Editor.tsx +++ b/components/Editor.tsx @@ -360,7 +360,7 @@ const Editor = () => { // Add keyboard shortcut for Ctrl+S (Windows/Linux) and Cmd+S (macOS) useEffect(() => { const handleKeyDown = (event: KeyboardEvent) => { - if ((event.ctrlKey || event.metaKey) && event.key === 's') { + if ((event.ctrlKey || event.metaKey) && event.key.toLowerCase() === 's') { event.preventDefault(); if (action === 'edit') { save();