Try this
Doug Stastny
Rem Replacement driver for polled input hooks flip command process the windows messages for input end rem SuperStrict Function FlipHookEvent:Object( id:Int ,data:Object,context:Object ) TExtendedWin32SystemDriver(context).FixPoll() Return data End Function Type TExtendedWin32SystemDriver Extends TWin32SystemDriver Method Poll() End Method Method FixPoll() super.Poll() End Method Method New() AddHook FlipHook,FlipHookEvent,Self End Method Method Delete() RemoveHook FlipHook,FlipHookEvent End Method End Type BRL.System.Driver=New TExtendedWin32SystemDriver ' Add above to initialize your framework ' simple test program. Now only yields once per frame Local F1:Int=False Local F2:Int=False Graphics 640,480 Flip While Not KeyHit(KEY_ESCAPE) Cls If KeyHit(KEY_F1) F1= Not F1 If KeyHit(KEY_F2) F2= Not F2 If F1 DrawText "F1 is on",0,0 If F2 DrawText "F2 is on",0,10 Flip Wend
Doug Stastny