If you want to use Max2D style keyboard capture on a GLCanvas, you can do something like this :
And then, in your OnPaint event, you can work much like you would with Max2D, using things like KeyDown() and KeyUp() to determine current key states.
Are you using the custom appstub for OS X? That fixes numerous problems with BRL's appstub and the fact it is designed to work with Cocoa.
... Type MyCanvas Extends wxGLCanvas Method OnInit() EnablePolledInput(Self) ConnectAny(wxEVT_KEY_DOWN, OnKeyDown) ConnectAny(wxEVT_KEY_UP, OnKeyUp) End Method Function OnKeyDown(event:wxEvent) Local evt:wxKeyEvent = wxKeyEvent(event) EmitEvent(CreateEvent( EVENT_KEYDOWN, event.parent, MapWxKeyCodeToBlitz(evt.GetKeyCode()))) event.Skip() End Function Function OnKeyUp(event:wxEvent) Local evt:wxKeyEvent = wxKeyEvent(event) EmitEvent(CreateEvent( EVENT_KEYUP, event.parent, MapWxKeyCodeToBlitz(evt.GetKeyCode()))) event.Skip() End Function ... End Type
And then, in your OnPaint event, you can work much like you would with Max2D, using things like KeyDown() and KeyUp() to determine current key states.
Are you using the custom appstub for OS X? That fixes numerous problems with BRL's appstub and the fact it is designed to work with Cocoa.