Thursday, 22 December 2005

HOWTO: Program Symbol MC3000 function keys

With my powers of intuition, I divine that someone out there needs to handle or program the function keys on the Symbol MC3000 device.

(Well, OK, it turned up in my referrer log – click the tracker icon at the bottom of the right-hand bar!)

The 28–key variant has F1 through F10 available through pressing the blue Func button and then the corresponding number key. The 38–key variant has F1 through F10 keys, then F11 through F14 on Func+F1 to Func+F4. The 48–key variant has F1 to F13 on Func+A to Func+M. (Nothing like consistency). When pressed, these will appear as VK_F1 through VK_F14 in your application’s WM_KEYDOWN and WM_KEYUP handlers or their equivalent in your environment (Control.KeyDown and Control.KeyUp events in the .NET Compact Framework, the value of KeyEventArgs.KeyCode will be Key.F1 through Key.F14).

That’s the default keyboard map. If you want to change the keyboard map, on any Symbol device, you need the Device Configuration Package for that device, which you can download from Symbol DevZone. In the package, you’ll find under Tools\kbtool a bunch of C++ files and a VC6 project. This is a program for your desktop computer which generates the keyboard map files. Open this with VC6 or later.

Each keyboard layout has (up to) three files associated with it – for the MC3000, MC3000KeynnM, R and S.cpp, where nn is the number of keys. The M file controls the multiple-press key operations, such as the mobile-phone-style input on the 28–key variant. The R file controls remapping key functions in different shift states. Finally the S file controls the scan code that’s output by each key – this is normally the one you want to edit. The available scan codes can be found in the accompanying ScanCode.h file.

Running the program generates the files that the keyboard driver is looking for. For the MC3000 these are named MC3000–{28,38,48}.{sct,rmt,mmt}. You can either overwrite these files in their normal location (\Platform\Keyboard) or modify the registry under HKLM\Hardware\DeviceMap\KEYBD to point to your version of the files.

We did this for New Look to make the two keys below the screen – with the red and green surrounds – perform ‘soft key’ functions in their applications.

11 comments:

Anonymous said...

Thanks for your information !!
I did cant to re-map the red and green keys of symbolmc3090 48-keypad. And with your post i resolve this problem.

Anonymous said...

Hi I have to also thank you for this information. I did find almost anything about keyboard remapping in the accessible documentation.

But I need a little kick in the right direction. What I want to achieve is that the green button writes Y (as YES) and the red N (as NO). What should be written in the *S.cpp file?

I have found the line

SC_MINUS, // 02 RED KEY (Leave Red Key unmapped)

which I presume is for the red key, what should I write there? I am completely lost here, so please bare with me :-)

Thanks for any help.

Mike Dimmick said...

I actually don't have the DCP installed at the moment, but you should look at the 38-key and 48-key files for how the 'Y' key is configured. IIRC the alphabetic keys simply use their ASCII character codes, so you use 'Y'. If not, it's something like SC_Y.

Anonymous said...

Mike, thanks for such quick answer. I quickly checked the 48keys-file and says:

SC_YKEY,

So if I change the line from SC_MINUS -> SC_YKEY and compile the binaries, will it work as expected?

Regards,

Jan

André Moraes said...

Thank you very much...

It helped me a lot! :)

Anonymous said...

Hi!!
I speak only a bit english. I wait that you can understand me.
I found this post today and It help me a lot of.
However, I need re-map the F1 KEY to SHIFT+F1.
I don't know how can I make it.

thank you!!

Anonymous said...

great post!!!
It worked perfect for symbol MC3090 with windows ce 5. But when I tried on a MC3070 with wce4 the device only detects the keyup for the application buttons. Does anybody have an idea why is that happening?

Anonymous said...

Mike,

I need some help to remap keyboard. Actually, I have Symbol Device Coniguration Packages, I go in \Program Files\Symbol Device Configuration Packages\MC3000C50Aen\V1.4\Tools\kbtool and I find some .cpp and .h files like you said it but I don't understand how use them. There is a .dsw, I open it with VS2005 and convert project to Visual Project but it took all .cpp. Do I have to use just MC3000Key28{R-S-M}.cpp ?? (I have a MC3000 28 keys. I find your post looking for "how to use green and red keys"...

Thanks you a lot for help. :)

Anonymous said...

now that is intuitive... thanks for clearing this up, i have been trying to get those green/red buttons to work, and this solved it for me.

thanks again!

Anonymous said...

thank you!

mapped green button on mc3090-48keys
to ESC

though, need to cpy r/m/s keyfiles to
\Platform to persist

Anonymous said...

Thank you! I was searching this for a lot of time but today I did it