|
Author |
Topic: arrow keys (Read 3806 times) |
|
barikan
|
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
|
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
|
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'.
|
|
|
|
|