I am working on project with an external USB Keyboard and am using the USBX Host Class HID framework and am having an couple of issues.
1) Using ux_host_class_hid_keyboard_key_get() to get the keyboard events, I do not get the correct value for the LEFT arrow key press. It returns 205 decimal which is the value for the RIGHT arrow. Using the keypad (with num lock off) I get the correct values of 203 and 205 for the LEFT and RIGHT keypad arrows.
2) The second issue I am having is this:
2a) First key is pressed and held. I get the correct key press event. 2b) Second key is pressed and released. I get the first key event then the second key event then the first key event again. I assume there must be a way to mask this behavior so I can blank keys that have not been released or determine if it is being held etc. Looking through the USBX host docs I was not able to located any info.
2a) First key is pressed and held. I get the correct key press event.
2b) Second key is pressed and released. I get the first key event then the second key event then the first key event again. I assume there must be a way to mask this behavior so I can blank keys that have not been released or determine if it is being held etc. Looking through the USBX host docs I was not able to located any info.
I am using SSP 1.4.0 and E2 6.3.0.
I tried adding the USBX Host Class HID source to debug, but the ux_host_class_hid_keyboard_key_get() function is still hidden and I cannot view it. Any help or insight would be appreciated. Thank you.
Hi Jamie, Sorry for the late reply. I took another look at the existing Host HID keyboard class implementation to see if there is a way to get you key up events but was unsuccessful. Even if the HID keyboard class did have some way to get to the raw report it throws away these events after it parses out the keys. Right now the only way to do this is to write your own Host HID keyboard class on top of the USBX Host HID stack. This would be a rather significant undertaking unless you have a source license for the class. In your original post you stated that you are unable to view these encrypted source files. To do this you will need to use a production and development license which you can get from the Gallery. Dale