|
Author |
Topic: multiple readkeys (Read 205 times) |
|
adriandacanadian
|
multiple readkeys
« on: Dec 5th, 2003, 5:37pm » |
|
hey, processing can read multiple keys at once right? This seems really basic, but in my code it reads the last key pressed. Any help would be beneficial Thanks Adrian
|
« Last Edit: Dec 5th, 2003, 5:44pm by adriandacanadian » |
|
|
|
|
fry
|
Re: multiple readkeys
« Reply #1 on: Dec 5th, 2003, 9:29pm » |
|
yeah, 'key' only stores the last key pressed. to keep track of keys as they're used, write methods called 'keyPressed' and 'keyReleased'. void keyPressed() { // another key was pressed, use it } void keyReleased() { // one of those keys was released } as far as keeping track of all the keys that are currently pressed, you'll have to write something of your own, via these methods.
|
|
|
|
|