fix(defineShortcuts): shift + alphabetic character handling (#140)

This commit is contained in:
Sylvain Marroufin
2023-03-13 14:11:52 +01:00
committed by GitHub
parent f76a9f0ab0
commit 377b4189ca

View File

@@ -32,7 +32,7 @@ export const defineShortcuts = (config: ShortcutsConfig) => {
let shortcuts: Shortcut[] = []
const onKeyDown = (e: KeyboardEvent) => {
const alphabeticalKey = /^[a-z]{1}$/.test(e.key)
const alphabeticalKey = /^[a-z]{1}$/i.test(e.key)
for (const shortcut of shortcuts) {
if (e.key.toLowerCase() !== shortcut.key) { continue }