fix: ignore Ctrl/Alt/Meta in keyboard shortcuts

This commit is contained in:
N1C4T
2025-12-31 14:04:15 +04:00
parent 2a74cf9a39
commit 683943a180
5 changed files with 15 additions and 0 deletions

View File

@@ -43,6 +43,9 @@ export function HowItWorks() {
// Ignore if typing in input
if (e.target instanceof HTMLInputElement || e.target instanceof HTMLTextAreaElement) return;
// Skip if Ctrl/Alt/Meta are pressed (Shift is allowed for ?)
if (e.ctrlKey || e.altKey || e.metaKey) return;
if (e.key === '?' || (e.shiftKey && e.key === '/')) {
e.preventDefault();
if (isOpen) {