PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

hardware keys problem

Hi, when I create the pocket frog display my application stops receiving hardware key press events such as the soft keys buttons and phone and hangup. However the navigation keys and enter still work. Is there anyway to prevent pocket frog, or hal capturing these hard keys?
It seems the key stuff happens in hal and not frog, is it possible to get the source for hal?
PocketHAL doesn't do anything with keys that PocketFrog doesn't. IE: it calls GXOpenInput() and that's it.

Unfortunately the source to PocketHAL isn't available at this time.
Cool I fixed it by calling GXCloseInput after I open the display.

I reckon the reason why the display takes an HWND in the constructor is so it can send the keys to the form's wndproc, however I'm using it from .NET with multiple forms and something seems to go wrong with it so its best I leave the key handing alone. I don't need access to the other hard keys at this time, but might hit this problem again if I need decide I need to catch them.
It is important that you provide a valid HWND to PocketHAL. If you don't, then it will fail on certain devices.

I could make "taking over input" optional... Would that solve your problem?
Yep input optional would be a good addition, I first looked for something like that in the DisplayParameters object, so perhaps thats a good place.

No rush tho, it seems GXCloseInput is working fine.

I did try to pass in a valid HWND but my application uses multiple .NET forms so I expect there are many different wndprocs/HWNDs expecting the key messages and HAL is sending them only to the one give to it at Display construction.
indiekiduk wrote:I did try to pass in a valid HWND but my application uses multiple .NET forms so I expect there are many different wndprocs/HWNDs expecting the keys.


The top-window HWND is needed to detect when something pops in front of your app (ie: when your app lose focus / is moved behind another window). If you don't provide it, then your app will probably crash when people receive a phone call.