
Already know some of this? A 2-minute test skips the lessons you know.
Take the placement testA free 15-lesson course built from Cococry's 2h 41m of YouTube video. 2 days at 90 minutes a day, with study notes and a quiz in every lesson. A 2-minute placement test skips what you already know.
Taught by Cococry on YouTube. Videos play in YouTube's own player, so the creator keeps every view.
Create the project structure, build script, and fork a pseudoterminal (PTY) to spawn a shell process for the terminal emulator.
Implement the main event loop using select() to monitor the PTY master file descriptor and read UTF-8 data from the shell output.
Initialize the LAE windowing library, create a window, and replace the generic UI event loop with a custom render loop for efficient terminal drawing.
Design the terminal cell grid, cursor positioning, and implement row rendering with UTF-8 encoding and font handling using the LAE asset manager.
Build a state machine to parse ANSI escape sequences (CSI), handling control characters, CSI parameters, and escape sequence states.
Implement handling for C0 control codes including newline, tab stops, carriage return, backspace, and the substitute character.
Dispatch parsed CSI commands by command letter; implement cursor movement (up, down, forward, back, position), tab stops, and terminal identification.
Implement CSI commands for clearing lines (K), clearing screen regions (J), and full screen erase (ED 2) with cursor-relative logic.
Implement scrolling escape codes (SU/SD), cell insertion/deletion utilities, and cursor origin mode for restricted scroll regions (DECSTBM).
Write user input back to the PTY with write limits and CR/LF translation, handle local echo mode, and connect keyboard callbacks to the terminal parser.
Write user input back to the PTY with write limits and CR/LF translation, handle local echo mode, and connect keyboard callbacks to the terminal parser.
Write user input back to the PTY with write limits and CR/LF translation, handle local echo mode, and connect keyboard callbacks to the terminal parser.
Write user input back to the PTY with write limits and CR/LF translation, handle local echo mode, and connect keyboard callbacks to the terminal parser.
Write user input back to the PTY with write limits and CR/LF translation, handle local echo mode, and connect keyboard callbacks to the terminal parser.
Write user input back to the PTY with write limits and CR/LF translation, handle local echo mode, and connect keyboard callbacks to the terminal parser.