key test with variable keys
              in 
             Programming Questions 
              •  
              11 months ago    
            
 
           
             I'm trying to setup a processing script where I can use a variable in the place of a char() to do the key() command.
            
             
            
            
             
            
            
 
            
           
             ie: Instead of saying if(key=='1'), I want to say, 
            
            
             void draw(){
            
            
             for(i=0;i<10;i++){
            
            
             if(key=i){
            
            
             variable=i;
            
            
             }
            
            
             }
            
            
             where i is the iterator in a for loop.  I need to do this because I'm setting up a script where the number of keys to pressed varied.  Anyone have a suggestion as to how to go about this:
            
 
            
              
              1  
            
 
            
 
 
           
 
            