FAQ
Cover
This is the archive Discourse for the Processing (ALPHA) software.
Please visit the new Processing forum for current information.

   Processing 1.0 _ALPHA_
   Bugs
   Bug Fixes, Implemented Suggestions
(Moderator: fry)
   arrow keys
« Previous topic | Next topic »

Pages: 1 
   Author  Topic: arrow keys  (Read 3806 times)
barikan

Email
arrow keys
« on: Jan 26th, 2004, 6:42pm »

rev 0067
 
i realized that arrow keys UP, DOWN, LEFT and RIGHT do not work in windows XP and mac. (applets in browser)  
 
if (keyPressed)
{
  if(key == UP) { do(); }
  if(key == DOWN) { do(); }
  if(key == LEFT) { do(); }
  if(key == RIGHT) { do(); }
}
 
i used getKeyCode() to make them work on xp and mac.  
 
burak
 
fry


WWW
Re: arrow keys
« Reply #1 on: Jan 27th, 2004, 3:31am »

huh, that's odd.. though it's prolly related to another key problem, where keyPressed() and keyTyped() do different things for the key and the keyCode in java, and i'm not properly handling the difference. i'll make a note to fix.
 
fry


WWW
Re: arrow keys
« Reply #2 on: Sep 21st, 2004, 12:54am »

found and fixed for megabucket. you'll just need to use 'keyCode' from 0070 on, since it was conflicting with 'key'.
 
Pages: 1 

« Previous topic | Next topic »