mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
Adjustment to KeyboardFunctions example
This commit is contained in:
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user