Skip to content
Discussion options

You must be logged in to vote

Alright, thank you very much guys, this works now!

class UserInput(Input, can_focus=True):
    BINDINGS = [Binding("ctrl+a", "select_all", "Select All", show=False)]

    def __init__(self):
        super().__init__()

    def on_mount(self) -> None:
        self.scroll_visible()
        self.focus()

    def action_select_all(self):
        self.selection = Selection(0, len(self.value))

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@dorianpercic
Comment options

@TomJGooding
Comment options

@willmcgugan
Comment options

@dorianpercic
Comment options

Answer selected by willmcgugan
@willmcgugan
Comment options

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