Implementing directional keypad

  • Thread starter Thread starter bill
  • Start date Start date
B

bill

Hi, I'm developing custom device using PXA270 and WinCE 5.0.
I want to implement a directional keypad which will have 4 buttons
effectively similar to say a gamepad, up arrow, down arrow, left
and right. This is so the user can navigate the main CF application
and move from say tab to tab rather than using touchscreen.

I can develop a driver which would detect which button is pressed
and say generate an event but how could i transalte this to an
event in my CF application which would allow me to navigate the form.

Touchscreen presses result in standard windows messages but how do i
get my 4key pad to do something similar?
 
Have your driver post a message, call a keybd_event/PostKeyboardMEssage or
fire a named system event. It's up to you how you feel like implementing
it.

-Chris
 
Are you using the PXA's keypad matrix features? If you are you may
want to look at the mainstone II's keypad driver which I have used to
create a directional keypad, numeric pad and some hotkeys. The driver
would then post messages much like a keyboard which should make it
easier on the application and driver developers.


Duncan
 
We have a membrane keypad driven by a CPLD. I use keybd_event() to generate
events like a standard keyboard. If you don't have to have these keys as
special keys, try to make them like the arrow keys on a standard QWERTY
keyboard. The application software folks will love you for your efforts.
 
Back
Top