mirror of
https://github.com/andwati/dokploy.git
synced 2026-11-07 12:32:16 +00:00
fix: use event.code instead of event.key for keyboard shortcuts
This fixes keyboard shortcuts (Ctrl+S, Ctrl+B, Ctrl+J, Ctrl+K) not working with non-English keyboard layouts (e.g., Russian, French AZERTY, German QWERTZ). Fixes #3495
This commit is contained in:
@@ -93,7 +93,7 @@ export const ComposeFileEditor = ({ composeId }: Props) => {
|
||||
// Add keyboard shortcut for Ctrl+S/Cmd+S
|
||||
useEffect(() => {
|
||||
const handleKeyDown = (e: KeyboardEvent) => {
|
||||
if ((e.ctrlKey || e.metaKey) && e.key === "s" && !isLoading) {
|
||||
if ((e.ctrlKey || e.metaKey) && e.code === "KeyS" && !isLoading) {
|
||||
e.preventDefault();
|
||||
form.handleSubmit(onSubmit)();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user