gereleth / hexapipes

Hexagonal pipes puzzles
https://hexapipes.vercel.app/hexagonal/5
MIT License
188 stars 18 forks source link

Allow keyboard controls #58

Open mabhub opened 1 year ago

mabhub commented 1 year ago

…maybe usings arrows , space ?

gereleth commented 1 year ago

I assume arrows would move the viewbox around, right? What does space do? ))

I can imagine playing this Factorio-style with right hand on the mouse and left hand on the keyboard. Then the controls could be something like this:

Move the viewbox - WASD (arrows too maybe) Zoom in / out - R/F (?) Rotate hovered tile clockwise / counter-clockwise - Q/E (?) Lock or unlock hovered tile - Space

I doubt I'd actually use keys to rotate tiles but navigating around may be handy).

Jaybrainer commented 1 year ago

Here's my idea for a keyboard layout: include keys for each of C, 180, and CC rotation (I suggest something like the keys l;', to be used with right hand) a hexagonal layout of keys for each cell around the current cell (perhaps WEADZX) a pin key (SPACE, or maybe S because it is in the middle of the cell movement keys)

Have the viewbox auto-center on the currently selected cell.

Pick whatever you want for zoom in/out