feat: add many keyboard shortcuts
This commit is contained in:
@@ -110,7 +110,10 @@ const handleWindowKeyDown = async (event: KeyboardEvent) => {
|
||||
if (event.defaultPrevented) return;
|
||||
if (event.ctrlKey || event.metaKey || event.altKey) return;
|
||||
|
||||
if (document.activeElement === document.body) {
|
||||
const isInteractive = document.activeElement?.closest('input, textarea, button, a, select, [contenteditable="true"]');
|
||||
if (isInteractive) return;
|
||||
|
||||
if (!isInteractive) {
|
||||
const isPrintable = event.key.length === 1;
|
||||
|
||||
if (isPrintable) {
|
||||
|
||||
Reference in New Issue
Block a user