py_cui
py_cui copied to clipboard
Skip focus for certain widgets
I've been looking through the documentation, and there is no option to skip the focus of a particular widget, eg, a label.
When using the keyboard, and scrolling through the set of widgets, all widgets get selected at some point. It would be awesome to skip focus when it concerns a block of text or a label, there are even cases where a menu might be used as a list without the need for any manipulation by the user.
Would this be acceptable to others?
Yes, this is directly realted to issue #151 and PR #152.
There is a set_selectable() method for widgets that should handle this case. It does work correctly with mouse but does not for arrow keys navigation.
PR #152 fixes it, as a side effect, for vertical navigation. Once it is accepted, I'll fix it for horizontal too 😉
Very cool. nice work.
@PabloLec Is there a reason why you are separating the fix for vertical navigation and and the fix for horizontal navigation?
I'm not trying to be difficult about it, I am honestly just wondering if it would be better to include the fixes for both?
No particular reason, I didn't noticed the bug with horizontal selection before I fixed it for vertical. So I was just waiting for the first PR to be accepted before fixing horizontal selection. Well, that was 3 months ago.