Control the green and orange keyboard shift planes on ITC device

Print This Post Print This Post

Hello

as this is asked from time to tim, here is a sample and a class in C# (VS2005) that enables you to switch the green and orange keyboard shift plane of the keyboards on ITC CN3, CN3e and possibly other ruggedized ITC handheld devices.

You can control the keyboard shift state and you can subscribe to an event to get information about changes in the keyboard shift panel state. With the latter, you can create an application that is always aware of the active keyboard shift plane.

KeyboardShiftAPI

On the left image you see, that no shift plane is active. In the mid image, the Orange button was pressed. If you had pressed the orange key on the keypad, the Lock mode would be Locked. On the right image the green button was pressed.

As soon as a state change is detected (polling frequency is 200ms), the focus is moved to the right TextBox and the background color of the upper TextBox changes.

The code is written in C# and uses the native WIn32 APIs KernelIOControl, DeviceIOControl and CreateFile. You can either ask the current state of the shift plane and set it directly using the provided static class, or you can use the dynamic class object. The dynamic class fires an event, if the keypad shift panle status changes.

[Download not found] [Download not found]

Leave a Reply