Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: use e.altkey instaed of e.key #3

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

iamchanii
Copy link

Short description:
use event.altKey to check alt key pressed for support linux (and more compatibility)

Context:
I add altKeyPressed in useEffect hook to check alt key was pressed in onKeyUp handler to check alt key was pressed. because e.altKey is always false in keyup event. so I set altKeyPressed to true in onKeyDown handler and reset to false in onKeyUp handler to prevent call uninspect by other keyboard events is not alt key.

close #2

use event.altKey to check alt key pressed for support linux (and more compatibility)

close raunofreiberg#2
@vercel
Copy link

vercel bot commented Apr 28, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/void-team/inspx/4EMRKnQxhb9c8XggykRXL8NnGrt7
✅ Preview: https://inspx-git-fork-iamchanii-use-alt-key-void-team.vercel.app

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Suporte ao linux?
1 participant