Support tab focus: specify the tab order in slint code
We need the ability to specify how pressing the tab and shift-tab keys allows navigating through ui-elements. This way buttons can accept the keyboard focus for example and can be activated using the enter key.
When having a multi-line text box as part of the UI that allows to insert tab characters, this case must be handled in a special way to prevent that the user is forced to resort to the mouse to get the focus away from the text box.
I think I have seen both of these behaviors years ago, and GPT-4o without me priming it also came up with them:
- Tab to insert tab character, Ctrl+Tab to move focus away
- Tab to move focus away, Ctrl+Tab to insert tab character
Maybe, which of these options is chosen depends on how important the ability to insert tab characters is for the app.
I guess the set of key combos for reversed focus traversal direction depends on whether Shift+Tab in the text box unindents the current line like in an IDE.