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
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?
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.
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
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
Where can I find a complete list of keys with key numbers?
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