TLDR Web Dev · ARTICLES & TUTORIALS

HOW TERMINAL WORKS. PART 1: XTERM, USER INPUT

kevroletin.github.io13 min read

Summary from the TLDR Web Dev newsletter

This blog post explains how xterm, a terminal emulator, handles user input. xterm receives key presses, encodes them using the configured encoding (usually UTF-8), and writes the data into a tty device. Non-printable characters are encoded using ANSI escape sequences.