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

Component: <KeyboardInput /> #509

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

Conversation

bryphe
Copy link
Member

@bryphe bryphe commented Jun 7, 2019

One thing that feels unnecessarily awkward today is to be able to just retrieve any keyboard input as a key event, from within a Revery app. This is important for games.

The <Calculator /> example actually has a component that handles this in a brute force way - it grabs focus on mount, and then listens for blur events, and steals the focus back. This helps in the case where a mouse click would 'blur'. This change brings this component to our API.

I believe there may also be a bug with our mouse-blur handling, where it blurs too aggressively - that might be worth looking at as a separate issue.

Open Issues:

  • What should we do in the case of multiple <KeyboardInput /> components? They'll ping-pong focus back and forth.

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.

None yet

1 participant