From 99a4d8fa304dfae48c07a370b51beedc7dd7ad0b Mon Sep 17 00:00:00 2001 From: REAS Date: Wed, 22 May 2013 14:38:13 -0700 Subject: [PATCH] Adjustment to KeyboardFunctions example --- .../Basics/Input/KeyboardFunctions/KeyboardFunctions.pde | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/java/examples/Basics/Input/KeyboardFunctions/KeyboardFunctions.pde b/java/examples/Basics/Input/KeyboardFunctions/KeyboardFunctions.pde index f0554ab93..e08079140 100644 --- a/java/examples/Basics/Input/KeyboardFunctions/KeyboardFunctions.pde +++ b/java/examples/Basics/Input/KeyboardFunctions/KeyboardFunctions.pde @@ -54,8 +54,8 @@ void draw() void keyPressed() { - // If the key is between 'A'(65) and 'z'(122) - if( key >= 'A' && key <= 'z') { + // If the key is between 'A'(65) to 'Z' and 'a' to 'z'(122) + if((key >= 'A' && key <= 'Z') || (key >= 'a' && key <= 'z')) { int keyIndex; if(key <= 'Z') { keyIndex = key-'A';