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: added keyboard controls for map gestures #1987

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

JaffaKetchup
Copy link
Member

@JaffaKetchup JaffaKetchup commented Nov 19, 2024

This PR adds keyboard controls for the map, each of which may be toggled individually. By default, only the new arrow key gestures work - but maybe it would be better to enable them all?

Supports arrow & WASD keys for panning, QE keys for rotation, and RF keys for zoom (assuming QWERTY). All keys are physical not logical, so whatever key is in those positions on a QWERTY keyboard will work the same on others).

A potential extension could be to allow a key to be defined which resets the map rotation. And/or, to allow more customizability with keys (eg. to better support rotation and zooming for left handed users using the arrow keys).

Switched to using `Focus` instead of `KeyboardListener` to properly take focus and make bubbling decisions
Added optional external `foucsNode` & `autofocus` input to `KeyboardOptions`
Documented recommendation to enable arrow keys if WASD enabled (for left handed users)
Fixed returned `KeyEventResult`s
@JaffaKetchup JaffaKetchup requested review from a team and removed request for ibrierley, mootw, TesteurManiak and josxha November 24, 2024 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In progress
Development

Successfully merging this pull request may close these issues.

1 participant