CheerpX.Linux#setCustomConsole
Configure custom console behavior for handling keyboard input and output display
Parameters
- writeFunc (
(buf: Buffer) => void
) - Function to handle the output sent to the console. - cols (
number
) - Number of columns for the console. - rows (
number
) - Number of rows for the console.
Returns
setCustomConsole
returns a function that should be called to simulate user typing in the console.
Examples
Read and write strings
Use with Xterm.js
This is what WebVM uses for its interactive terminal.