devbookhq/splitter

Keyboard support

joshwcomeau opened this issue · 3 comments

As far as I can tell, the panels can only be resized by using a pointer device, like a mouse. It would be awesome if the panels could also be resized using a keyboard!

I imagine that the dividers could be buttons instead of divs, and when focused, the arrow keys could resize the panels (maybe it could jump in increments of 10px at a time, to make it a bit less tedious).

I'm excited about this project and I'd be happy to promote it, if it was a bit more accessible!

Thanks for open-sourcing your work 😄

Support for the keyboard is actually planned! We're using Splitter in the next version of Devbook and we want almost everything to be controllable using a keyboard. Eventually, we will add it to Splitter.

When you say if it was a bit more accessible do you have something else on your mind besides the keyboard use-case you described?

Awesome 😄 Thrilled to hear it! Thanks for the quick reply.

And nope — the keyboard stuff I mentioned is the only accessibility issue I'm aware of (though I'm definitely not an expert).

This could also be achieved by having a controlled Splitter and changing the tile sizes manually when the correct keyboard shortcut is pressed.