British Columbia Institute of Technology
•
TMGT
•
TMGT-7155
Question
Answered step-by-step
How to fix that code ? please make sure correct
// This file is part of www.nand2tetris.org // and the book "The Elements of Computing Systems" // by Nisan and Schocken, MIT Press. // File name: projects/12/Keyboard.jack /** * A library for handling user input fr
...[Show More]
British Columbia Institute of Technology
•
TMGT
•
TMGT-7155
Question
Answered step-by-step
How to fix that code ? please make sure correct
// This file is part of www.nand2tetris.org // and the book "The Elements of Computing Systems" // by Nisan and Schocken, MIT Press. // File name: projects/12/Keyboard.jack /** * A library for handling user input from the keyboard. */ class Keyboard {
/** Initializes the keyboard. */ function void init() { } /** * Returns the character of the currently pressed key on the keyboard; * if no key is currently pressed, returns 0. * * Recognizes all ASCII characters, as well as the following keys: * new line = 128 = String.newline() * backspace = 129 = String.backspace() * left arrow = 130 * up arrow = 131 * right arrow = 132 * down arrow = 133 * home = 134 * End = 135 * page up = 136 * page down = 137 * insert = 138 * delete = 139 * ESC = 140 * F1 - F12 = 141 - 152 */ function char keyPressed() { }
/** * Waits until a key is pressed on the keyboard and released, * then echoes the key to the screen, and returns the character * of the pressed key. */ function char readChar() { }
/** * Displays the message on the screen, reads from the keyboard the entered
[Show Less]