Skip to content

Add suspend functionality to keybindings for toolong - #79

Open
iconoclasthero wants to merge 5 commits into
Textualize:mainfrom
iconoclasthero:main
Open

Add suspend functionality to keybindings for toolong#79
iconoclasthero wants to merge 5 commits into
Textualize:mainfrom
iconoclasthero:main

Conversation

@iconoclasthero

@iconoclasthero iconoclasthero commented Jul 9, 2026

Copy link
Copy Markdown

To address #78, added

        Binding("ctrl+z", "suspend_process", "Suspend", key_display="^z"),

to BINDINGS section of log_view.py to enable suspending/SIGSTP/^Z functionality.
Left ^z visible; did not modify help documentation.
Alternately, could change to

        Binding("ctrl+z", "suspend_process", "Suspend", key_display="^z", show=False),

to remove from baseline display and add to help.

Added 
```
Binding("ctrl+z", "suspend_process", "Suspend", key_display="^z"),
```
to log_view.py `BINDINGS` definitions to allow for ^Z SIGSTP suspend functionality.
Add key binding for suspending process
@iconoclasthero

Copy link
Copy Markdown
Author

Upon further evaluation, it would probably be better to put this in ui.py

class LogScreen(Screen):

    BINDINGS = [
        Binding("f1", "help", "Help"),
        Binding("ctrl+z", "suspend_process", "Suspend", key_display="^z"),
    ]

so that it will work more universally within the textualize environment, e.g., if toolong is called with more than one log file from the cli (tl log1.log log2.log).

Revert "Add key binding for suspending process"
Add key binding for Ctrl+Z to suspend process to main `ui.py` so it applies throughout Textualize environment.
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.

1 participant