How to get Esc as a keyCode
Is there any way for me to use esc in a JS program? I want to make the user open their inventory using esc, I've seen it done before, but how is that done?
When you need the keyCode of any key, just write a short program with a key event, and within it, a call to println(keyCode);
Unfortunately, it seems that the canvas window on Khan Academy does not consider the escape key. There is a built in variable for the escape keyCode value (27) called ESC, but there is no point to using it. Try using E (keyCode 69) instead.
Please sign in to leave a comment.