Yellow-Dog-Man / Resonite-Issues

Issue repository for Resonite.
https://resonite.com
140 stars 2 forks source link

Enable pressing tab/shift+tab for navigating input fields in UIX #82

Open gentlecolts opened 1 year ago

gentlecolts commented 1 year ago

Is your feature request related to a problem? Please describe.

Most ui layout systems have adopted the common language of using the tab key to advance between fields (or shift+tab to go back to the previous field). This may be challenging to implement in the context of a 3d environment like Resonite, but I believe it to not only be possible, but to be a worthwhile improvement to user experience, especially for desktop users. Enabling this kind of flow may also be a path for enabling other common keyboard-form interactions, such as "enter to submit".

Describe the solution you'd like

Internally, Resonite should track the visual "order" of interactable objects in uix canvases, such as text fields, checkboxes, etc, but especially text input. When one of these fields is focused, and the tab key is pressed, focus should advance to the "next" item. Likewise, shift+tab should return to the previous input.

Describe alternatives you've considered

It may also be reasonable to add "next" fields to applicable uix components, which would take a ref to the "next" component (and implicitly store the "previous" in that next field). I am not sure if adding this extra burden on the user is necessary, as other layout engines don't seem to need this

Additional Context

zangooseoo

hakanai commented 5 months ago

I too tried to use Tab on the virtual keyboard to move to the password field when signing up, even in VR.