Pick new keybinding for Tree's toggle_expand_all since no terminal seems to support shift+space
Have you checked closed issues? (https://github.com/Textualize/textual/issues?q=is%3Aissue+is%3Aclosed)
Have you checked against the most recent version of Textual? (https://pypi.org/search/?q=textual)
Feature requests
Please post feature requests to Ideas. (https://github.com/Textualize/textual/discussions/categories/ideas)
The bug
Currently the tree code binds shift+space to toggle_expand_all:
https://github.com/Textualize/textual/blob/03979fc629579919d29c10a8ed6e10974fc05c4c/src/textual/widgets/_tree.py#L546-L548
However, I could not find a single terminal where textual keys shows a different output when I press space vs shift+space, so that action is unreachable. Once #5902 is resolved, ctrl+space may be a better option.
(I don't think textual diagnose will be helpful here, but if you need it I can include it)
We found the following entries in the FAQ which you may find helpful:
- Why doesn't Textual look good on macOS?
- Does Textual support images?
- How do I center a widget in a screen?
Feel free to close this issue if you found an answer in the FAQ. Otherwise, please give us a little time to review.
This project is developed and maintained by Will McGugan. Consider sponsoring Will's work on this project (and others).
This is an automated reply, generated by FAQtory
I guess a workaround is to subclass the TreeView and redefine its bindings?
Anyway the set of TreeView bindings is very different from the ones used by Windows, which I'm more used to. Since it's probably hard to find a set of bindings that satisfy everyone, I guess subclassing may be necessary to achieve what you need.
I think I would be inclined to agree with RedBeard0531 here - The default should ideally be something that works on all terminals if that's possible. I don't think there's anything else in Textual that uses a combination like this that isn't supported by all terminals.
Please check #6074 as it enables detecting shift+space