Limit to only bang char

This commit is contained in:
Jesus Lopez 2024-05-16 13:15:41 -07:00 committed by GitHub
parent 3ab463ffbb
commit 6ee1ed5317
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -227,8 +227,8 @@ function Home({ initialSettings }) {
(e.key.length === 1 && (e.key.length === 1 &&
e.key.match(/(\w|\s|[à-ü]|[À-Ü]|[\w\u0430-\u044f])/gi) && e.key.match(/(\w|\s|[à-ü]|[À-Ü]|[\w\u0430-\u044f])/gi) &&
!(e.altKey || e.ctrlKey || e.metaKey || e.shiftKey)) || !(e.altKey || e.ctrlKey || e.metaKey || e.shiftKey)) ||
// accented/special characters may require modifier keys // accented characters and the bang may require modifier keys
e.key.match(/([à-ü]|[À-Ü]|[\u0021-\u0024]|[\u0026-002F]|[\u003A-\u0040])/g) || e.key.match(/([à-ü]|[À-Ü]|!)/g) ||
(e.key === "v" && (e.ctrlKey || e.metaKey)) (e.key === "v" && (e.ctrlKey || e.metaKey))
) { ) {
setSearching(true); setSearching(true);