mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-14 20:19:34 +01:00
fix(defineShortcuts): shift + alphabetic character handling (#140)
This commit is contained in:
committed by
GitHub
parent
f76a9f0ab0
commit
377b4189ca
@@ -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 }
|
||||
|
||||
Reference in New Issue
Block a user