Skip to content

Commit b86997f

Browse files
authored
Merge pull request #257 from AdilRabbani/Fix-Keyboard-Example
Fixes Keyboard example
2 parents 05a75ab + cd79a8b commit b86997f

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/data/examples/en/21_Input/03_Keyboard.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ function draw() {
2020

2121
function keyPressed() {
2222
var keyIndex = -1;
23-
if (key >= 'A' && key <= 'Z') {
24-
keyIndex = key.charCodeAt(0) - 'A'.charCodeAt(0);
23+
if (key >= 'a' && key <= 'z') {
24+
keyIndex = key.charCodeAt(0) - 'a'.charCodeAt(0);
2525
}
2626
if (keyIndex == -1) {
2727
// If it's not a letter key, clear the screen

src/data/examples/es/21_Input/03_Keyboard.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ function draw() {
2020

2121
function keyPressed() {
2222
var keyIndex = -1;
23-
if (key >= 'A' && key <= 'Z') {
24-
keyIndex = key.charCodeAt(0) - 'A'.charCodeAt(0);
23+
if (key >= 'a' && key <= 'z') {
24+
keyIndex = key.charCodeAt(0) - 'a'.charCodeAt(0);
2525
}
2626
if (keyIndex == -1) {
2727
// If it's not a letter key, clear the screen

src/data/examples/zh-Hans/21_Input/03_Keyboard.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ function draw() {
2020

2121
function keyPressed() {
2222
var keyIndex = -1;
23-
if (key >= 'A' && key <= 'Z') {
24-
keyIndex = key.charCodeAt(0) - 'A'.charCodeAt(0);
23+
if (key >= 'a' && key <= 'z') {
24+
keyIndex = key.charCodeAt(0) - 'a'.charCodeAt(0);
2525
}
2626
if (keyIndex == -1) {
2727
// If it's not a letter key, clear the screen

0 commit comments

Comments
 (0)