Keyboard
These built-in variables will give you information about the keyboard.
key
key
This built-in variable stores the value of the most recently pressed key. For example, if the user presses 'm', then 'b' :
key will be equal to 'b'
keyIsPressed
keyIsPressed
This built-in variable has the value True
if any key is pressed at the moment. It has the value False
otherwise. (Boolean datatype)
keyCode
keyCode
This built-in variable stores the key code of the last key that was pressed.
Here are some built-in constants that can be used
In general, you can search the web for: key code of ###
or look at this website.
Find these documents helpful? Let the people who made them help your child learn to code at Strivemath!
We'd love to hear your Feedback/Comments here.
Last updated