edemaine / cocreate

Cocreate Shared Whiteboard/Drawing
MIT License
209 stars 27 forks source link

Tab characters in text input #160

Closed psvenk closed 3 years ago

psvenk commented 3 years ago

Currently, pressing <TAB> in a text box cycles to another control on the page. It would be useful to have this insert a literal tab character, or alternatively 4 spaces, when writing pseudocode.

edemaine commented 3 years ago

That makes sense, though I worry about overriding the tab key for those navigating by keyboard. That said, Cocreate isn't very usable via keyboard, so perhaps it's fine...? Perhaps a reasonable alternative is that Tab inserts a tab key if this is not the first keyboard interaction with the textarea (e.g. characters have been typed, or arrow keys have been pressed); but it cycles otherwise. One can use Escape to get back to cycle mode.

edemaine commented 3 years ago

Implemented. Will be deployed in a little while.

psvenk commented 3 years ago

@edemaine Thank you!