mirror of
https://github.com/OpenCut-app/OpenCut.git
synced 2026-07-13 21:52:53 +02:00
Normalize keyboard shortcut keys to lowercase for consistent handling
This commit is contained in:
@@ -292,7 +292,7 @@ export const useKeyboardShortcuts = (
|
|||||||
|
|
||||||
parts.push(e.key);
|
parts.push(e.key);
|
||||||
|
|
||||||
return parts.join("+");
|
return parts.join("+").toLowerCase();
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
// Handle keyboard events
|
// Handle keyboard events
|
||||||
@@ -302,7 +302,11 @@ export const useKeyboardShortcuts = (
|
|||||||
|
|
||||||
const keyCombo = parseKeyboardEvent(e);
|
const keyCombo = parseKeyboardEvent(e);
|
||||||
const shortcut = shortcuts.find((s) =>
|
const shortcut = shortcuts.find((s) =>
|
||||||
s.keys.some((key) => key === keyCombo || key === e.key)
|
s.keys.some(
|
||||||
|
(key) =>
|
||||||
|
key.toLowerCase() === keyCombo ||
|
||||||
|
key.toLowerCase() === e.key.toLowerCase()
|
||||||
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
if (shortcut) {
|
if (shortcut) {
|
||||||
|
|||||||
Reference in New Issue
Block a user