-
I'm playing around with the If the callback functions for the Key handlers set by the The
If the Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 3 replies
-
The USB keyboard driver supports a cooked mode with escape sequences and a raw mode, which provides the raw USB keyboard codes and modifier key info. There is no way to access the |
Beta Was this translation helpful? Give feedback.
-
I see how the USB Keyboard driver class works, but I'm not quite sure why the However, I do see the
My point was that it seems unnecessary creating another instance of |
Beta Was this translation helpful? Give feedback.
-
I was wanting to use the How is it possible to register a KeyReleased handler in a similar fashion to KeyPressed ? I know I can add my own code for detecting when a key was last pressed and then released. But I thought it would useful for the |
Beta Was this translation helpful? Give feedback.
-
Thanks @rsta2 that is what I have ended up doing and the raw handler sends 0 for parameters when all keys are released. I will upload a sample of my keyboard testing kernel, maybe you can spot something out of place. |
Beta Was this translation helpful? Give feedback.
-
Ok, I'm using a Rpi 1 Model B for build and test. I'm sure I could easily code my own key repeat methods. I think some of my issues may have been casued by not having |
Beta Was this translation helpful? Give feedback.
-
I've managed to sort out all the keyboard issues by changing the mixedmode boolean parameter in Key repeats work perfectly now in the cooked handler and I can also capture the modifer keys in the raw mode handler. |
Beta Was this translation helpful? Give feedback.
You are welcome. Please note that the keyboard repeat function only works in cooked mode. There is no repeat in raw mode. There have also been issues with keyboard repeat. Sometimes the repeat did not stop. That's why it is not enabled by default. But I've tested it here again with sample/08-usbkeyboard (also in mixed mode) on a RPi 4 and it worked all right.