Game Development Community

Modifier keypress handling on mac

by Stewart Haines · in Torque Game Engine · 01/18/2008 (12:11 am) · 0 replies

I've just done a Mac build of our game client for the first time and am very pleased at how quickly it has come together.

One small issue arose regarding some of the scripted hud controls we use. There are gui controls whose visibility is toggled based on the state of modifier keys. The code for generating torque events from carbon key events was missing but it was clear where it should go. So I put it there.

I've documented my code changes in TDN rather than here. I'm sure the code can be polished (it works for what I need it to, but is not a complete implementation) so if it is relevant to anyone else, fix it there.

tdn.garagegames.com/wiki/Event_handling_of_modifier_keys

It probably doesn't belong where I've put it, but it is linked from a page called the MacPortGuide which seems reasonable to me in my current state of mind;

tdn.garagegames.com/wiki/Code/MacPortGuide