FreeKQuency23
2006.04.13, 03:38 PM
Hi,
I am trying to write controls for a first person camera with strafing and movement
using the 'wasd' keys.
Currently Im using a single event keypress handler in cocoa:
-(void)keyDown: (NSEvent *)theEvent
How can I handle more than one keypress at a time? like if you want to strafe and move forward at the same time, you would press both 'w' and 'd' and then of course ill need more keys for shooting and jumping or crouching, etc...
thanks.
One consideration is to completly switch my windowing to carbon libraries.
but Id rather not rewrite everything. There has to be a way in cocoa.
I am trying to write controls for a first person camera with strafing and movement
using the 'wasd' keys.
Currently Im using a single event keypress handler in cocoa:
-(void)keyDown: (NSEvent *)theEvent
How can I handle more than one keypress at a time? like if you want to strafe and move forward at the same time, you would press both 'w' and 'd' and then of course ill need more keys for shooting and jumping or crouching, etc...
thanks.
One consideration is to completly switch my windowing to carbon libraries.
but Id rather not rewrite everything. There has to be a way in cocoa.