diff --git a/app/kfc/kfc.js b/app/kfc/kfc.js index 2656e51..58bd5e7 100644 --- a/app/kfc/kfc.js +++ b/app/kfc/kfc.js @@ -22,9 +22,9 @@ async function main(args) { break } - writeStdout(event.key + "\n") + writeStdout(event + "\n") } else if (event.type == "char") { - writeStdout(event.char + "\n") + writeStdout(event + "\n") } } diff --git a/sys/terminal.js b/sys/terminal.js index 30cc0e5..41e9851 100644 --- a/sys/terminal.js +++ b/sys/terminal.js @@ -7,8 +7,8 @@ var last_stdin_length = 0 function getTerminalSize() { return [ - Math.floor(window.innerWidth - CURSOR_OFFSET[0] * 2 / CHAR_SIZE[0]), - Math.floor(window.innerHeight - CURSOR_OFFSET[1] * 2 / CHAR_SIZE[1]) + Math.floor((window.innerWidth - CURSOR_OFFSET[0] * 2) / CHAR_SIZE[0]), + Math.floor((window.innerHeight - CURSOR_OFFSET[1] * 2) / CHAR_SIZE[1]) ] }