View Full Version : Keys in game.api
zehlein
10-29-2006, 06:03 PM
Maybe I'm just too blind to see, so could someone please enlighten me:
Using GameApi I can check for a pressing of the D-Pad via the g_key.vkxxx$ (where xxx is up/down/left/right) variable. This is on the PC represented by the cursorkeys. But is there any representation on the PC for the hardwarebuttons (g_key.vkA$,...)? I could not find and it would be pretty helpful while developing on the PC.
PointOfLight
10-29-2006, 09:08 PM
vkA$ = Space Bar, vkB$ = Left Control, and vkC$ = Left Shift. I'm not sure what the code for hardware button D is. I thought in a previous thread it was suggested that vkAux1 represented the D key, but I can't seem to find an equivalent for that on the PC.
zehlein
10-29-2006, 09:32 PM
yes, that helps! thx
zehlein
11-13-2006, 12:00 AM
well, I have to bring it up again:
vkA = SpaceBar
vkB = Left Control
but vkC does not trigger for me on the PC. It's not Left Shift and I did try out all keys and none worked. Anyone with an idea on that?
kornalius
11-13-2006, 04:46 PM
What about left control?
Heinz
11-13-2006, 05:02 PM
On my PC I could emulate the g_key.vkC$ from the PocketPC with the left shift key (however if you press not long enough (<<1sec) then it doesn't work - at least on my machine :)
kind regards,
Heinz
PointOfLight
11-13-2006, 05:19 PM
Try running this sample program. Whenever you hit a key, it should tell you what the corresponding vkXX$ code is. If it can't find one, a message will come up saying that no key was found. Just keep in mind that you must use the mouse to close the dialog, because hitting enter will trigger another keyboard event![br]1163438384_49_FT1132_gameapi_keys.zip
zehlein
11-13-2006, 06:42 PM
It's Left Shift with my machine. I will have to look why the code didn't respond to that.
Eric - pretty neat code you provided - never dreamt about this eval() functions could exist. Nice one!
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.