Game Development Community

Left Shift?

by Jeremy Alessi · in Torque Game Engine · 02/15/2006 (10:40 am) · 2 replies

As those who were at IGC who played Oust know ... there's a move modifier where you hold left shift to lunge at an opponent. I've recently brought the game back to cross-platform status on the Mac and PC but for some reason the Mac version of the game doesn't respond to the Left Shift move modifier. Is there anything I need to know about input for the Mac scripts that would be different from the PC? Is 'lshift' a valid name for the key on a Mac?

#1
02/15/2006 (5:07 pm)
OK, I run into the dumbest problems! Shift keys on my Mac keyboard just don't seem to work ... why could this be? There's nothing wrong with the functions in the game ... if I take out jump and remap the lunge to the spacebar it works fine ... shift just has no response no matter what. I'm assuming this is something to do with Mac OSX or something. Anyone have a clue how to get this key to be active?
#2
02/15/2006 (8:54 pm)
Jeremy,
The input code on the mac thinks of the shift keys as modifier keys, not as keys in their own right.
I intend to take a pass at the mac input code soon, so this may change.
I'm currently neck deep in reworking the OpenGL & windowing stuff, so I'm not going to be able to look at this right away.

Here's briefly what needs to be done: we need to listen for kEventRawKeyModifiersChanged events kinds, track the old modifier key state, and generate torque events based on which keys changed.

Look at the bottom of macCarbWindow.cc for the current keyboard event handling code.

Share and Enjoy

/Paul