Skip to content

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 TesteurManiak, ibrierley, josxha and mootw November 24, 2024 21:02
@JaffaKetchup JaffaKetchup enabled auto-merge (squash) January 12, 2025 21:23
@JaffaKetchup
Copy link
Member Author

JaffaKetchup commented Jan 27, 2025

Copy link
Contributor

@josxha josxha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JaffaKetchup JaffaKetchup merged commit a4c30ad into master Feb 2, 2025
7 checks passed
@JaffaKetchup JaffaKetchup deleted the arrow-keys branch February 2, 2025 18:37
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.

3 participants