Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Text Input Widget #132

Closed
CyberSmash opened this issue Oct 3, 2021 · 6 comments
Closed

Text Input Widget #132

CyberSmash opened this issue Oct 3, 2021 · 6 comments

Comments

@CyberSmash
Copy link

To be added by @willmcgugan

Sorry if this is already a thing, or goes against the general philosophy of the project.

I have a need for an input widget a user could type text into. My use case is to search through a long list of items such as a directory tree.

One of the bigger hurdles here would be keys that are already bound to action. There doesn't seem to be a way to "unbind" a key, or "unbind" all keys temporarally when the correct input panel is selected.

Thoughts?

@tusharsadhwani
Copy link
Contributor

tusharsadhwani commented Oct 3, 2021

This, along with an entire Form's worth of widgets are currently under works. Feel free to make a discussion post about any suggestions or requirements you might have regarding any sorts of input widgets though!

@tusharsadhwani
Copy link
Contributor

Here's a currently going on discussion: #105

@Granitosaurus
Copy link

Maybe textual could integrate prompt_toolkit somehow? It seems to be a de facto standard for rich input in python right now. I'm not too familiar with textual yet, maybe prompt toolkits embed() can just be plopped into textuals widget?

@danmou
Copy link

danmou commented Oct 17, 2021

For anyone else looking for this, textual-inputs implements simple text and number input widgets. They seem to work quite well and the implementation looks very straightforward. Keys being bound outside the widget does not seem to cause any issues when the widget has focus. All credit to the author @sirfuzzalot for implementing it!

@willmcgugan
Copy link
Collaborator

https://github.com/Textualize/textual/wiki/Sorry-we-closed-your-issue

@github-actions
Copy link

Did we solve your problem?

Consider buying the Textualize developers a coffee to say thanks.

Textualize

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants