-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Closed
Labels
Description
I'm noticing that in keyPressed()
I always get a capital letter for any key pressed. For example with both 'a' and 'A' I get the following:
key code: 65
key: 'A'
function keyPressed() {
console.log("p5 keyCode: " + keyCode);
console.log("p5 key: " + key);
}
With native browser events, however
window.addEventListener("keypress", function(e) {
console.log("native keycode: " + e.which);
console.log("native key: " + String.fromCharCode(e.which));
});
I get:
key code: 97
key: 'a'
and
key code: 65
key: 'A'
Is this on purpose for a reason I'm missing?