Send a focus event to tty's callback.
Signal blocking calls to read to wake up and return 0.
Send a key event to tty's callback.
Send a mouse event to tty's callback.
Read up to count bytes into buffer at offset from the PTY. The number of bytes read will be returned.
Send a resize event to tty's callback.
Write up to count bytes into buffer at offset to the PTY. The number of bytes read will be returned.