-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Description
App.action_suspend_process suspends the app but the terminal appears to be in a raw state: all input is echoed but nothing else happens, there is no shell prompt, input is not processed in any other way.
The example code is taken directly from the documentation: https://textual.textualize.io/guide/app/#suspending-from-foreground . Running this code reproduces the issue. A copy of this code is below, but this is really taken from the doc.
I have also tried resetting the terminal settings with termios.tcsetattr to no avail, so I am not sure if this is really just the raw mode. There is no shell prompt, so looks like the terminal is owned by python process.
from textual.app import App, ComposeResult
from textual.binding import Binding
from textual.widgets import Label
class SuspendKeysApp(App[None]):
BINDINGS = [Binding("ctrl+z", "suspend_process")]
def compose(self) -> ComposeResult:
yield Label("Press Ctrl+Z to suspend!")
if __name__ == "__main__":
SuspendKeysApp().run()pasky
Metadata
Metadata
Assignees
Labels
No labels