mirror of
https://git.vectorsigma.ru/public/tubearchivist.git
synced 2026-08-04 22:39:38 +00:00
ignore keyboard events with modifier
This commit is contained in:
@@ -6,7 +6,13 @@ export function useKeyPress(targetKey: string) {
|
||||
|
||||
useEffect(() => {
|
||||
const handleKeyDown = (event: KeyboardEvent) => {
|
||||
if (event.key === targetKey) {
|
||||
if (
|
||||
event.key === targetKey &&
|
||||
!event.ctrlKey &&
|
||||
!event.metaKey &&
|
||||
!event.altKey &&
|
||||
!event.altKey
|
||||
) {
|
||||
setIsKeyPressed(true);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user