Skip to content

Some binding on footer are hidden when type content in input #3256

Answered by TomJGooding
Tim-Cao asked this question in Q&A
Discussion options

You must be logged in to vote

Just to add to davep's post, here's a simple example which I hope will help explain this:

from textual.app import App, ComposeResult
from textual.widgets import Input, Footer
from textual.binding import Binding


class ExampleApp(App):
    BINDINGS = [
        Binding("ctrl+c", "quit", "Quit"),
        Binding("ctrl+x", "delete_left_all", "Delete all to the left"),
    ]

    def compose(self) -> ComposeResult:
        yield Input("Delete me!")
        yield Footer()


if __name__ == "__main__":
    app = ExampleApp()
    app.run()

Try pressing ctrl+x. This won't do anything, as there is no such method in the app. If you check the logs in textual console:

<action> 'delete_left_all' has no…

Replies: 1 comment 9 replies

Comment options

You must be logged in to vote
9 replies
@Tim-Cao
Comment options

@davep
Comment options

@Tim-Cao
Comment options

@TomJGooding
Comment options

Answer selected by Tim-Cao
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants