Intermec Home

How to Buy | Partner Login

Developers Forum

Reply
Contributor
ErudioMentis
Posts: 15
Registered: January 29 2009
0
Accepted Solution

Keypad remap?

How do I remap the keypad?
Administrator
JohnR
Posts: 70
Registered: January 28 2009
0

Re: Keypad remap?

On which device?

John Ritch
Development Support
Cedar Rapids Iowa
Intermec Expert
hjgode
Posts: 1,589
Registered: January 29 2009

Re: Keypad remap?

[ Edited ]

Hello

 

on intermec devices running windows mobile (2003, 5 or 6.1) you can use the keypad remapping utility available in the intermec device resource kit.  In the installation directory of the resource kit you will find runtim directories with the keyboard remaper applet (named cpkbdmap.cpl, CN3kbdRemap.cpl, CK3kbdRemap.cpl). You can just copy such a cpl (Control Panel Applet) into the windows dir of the appropiate device and you will a new symbol in Start-Settings-System. With the applet you can assign the keypad keys to windows key codes, functions or intermec events. You can also export or import such keypad remap settings.

If you are a developer you can use the remapper API, which is described in the help file of the device resource kit (ie C:\Program Files\Intermec\Developer Library\Device Resource Kit\Documents\Device_Resource_Kit.chm). Here is an excerpt of this document:

 

Key Remapping Functions

Use the key remapping functions to change the values assigned to each of the physical keys on Intermec computer keypads. You can also load the Keyboard Remapper control panel applet on the Intermec computer to remap keys directly on the computer.

Key remapping is supported by these Intermec computers:

* 700 Color
* CK3
* CK61
* CN3
* CV30 (external keyboards)

The Key Remapper Library Functions include:

ITC_SetKeyValue - Sets the value for a single key.

ITC_GetKeyValue - Returns the current value for a single key.

ITC_ExportKeyMap - Export the current key map as an XML file.

ITC_ImportKeyMap - Import a key map via an XML file.

ITC_ResetKeyDefaults - Resets all key values to the default settings.

 


 

If the Applet does not offer you the remap you need, you have to use the API.

 

Some keys are not part of the remapper API and the applet. These keys are so called DirectKeys. The side buttons of the CK61, the CN3, the CN3e and all buttons of the 700 color series are managed as direct keys.

 

On other devices, in example the CK30/CK31 there is an utility called  FilterKeysToggle.exe in windows dir. There is a good description on how to use the tool in the CK3x user manual. Please see the user manual on how to use the tool.

 

Attached are documents describing some remapping technics.

 

regards

 

josef

 

 

Message Edited by hjgode on February 2 2009 10:19 AM
.....................Don't be lazy, give KUDOS........................
-------------==========================--------------
See all my tips and tools at hxxp://www.hjgode.de/dev
and the NEW http://www.hjgode.de/wp
code at google com:
http://code.google.com/p/itc-keyboard/
http://code.google.com/p/rdesktop-ce/
http://code.google.com/p/win-mobile-code/source/browse/#svn%2Ftrunk
Moderator
DarrenBeckley
Posts: 261
Registered: January 29 2009

Re: Keypad remap?

[ Edited ]

I have attached an an additional document on keyboard remapping called "Keyboard Remapping on CN3, CN30, CK32, CK61 and CV30.pdf". It should be read together with "Reprogramming the USB Keypad.pdf" available from answer 8988 in Knowledge Central:

 

CK30, CN3, CN30, CV30, CK60, CK61 - How do you reprogram keys on these terminals?

 

Message Edited by DarrenBeckley on February 2 2009 11:24 AM
Darren Beckley
Technical Consultant
Intermec Technologies UK Ltd
Moderator
AdamH
Posts: 15
Registered: January 27 2009
0

Re: Keypad remap?

Good info guys.  thanks.
Adam Hoge
Product support - Tech Lead
Member
Lena
Posts: 4
Registered: July 6 2009
0

Re: Keypad remap?

[ Edited ]

Hi all,

 

I need to lock the Keyboard from CV30, so I've thought reprogram the keyboard key's to No-opertation and I'm trying to access the key remapper functions:

 

The Key Remapper Library Functions include:

ITC_ImportKeyMap - Import a key map via an XML file.

ITC_ResetKeyDefaults - Resets all key values to the default settings.

 

But I cannot access them, and I don't Know how to do it (I'm relatively new into embedded programation, and really more into Intermec devices world), do I need to attach a particular reference into my C# solution?? (I've installed the INTERMEC Device Resource Kit Version 3.50, but I think that's not enough). In other way, how have I got to call the dll:

 

[DllImport("itcKbdJni.dll", SetLastError = true)]
public static extern long ITC_ImportKeyMap(string FileName);

 

??

 

Thanks for your help!

 

Best regards,

Elena.

Message Edited by Lena on July 6 2009 05:02 PM
Intermec Expert
hjgode
Posts: 1,589
Registered: January 29 2009

Re: Keypad remap?

[ Edited ]

Hello Lena

 

you should better have opened a new thread for your problem.

 

Anyway, are you really using JAVA? The jni lib you use in your DLLimport statement is a helper wrapper for JAVA.

 

For the remapping you have to install/use the jni wrapper (OK) and you have to have the xxkbdrmap.cpl in place (\windows). The wrapper uses the the cpl 'runtime'.

The runtimes for the different OS's can be found below the device resource kit dir in a tree called runtimes.

 

From the help file of device resource kit:

 

Header and Library Files For the 700 and CK61, the key remapper functions require: Header File: Keyboard Remap.h Library: CPKBDMap.cpl CPKBDMAP.lib For the CK3, the key remapper functions require: Header File: CK3 Keyboard Remap.h Library: CK3kbdRemap.cpl CK3kbdRemap.lib For the CN3, the key remapper functions require: Header File: CN3 Keyboard Remap.h Library: CN3kbdRemap.cpl CN3kbdRemap.lib For the CV30, the key remapper functions require: Header File: CV30 Keyboard Remap.h Library: CV30kbdRemap.cpl CV30kbdRemap.lib Loading the DLL The Key Remapper functions are in this .cpl file: CPKBDMap.cpl (700 Color and CK61) CN3kbdRemap.cpl (CN3) CV30kbdRemap.cpl (CV30) This file must be present on the computer and in the DLL search path. To enable keyboard remapping on your computer, copy the .cpl file to the Windows directory on the computer. For Pocket PC 2002, the DLL is at Device Resource Kit/Runtime/WCE300/Pocket PC 2002/arm. For Windows Mobile 2003, the DLL is at Device Resource Kit/Runtime/WCE420/Pocket PC 2003/armv4. For Windows Mobile 5.0, the DLL is at Device Resource Kit/Runtime/WCE500/WM5.0/Armv4i. If you loaded the Keyboard Remapper Control Panel applet, the DLL has already been installed in the Windows directory. Notes Function templates for C++ can be found in Keyboard Remap.h for the 700 and CK61, CN3 Keyboard Remap.h for the CN3, or in CV30 Keyboard Remap.h for the CV30. For C++, the library file (CPKBDMap.lib, CN3kbdRemap.lib, or CV30kbdRemap.lib) is available for accessing the API. For Visual Basic, see API Access from Visual Basic for more information.

 

There is also a reference to VB:

 

 

API Access from Visual Basic The following Declare statements may be placed in a Visual Basic module to allow access to the Keyboard Remapper library functions. See Keyboard Planes, Key Identifiers, Possible Key Values, and the sample keymap file for the 700/CK61, CK3, CN3, or CV30 for appropriate values to use as arguments. For 700 and CK61 These statements assume that the CPKBDMap.cpl reside in the Windows directory on the 700 Color or CK61. They will need to be revised if the DLL is located elsewhere. Declare Function ITC_ExportKeyMap Lib "\windows\CPKBDMap.cpl" (ByVal FileName As String) As Long Declare Function ITC_ImportKeyMap Lib "\windows\CPKBDMap.cpl" (ByVal FileName As String) As Long Declare Function ITC_SetKeyValue Lib "\windows\CPKBDMap.cpl" (ByVal Plane As Long, ByVal scancode As Long, ByVal NewValue As Long, ByVal Repeat As Long) As Long Declare Function ITC_GetKeyValue Lib "\windows\CPKBDMap.cpl" (ByVal Plane As Long, ByVal scancode As Long, ByRef Repeat As Long) As Long Declare Function ITC_ResetKeyDefaults Lib "\windows\CPKBDMap.cpl" () As Long

You have to replace the references to CPKBDMap with the device specific cpl name (ie "\windows\CV30kbdRemap.cpl")

 

 

 

Does this help?

 

regards

 

Josef

Message Edited by hjgode on July 7 2009 06:24 AM
.....................Don't be lazy, give KUDOS........................
-------------==========================--------------
See all my tips and tools at hxxp://www.hjgode.de/dev
and the NEW http://www.hjgode.de/wp
code at google com:
http://code.google.com/p/itc-keyboard/
http://code.google.com/p/rdesktop-ce/
http://code.google.com/p/win-mobile-code/source/browse/#svn%2Ftrunk
Member
Lena
Posts: 4
Registered: July 6 2009
0

Re: Keypad remap?

[ Edited ]

Hello hjgode,

 

Thanks for your help. I'm using C#, finally I've founded the correct sintax:

 

[DllImport(@"\Windows\CV30kbdRemap.cpl", SetLastError = true)]
public static extern bool ITC_ImportKeyMap(string FileName);
 ITC_ImportKeyMap(@"\SD Card\keyboard_ok.xml"); // The file to load

 

But, now, I have a new problem, when I call the function it doesn't make anything, so I cannot unload key values (I think the xml file is correct, because I've generated it in my CV30 with the Keymap remapper apple.

 

Many thanks in advanced.

 

Best regards, Elena.

Message Edited by Lena on July 7 2009 09:43 AM
Intermec Expert
hjgode
Posts: 1,589
Registered: January 29 2009

Re: Keypad remap?

If you have used the API to remap single keys, you had to fire an event to let the driver know it has to refresh its keypad table. Maybe this is also needed if using the XML file to load the mappings.

 

Here is what I use in USBkey:

 

int CUSBkey::updateUSBkeyboard(){ HANDLE hEvent = CreateEvent(NULL, false, false, L"ITC_KEYBOARD_CHANGE_USB"); if (hEvent == NULL) return -1; else if (GetLastError()!=ERROR_ALREADY_EXISTS) return -3; if (!SetEvent(hEvent)) return -2; CloseHandle(hEvent); return 0; }

 

BTW: I dont find this (remapping all keys to NoOp) a good solution to lock for keypad input. I recommend you use a central keyboard message routine and the AllKeys() API call to get all keys transfered to your app. If your app is in locked state, just ignore the keypresses (e.Cancel=true).

Another way would be a Keyboard hook dll, which consumes all key presses as long as a lock flag is set.

 

regards

 

Josef

 

@Moderators: Are you able to move the three message to a new thread?

 

.....................Don't be lazy, give KUDOS........................
-------------==========================--------------
See all my tips and tools at hxxp://www.hjgode.de/dev
and the NEW http://www.hjgode.de/wp
code at google com:
http://code.google.com/p/itc-keyboard/
http://code.google.com/p/rdesktop-ce/
http://code.google.com/p/win-mobile-code/source/browse/#svn%2Ftrunk
Contributor
tshepisom
Posts: 10
Registered: February 16 2009
0

Re: Keypad remap?

Hi.

 

I want to remap the side button keys on the CN50, so that when pressed they laucnh a specific application assigned to them.

 

I see on this tool, under the "Value" option, there is "App1, App2" etc

is this the way i should do it, and where do i assign App1 to the application directory?

 

Thanks in advance.

T.M.

T.M

© 2010 INTERMEC TECHNOLOGIES CORPORATION. ALL RIGHTS RESERVED.