Hey Forum,
I am using the USB Composite Keyboard example using the standard Descriptor given in the example.
I am able to get all the keys on the Host with a small caveat - Whenever I continuously press a key I get repeatcounts in the App through the Android Framework. Please correct me on any of the stages below or any experiment to be performed.
1. I send app_usbd_hid_kbd_key_control(&m_app_hid_kbd, ev, true) (for KEYDOWN) when the GPIO is turned low and app_usbd_hid_kbd_key_control(&m_app_hid_kbd, ev, false) (for KEYUP) when GPIO is released. My assumption is that it needs to be done in this way.
2. The USB stack being used only sends the key once for KEYDOWN and once for KEYUP.
3. The Linux kernel gets only one event (using cat /sys/kernel/debug/hid/hid/0003\:1915\:520B.0001/events).
4. The Linux kernel descriptor is in line with the standard descriptor used in the Nordic example (using cat /sys/kernel/debug/hid/hid/0003\:1915\:520B.0001/rdesc).
5. In the dispatchKeyEvent I get a primary KEYDOWN and then keep getting KEYDOWN till I release the key and get a KEYUP.
For the moment I have tried to hack through by using this in the dispatchKeyEvent -
if (event.getRepeatCount() > 0) {
return false;
}
This is an initial experiment with the eval board at hand. My end goal is to create a gamepad driver for which I guess I have to use the USB generic source code example.
Regards
Yash