[REQUEST] add option to select() to return unprocessed keys

#4226 · closed · 2 comments

View on GitHub ↗

loot-midget

NOTE: If a feature could be implemented in a third-party library, then it is unlikely to be accepted as part of the core library. NOTE: Feature requests will not be considered unless first approved in discussions (https://github.com/textualize/rich/discussions) Have you checked the issues for a similar suggestions? **Yes. Found nothing on "filter"** **How would you improve Rich?** I would like to implement filtering select()'s options by typing substring from keyboard. By adding option to select() to return unprocessed keys (now they are swallowed) and wrapping select() with custom code. **What problem does it solve for you?** I like to filter long option lists fast - from keyboard not by pressing Up/Down/PageUp/PageDown. MVP code and screencast attached. https://github.com/user-attachments/assets/f358aa64-fd01-4e4d-9903-7729067bea11 [select_with_filter.py](https://github.com/user-attachments/files/32518291/select_with_filter.py) [select_with_filter_test.py](https://github.com/user-attachments/files/32518295/select_with_filter_test.py)

Comments

loot-midget

Oops, wrong project. I am sorry.

github-actions[bot]

I hope I helped! Consider [sponsoring](https://github.com/sponsors/willmcgugan) my work on Rich. I give tech support for free, in addition to maintaining Rich and Textual. If you like using Rich, you might also enjoy [Textual](https://textual.textualize.io). Will McGugan