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 receives key codes to simulate user typing in the console.
Examples
Read and write strings
Use with Xterm.js
This is what WebVM uses.