Any way to ignore Alt key when using menu gadgets

BlitzPlus Forums/BlitzPlus Programming/Any way to ignore Alt key when using menu gadgets

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

I stick this in my main loop:

If KeyHit (LEFT_ALT) Then			
	User32_keybd_event(255,0,0,0)
	User32_keybd_event(255,0,KEYEVENTF_KEYUP,0)
EndIf

this just prevents left alt from making the main menu appearing and the game pausing, it may not be what you want. To get this to work you need to add this to user32.decls
User32_keybd_event%(bVk%, bScan%, dwFlags%, dwExtraInfo%) : "keybd_event" 

and these are the consts you need
Const LEFT_ALT = 56
Const KEYEVENTF_KEYUP = 2 ;used with Keybd_event