-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d38790e
commit 7ca894f
Showing
3 changed files
with
25 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import {useEffect, useState} from "react"; | ||
|
||
const Runner = () => { | ||
const [hidden, setHidden] = useState(true); | ||
|
||
useEffect(() => { | ||
document.addEventListener("keydown", (e) => { | ||
if (e.altKey && e.code === 'F2') { | ||
e.preventDefault(); | ||
alert('شما ترکیب Alt + F2 را فشردید!'); | ||
} | ||
}) | ||
}, []) | ||
|
||
return(<> | ||
<div className={(hidden && "hidden ") + " fixed top-[75px] left-[70px] z-[998] bg-white w-[100px] h-[35px] rounded-[10px] border"}></div> | ||
</>) | ||
} | ||
|
||
export default Runner; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters