{"action":"created","issue":{"url":"https://api.github.com/repos/processing/p5.js/issues/536","labels_url":"https://api.github.com/repos/processing/p5.js/issues/536/labels{/name}","comments_url":"https://api.github.com/repos/processing/p5.js/issues/536/comments","events_url":"https://api.github.com/repos/processing/p5.js/issues/536/events","html_url":"https://github.com/processing/p5.js/issues/536","id":57445556,"number":536,"title":"keyPressed event: upper and lower case","user":{"login":"shiffman","id":191758,"avatar_url":"https://avatars.githubusercontent.com/u/191758?v=3","gravatar_id":"","url":"https://api.github.com/users/shiffman","html_url":"https://github.com/shiffman","followers_url":"https://api.github.com/users/shiffman/followers","following_url":"https://api.github.com/users/shiffman/following{/other_user}","gists_url":"https://api.github.com/users/shiffman/gists{/gist_id}","starred_url":"https://api.github.com/users/shiffman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shiffman/subscriptions","organizations_url":"https://api.github.com/users/shiffman/orgs","repos_url":"https://api.github.com/users/shiffman/repos","events_url":"https://api.github.com/users/shiffman/events{/privacy}","received_events_url":"https://api.github.com/users/shiffman/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-02-12T10:59:44Z","updated_at":"2015-02-20T20:03:55Z","closed_at":null,"body":"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:\r\n\r\n```\r\nkey code: 65\r\nkey: 'A'\r\n```\r\n\r\n```\r\nfunction keyPressed() {\r\n  console.log(\"p5 keyCode: \" + keyCode);\r\n  console.log(\"p5 key: \" + key);\r\n}\r\n```\r\n\r\nWith native browser events, however\r\n\r\n```\r\nwindow.addEventListener(\"keypress\", function(e) {\r\n  console.log(\"native keycode: \" + e.which);\r\n  console.log(\"native key: \" + String.fromCharCode(e.which));\r\n});\r\n```\r\n\r\nI get:\r\n\r\n```\r\nkey code: 97\r\nkey: 'a'\r\n```\r\n\r\nand\r\n\r\n```\r\nkey code: 65\r\nkey: 'A'\r\n```\r\n\r\nIs this on purpose for a reason I'm missing?"},"comment":{"url":"https://api.github.com/repos/processing/p5.js/issues/comments/75309348","html_url":"https://github.com/processing/p5.js/issues/536#issuecomment-75309348","issue_url":"https://api.github.com/repos/processing/p5.js/issues/536","id":75309348,"user":{"login":"ipeluffo","id":889705,"avatar_url":"https://avatars.githubusercontent.com/u/889705?v=3","gravatar_id":"","url":"https://api.github.com/users/ipeluffo","html_url":"https://github.com/ipeluffo","followers_url":"https://api.github.com/users/ipeluffo/followers","following_url":"https://api.github.com/users/ipeluffo/following{/other_user}","gists_url":"https://api.github.com/users/ipeluffo/gists{/gist_id}","starred_url":"https://api.github.com/users/ipeluffo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ipeluffo/subscriptions","organizations_url":"https://api.github.com/users/ipeluffo/orgs","repos_url":"https://api.github.com/users/ipeluffo/repos","events_url":"https://api.github.com/users/ipeluffo/events{/privacy}","received_events_url":"https://api.github.com/users/ipeluffo/received_events","type":"User","site_admin":false},"created_at":"2015-02-20T20:03:55Z","updated_at":"2015-02-20T20:03:55Z","body":"Hi!\r\nFeel free to take a look to the following example I've made:\r\nhttp://jsbin.com/yotobu/6/edit?html,js,console,output\r\n\r\nThere you'll be able to see that the p5's \"keyTyped\" event is the same as the native event \"keypress\", and the p5's \"keyPressed\" event is actually \"keydown\" native event.\r\n\r\nSo, I believe that the behaviour noticed by @shiffman is the normal one :)"}}