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

Tile place shortcut #12

Open
MatzE-sch opened this issue Jan 7, 2024 · 1 comment
Open

Tile place shortcut #12

MatzE-sch opened this issue Jan 7, 2024 · 1 comment

Comments

@MatzE-sch
Copy link
Contributor

MatzE-sch commented Jan 7, 2024

If you're interested in getting even fancier with it you could also add shortcuts for placing tiles. The backend actually returns a complete list of valid tile place locations in the targets list so it could look something like press p > all valid placement locations light up with a number > press corresponding number > tile is placed. This is beyond the scope of this PR but could be a cool interaction if you're ever interested in adding that as well.

Originally posted by @freglyc in #11 (review)

@MatzE-sch
Copy link
Contributor Author

Yea i already imagined something like that and searched for methods in the drag and drop library (dnd-kit) for automatically picking up the tile and having it at the mouse cursor without moving the mouse to get the tile.

So far i just found, that this library works with arrow keys to move the tile with the keyboard if the DraggableToken has a tabindex (test commit)

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

No branches or pull requests

1 participant