Focus switching with keyboard? #107
-
Sorry if I missed this somewhere, but is there a way to enable using the Tab key, alone or in combination with a modifier, to cycle focus from one widget to the next? I'm trying to get something working in a terminal with no mouse support, and there doesn't seem to be any easy way to enable this. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
There's no tab focus at the moment, but it is an important feature, because I would like Textual to be keyboard first. What I was thinking is to have an automatic widget order left to right, top to buttom, while also allowing a tab_order attribute to sort by. There are a few details nail down before I get there. For instance there needs to be someway for a widget to indicate it has focus. I was thinking of a overlayed border that appears while you are tabbing. |
Beta Was this translation helpful? Give feedback.
-
Pretty sure this doesn't apply here but in web-land, I can't think how this would affect TUI apps but then I also know nothing about how screen-readers etc interact with the console. Just an FYI more than anything. |
Beta Was this translation helpful? Give feedback.
There's no tab focus at the moment, but it is an important feature, because I would like Textual to be keyboard first.
What I was thinking is to have an automatic widget order left to right, top to buttom, while also allowing a tab_order attribute to sort by.
There are a few details nail down before I get there. For instance there needs to be someway for a widget to indicate it has focus. I was thinking of a overlayed border that appears while you are tabbing.