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

Automatically listen for terminal input when standard input is not a TTY #53

Closed
wants to merge 3 commits into from

Conversation

meowgorithm
Copy link
Member

@meowgorithm meowgorithm commented Feb 24, 2021

This PR automatically captures input as normal if stdin is not a TTY, so long as the user hasn't already specified a custom input. Prior to this update, if data was piped in the Bubble Tea runtime would not capture keystrokes, mouse input and so on by default as input was coming in through a pipe and thus not a TTY.

An example is included in the examples directory called pipe, which demonstrates this new functionality.

Note that prior to this update it was possible to achieve the above via custom input functionality introduced in #39.

Related: #24.

@meowgorithm meowgorithm changed the title Automatically listen for input when standard input is not a TTY Automatically listen for terminal input when standard input is not a TTY Feb 24, 2021
@meowgorithm meowgorithm deleted the auto-input-tty branch February 26, 2021 19:21
@meowgorithm
Copy link
Member Author

Dropping this branch and PR as there's a simpler, better way to do this, particularly on Windows.

lorenzo-milicia pushed a commit to lorenzo-milicia/bubbles that referenced this pull request Mar 5, 2023
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

Successfully merging this pull request may close these issues.

None yet

1 participant