TUI Input Handling, Raw Mode, Keyboard, Mouse, Paste, and Focus Use this skill when a TUI reads keys, handles shortcuts, supports mouse, edits text, manages focus, or needs safe paste behavior. Input contract - Only enter raw or cbreak mode for interactive TTY sessions. - Provide non-interactive alternatives for scripts, pipes, and CI. - Keep input decoding separate from application actions. - Make every action reachable by keyboard. - Treat mouse support as optional progressive enhancement. - Preserve expected terminal shortcuts unless the user can rebind them. Raw mode rules Raw mode disabl…