2

We develop an application which runs full screen so the modifier indicators are not visible.

So I now need a solution to update icons we put on the display with the state of orange, blue and shift. The fun part is this solution should work on Omnii XT 10, Omnii XT 15, MC65, WAP 3, WAP 4, MC91 and MC92 in WinMobile 6.0 and 6.5 and CE6.

I got a solution for the Psion devices using the Mobile Devices SDK V8.0_8.42743. It will force me to copy different DLLs on to the devices depending on the OS but at least it works well then.

On the MC65 I get it to work with Motorola EMDK for .NET v2.9 (or v2.8 - either works). However I expected this to also work on the MC91 and MC92 but it does not. Those actually claim it does: Release Notes - EMDK for .NET v2.8

However it turns out the keybddr.dll in those devices has different functions. While I can get their names I still do not have their signature so I can only guess and hope.

MC91

GetAlphaMode
GetKeybdMode
GetKeybdState
RegisterKeyboardNotification
RegisterKeyStateNotification
SetAlphaMode
SetKeyState
SetMappingTable
SetMultiMappingTable
UnregisterKeyboardNotification
UnregisterKeyStateNotification

MC65

GetKbdModiferState
GetKeyStateEx
GetValidKbdModifers
SetKbdModifierState
SetKeyState

The only idea left for MC91 and MC92 is to analyse the Windows Message Queue myself and record the different messages. However, not all devices send key events for orange and blue. I would also have to track the sequence of messages for enabling, disabling, locking those modifier keys and for pressing a key modified by those keys. This seems like a lot of work and very prone to errors. Not something my bosses are willing to entertain.


Question:

Can someone suggest a way to get the state of orange, blue and shift on MC91 and MC92 and ideally one that would work on all the devices and OSs listed above?

Holly
  • 1,305
  • 2
  • 15
  • 30
  • You already did the right: address this to motorola/zebra support. Even if you have the names of the Exported functions of keybddr.dll you still need to know the function arguments, types and return codes. Watching the message queue will not help. Hardware Keyboard States are not handled normally via the standard windows message queue. If there is no key message and no documentation about how to manage these hardware key states then you are lost. – josef Oct 04 '16 at 16:47

1 Answers1

0

I don't know the specific devices you are listing, but if the keys are emulated via virtual keys in the OS, you can try GetAsyncKeyState https://msdn.microsoft.com/en-us/library/ms929204.aspx and call it when you need to check if one of those keys is down or in a polling loop if pressing them should trigger some kind of event. This should work on any release of Windows CE/Mobile.

Valter Minute
  • 2,177
  • 1
  • 11
  • 13
  • this does not work for Orange and Blue and not even for orange+key; besides it would still mean I would need to track the state of the modifier keys myself and the sequence of codes depends on the device since Blue and Orange are not standard buttons – Holly Oct 04 '16 at 15:23