splitter icon indicating copy to clipboard operation
splitter copied to clipboard

Keyboard support

Open joshwcomeau opened this issue 3 years ago • 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 😄

joshwcomeau avatar Mar 06 '21 15:03 joshwcomeau

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?

mlejva avatar Mar 06 '21 19:03 mlejva

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).

joshwcomeau avatar Mar 06 '21 20:03 joshwcomeau

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

martonlanga avatar Mar 18 '21 09:03 martonlanga