Resources
- //INPUT: Reading keypresses
- //HTML: Converting to unicode characters
Saving your work
Use Save as...
to save the
empty template as
"2.08S-KeyboardReader-LastName.html
"
in your Computer Programming 12 directory.
The assignment
Write a program that will:
- Trigger a function when a key is pressed
- Display the code of the key that was pressed
- Display the Unicode character of the key that was pressed
- Use an
if...else
statement to trigger something if a certain key is pressed
For example
Press any key ... as long as it is not tab!
You pressed character #
That is the same as ' '