Simulating Pressing a Keyboard button.
Hi,
I'm currently using max/msp with a course at uni. The patch I'm working on at the moment, I'm trying to interface with a game through gestures. I've finished with the gesture recognition, but interfacing with the game is another matter.
The method I was hoping I could use was that you could somehow simulate pressing a key on the keyboard inside max. For example, if they made a gesture that was mapped to accelerate, it would 'press' the up key which would then be interpreted by the game as accelerate.
I was wondering if simulating keystrokes is possible at all, and if anyone can direct me in the right direction. If this isn't, I'll start looking down other paths.
Thanks!
Mac or Windows?
Sorry, I should have said.
It's for windows.
I can't work out how to edit... so I'll double post.
I think I may have found the answer to my problem, I just need help implementing it.
Something about a java class called Robot, that simulates keypresses and mouse events.
I am guessing that I use the mxj object, any help on how to do this would be appreciated.