-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
Description
Create a simple graphical window.
SuperStrict
'Framework Brl.Retro
Import Brl.Graphics
Import Brl.GLMax2D
Import Pub.Win32
SetGraphicsDriver GLMax2DDriver()
Graphics 800,600
Function MyHook:Object( id:Int,data:Object,context:Object )
Local ev:TEvent=TEvent(data)
If Not ev Return data
Print "event: "+ev.id +" data="+ev.data
End Function
AddHook EmitEventHook,MyHook,Null,0
While Not (KeyHit(KEY_ESCAPE) Or AppTerminate())
DrawText "A = "+KeyDown(KEY_A), 0, 200
Flip
Cls
Wend
Hold "A" and Alt-Tab (needed, as clicking "somewhere into another window" does not emit suspend-events).
Keep holding "A" and Alt-Tab back into your window.
For BlitzMax "A" is no longer "down/hold" - as it flushes keys / mouse buttons.
Ok. If you now removed the flushkeys/flushmouse commands when suspending/resuming your app, you could release "A" while suspended but for blitzmax it is "down/hold" when alt-tabbing in again - and it keeps "hold" until you tap "A" again.