Telling Textual App how to ignore or pass-through certain keystroke sequences to originating stdin #2950
-
Use Case: We have a requirement that when we run long-running jobs from a terminal (like a lengthy build) we must do it from inside a I tried this morning to run my Textual app (which indeed wraps our long-running build) inside a The only thing I can't figure out how to do is send the As Textual appears to do with If not, is there a key sequence that can push the Textual App to the background (kinda like an equivalent to Ctrl-Z on Linux shell )? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
To clarify on the Ctrl+C front: that's something that's handled by Textual itself -- it's not that the key combination gets passed "up" and the operating system kills the application. On your more general point, just to check I'm understanding things correctly: you want some way to start a tmux session, running a Textual app, and have it detach right away so you can come back to it later? (I ask only because Ctrl+B D works right now with Textual apps, if you're the one pressing it). If that's the case, would it not make more sense to create a detached session to start with? I'm not really much of a tmux user but I believe this should work just fine: $ tmux new-session -d my-textual-application-here then later you can: $ tmux attach to attach to the session and view and interact with the application. Testing that here now and it all works fine. |
Beta Was this translation helpful? Give feedback.
To clarify on the Ctrl+C front: that's something that's handled by Textual itself -- it's not that the key combination gets passed "up" and the operating system kills the application.
On your more general point, just to check I'm understanding things correctly: you want some way to start a tmux session, running a Textual app, and have it detach right away so you can come back to it later? (I ask only because Ctrl+B D works right now with Textual apps, if you're the one pressing it). If that's the case, would it not make more sense to create a detached session to start with?
I'm not really much of a tmux user but I believe this should work just fine: