question on left and right soft key


Audience

Can I please have help on a support case I have? From what I can see the Left and Right soft keys on the MT2000 are mapped to App1 and App2 respectively. I have been told that App1 and App2 map to the Operating System level as C1 and C2. Is there a way to redefine this value? Possibly through the registry? I am not looking to remap App1 and App2 but instead change the value they are assigned to at the OS level. Thank you, Amy

Submitted by FBVN67 on May 04, 2019 Permalink

OK - Just to Recap:

MSP can not remotely control the Left and Right soft keys on the device UI because it can not generate the VK_APP1 and VK_APP2 (0xC1 and 0xC2) keycodes that the UI is looking for.  It would be more convenient for MSP if the device UI were looking for VK_F1 and VK_F2 for the softkey codes  (0x70 and 0x71)

It works the way with ActiveSync Remote Display as well.  

Device keyboard mapping will not help. It can change the keycodes returned to the application for the softkeys but it does not remapp what keys the application is looking for.  The UI suite will still be looking for the old VK_APPx keycodes.

Just thinking out loud here:

- Does there exist a keyboard that supports the VK_APP key codes that can be used with MSP?

- Does there exist a key mapping tool for the PC that can map 2 keys to the 0xC1 and 0xC2 keys the UI is looking for?

Submitted by USER07631 on May 04, 2019 Permalink

Hi Mike, 1.  VK_App1 and VK_App2 are Windows CE and Windows Mobile specific keys.  No windows key maps these on a PC. 2.  Not possible from what I can see.

Submitted by Li Chen on May 04, 2019 Permalink

The keypad driver change, in my opinion, is not really a good option. It has the same effect as doing the remapping via KBTool, which is designed for keypad remapping. But I believe the remapping of the keypad scancode to virtual key code has quite an impact on the behaior of the product, since it basically changes what keycode any app would get from CE. In this particular case, if I understand correctly, the customer is trying to deploy the unit automatically with MSP. Is it possible to use the remapped the key map files during deployment, and after it is done, copy back the original key map files? Also, would it be feasible to modify the MSP to accept 0xC1 and 0xC2? Again, those are just my opinions. Anyone has a better idea or find that I have missed something, please let us know.

Submitted by USER07631 on May 04, 2019 Permalink

Its not possible to get the MSP Remote Control Agent to accept C1 and C2. Think of the MSP Remote Control Agent like ActiveSync Remote Display.  Allows you to control device from remote PC with Windows Keyboard and Mouse. The problem here is that the Windows Keyboard does not have an App1 or App2 key...the App1 and App2 (C1 and C2) keys are specific to Windows CE and Windows Mobile. As such it cant do it.

Submitted by USER07631 on May 04, 2019 Permalink

Just to tie this off then, there is no way to remap the key that triggers the Left and Right Soft Key functionality from SC_App1 or C1 to F1 without a new keyboard driver?

Submitted by Li Chen on May 04, 2019 Permalink

Well, there is a remapping method without modifying the driver as I mentioned in the previous reply. Or, change the keypad driver to do the remapping in the OS level. The thing is that either way will change the behavior of the keypad. I am afraid we can not just make the change without worrying about the possible breaksown of other apps... That's my opinion. Please correct me if I am wrong.

Submitted by Li Chen on May 04, 2019 Permalink

I don't think ADCService controls the virtual key mapping. Neither does Symbol.MT2000.UserInterface.SoftKeys class. ScanItem would break if the keycode it gets from CE changed.

Submitted by Li Chen on May 04, 2019 Permalink

The UI code controls what it does on the softkeys (for instance the LeftSoftKeyPressed function all over the classes in UI code). They do not control what softkey should be mapped to.

Submitted by Li Chen on May 04, 2019 Permalink

The thing is that even if we change the virtual key mapping in the OS level (which means changing the keypad driver), it will still break the other apps that are already programmed to work on SC_App1 and SC_App2.

Submitted by USER07631 on May 04, 2019 Permalink

I dont see any explicit mention in those apps like ScanItem and ScanInventory to C1 and C2.  They just mention using the Symbol.MT2000.UserInterface.SoftKey class.  Correct me if I am wrong but is that not managed at ScannerServices level?

Submitted by USER07631 on May 04, 2019 Permalink

Its not even there app.  This is a Motorola issue entirely. They are using MSP to control the MT2090.  We make MSP.  Our Remote Control Agent is the one with the issue, but MSP team is at this time stating that F1 and F2 should work.

Submitted by Li Chen on May 04, 2019 Permalink

By remapping the left and right soft keys to F1 and F2, the app will never see C1 and C2 any more and the F1 and F2 are corresponding to the soft keys. If I understand correctly, there is no simple way (such as a reg key change) to modify the remapping of the same scancode to different virtual key on the OS level. That involves the keypad driver change.

Submitted by USER07631 on May 04, 2019 Permalink

So if I remap the Left Soft Key to SC_F1 from SC_App1, will pressing the Left Soft Key still bring up the Left Soft Key functionality in navigtor.exe?

Submitted by USER07631 on May 04, 2019 Permalink

Let me describe the exact issue. The customer is using the MSP Remote Control Agent.  This agent does not have the C1 and C2 keys in it. Therefore when controlling MT2090 remotely they cant get the Left and Right Soft Menu Buttons to activate. The though was the remap at the OS level the actual keys that trigger the Left and Right Soft Menu functions to different keys.  Not remap they hardware keys themselves to different values. That way no matter what button I press that is mapped to F1, Left Soft Menu Button FUNCTIONALITY gets triggered.