Only few keyboard keypresses recognized by FRDM-K22 Keyboard Demo

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Only few keyboard keypresses recognized by FRDM-K22 Keyboard Demo

1,274 Views
stevenlutz
Contributor II

I'm trying out a USB keyboard host demo for the first time on a FRDM-K22.
I loaded the frdmk22f_host_hid_mouse_keyboard_bm SDK demo project and can only get the demo to recognize a couple keystrokes from a ROTTAY Mechanical keypad. Specifically only the '+' Esc and backspace keys give any output.

Is this typical behavior for this demo?

Also the time it takes from a keypress to getting output is over 1-second. how can I speed this up to have seemingly instant responses as you would typing on a PC?

Thank you

0 Kudos
Reply
6 Replies

1,260 Views
stevenlutz
Contributor II

it turns out that the keys on a 10-key portion of a keyboard is what doesn't work.
What needs to be done so these keys are recognized?

0 Kudos
Reply

1,230 Views
bobpaddock
Senior Contributor III

We need more information to answer that question, such as a schematic or some idea of how the keypad is hooked up?  Is it on a different port from the working keyboard, was the port initialized correctly?

The more details in a question, the more details in the answers.

 

0 Kudos
Reply

1,266 Views
stevenlutz
Contributor II

A few issues solved but still not recognizing a 10-key type keypad.
The response delays mentioned in my previous post were only experienced while using the semihost during debug.
Using UART is an immediate response as expected.
However I'm still having issues with 2 keyboards.
A regular keyboard works while a 10-keypad doesn't the program output as seen below is what I'm experiencing. As you can see, the second keypad only outputs '=' when the '=' key is pressed, the rest of the numbers etc are non-responsive.

host init done
hid keyboard attached:pid=0x2vid=0x1c4f address=1
keyboard attached
asdf1234
keyboard detached
hid keyboard attached:pid=0x7603vid=0xc45 address=1
keyboard attached
===========


Please let me know what I can start checking on to have reliable communication between various keypads.
Thank you





 

0 Kudos
Reply

1,236 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi @stevenlutz ,

Please see host_keyboard.c. There is a g_HostKeyboardTable which defines all the keys it can support. It only has 57 keys. The keys in small keyboard have other key number. For example, '1' in the small keyboard has key number '89'. You have to add these keys' number by yourself.

 

Regards,

Jing

0 Kudos
Reply

1,206 Views
stevenlutz
Contributor II

Where can I find a complete list of keys with key numbers?

0 Kudos
Reply

1,189 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi @stevenlutz ,

I don't know where to fine this list. But you can put a printf() in USB_HostKeyboardPrintKey(), then record every unknow key number.

 

Regards,

Jing

0 Kudos
Reply