[BUG]: letter keys do not count as part of a hotkey combination
Description
combinations like ctrl+q are not recognized when pressed. numbers, like ctrl+1, work
Reproduction
assign a hotkey containing a letter press the assigned combination under the conditions corresponding to it
Platform
Windows
System Version
Windows 10 Домашняя для одного языка 22H2 19045.5965 Windows Feature Experience Pack 1000.19061.1000.0
Window System (Linux Only)
None
Software Version
3,0,7
Log File
Additional Information
After installing the program everything worked, but after closing it broke.
The code prevents the default action for all Ctrl+
// ... existing code ... useEffect(() => { const handler = async (e) => { // Allow all Ctrl+letter and Ctrl+number shortcuts if (e.ctrlKey && !/^[a-z0-9]$/i.test(e.key)) { e.preventDefault(); } if (devMode !== null && devMode && e.key === 'F12') { await invoke('open_devtools'); } if (e.key.startsWith('F') && e.key.length > 1) { e.preventDefault(); } if (e.key === 'Escape') { await appWindow.close(); } }; document.addEventListener('keydown', handler); return () => document.removeEventListener('keydown', handler); }, [devMode]); // ... existing code ...
how to remove this?
Good Evening Sir , Using below code bug can be remove .If I am wrong please guide me.
Update in app.jsx file useEffect(() => { const handler = async (e) => { const allowedKey = /^[a-z0-9]$/i.test(e.key); if (e.ctrlKey && !allowedKey) { // You can decide to log or prevent based on use-case e.preventDefault(); }
if (devMode !== null && devMode && e.key === 'F12') {
await invoke('open_devtools');
}
if (e.key.startsWith('F') && e.key.length > 1) {
e.preventDefault(); // blocks F1, F2, ...
}
if (e.key === 'Escape') {
await appWindow.close();
}
};
document.addEventListener('keydown', handler);
return () => document.removeEventListener('keydown', handler);
}, [devMode]);
On Sun, Jun 29, 2025 at 4:34 PM KOCMOTAHK @.***> wrote:
KOCMOTAHK left a comment (pot-app/pot-desktop#1136) https://github.com/pot-app/pot-desktop/issues/1136#issuecomment-3016593515
how to remove this?
— Reply to this email directly, view it on GitHub https://github.com/pot-app/pot-desktop/issues/1136#issuecomment-3016593515, or unsubscribe https://github.com/notifications/unsubscribe-auth/BK3YPN7NCJK43CBDWMF5QA33F7B2XAVCNFSM6AAAAACAKWCZ4SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTAMJWGU4TGNJRGU . You are receiving this because you commented.Message ID: @.***>
and why do I need the code? what should I do with it?