Input
Published version: thekevinscott.github.io/curtaincall/guide/input/
Curtaincall provides methods for sending text, keyboard, and mouse input to the terminal.
Text Input
Arrow Keys
Special Keys
Control Keys
Mouse Clicks
# Left-click the first visible match of some text
term.get_by_text("Save").click()
# Left-click a cell by 0-based viewport coordinates
term.click(row=2, col=10)
Each click sends an SGR mouse press followed by a release (\x1b[<0;COL;ROWM then
...m, with the 1-based coordinates SGR expects). The program under test only sees
these events if it has turned on mouse tracking, usually with \x1b[?1000h\x1b[?1006h.
Locator.click() doesn't wait for the text to appear, so assert it is visible first if
it may not have rendered yet. Matches that have scrolled off into the scrollback buffer
can't be clicked; if those are the only matches, click() raises LookupError.