hootsuite / grid

Drag and drop library for two-dimensional, resizable and responsive lists
http://hootsuite.github.io/grid/
Apache License 2.0
3.57k stars 279 forks source link

Keyboard navigation #31

Open boxed opened 10 years ago

boxed commented 10 years ago

This is a first rough draft for keyboard navigation support. I'd like some feedback on what kind of changes you'd suggest before merging.

I'd like to eventually incorporate this into my media center (https://github.com/boxed/cmi), where remote control navigation is mapped to keyboard operations. But I think something like this would be useful to other people too.

ovidiuch commented 10 years ago

Hi @boxed, the keyboard nav is pretty cool :)

Wondering what other use cases are there for this, or what would be an abstract behavior. You'd have to map some sort of "enter" event on a focus element, to be transmitted to the contained widget. It gets a bit complicated when you have other actions inside each widget (like 1/2/3x resize in our demo), because you'd have to pass along the focus to another level.

Definitely have to try your media center, XBMC started giving me headaches :)

boxed commented 10 years ago

Thanks!

In the case of CMi I just have big tiles that have a single action on them, so it's not a problem in my case. In the demo case I think it's more reasonable to map other keyboard shortcuts to the other commands. So for example '1' to 1x, '2' to 2x and '3' to 3x.

mgifford commented 6 years ago

What is the status of this? It's now a pretty old PR. Still keyboard only support should be considered.

boxed commented 6 years ago

I’d also like to know if this will be merged. I would like to be able to remove my fork if nothing else. It’s cluttering up my profile :P