Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keyboard - Make always use HID no longer: public usbdriver #97

Merged
merged 5 commits into from Sep 11, 2022

Conversation

KurtE
Copy link
Contributor

@KurtE KurtE commented Sep 10, 2022

Changed the Keyboard to no longer be a top-level driver, but always rely on USBHidParser (or BT) to talk to the device.

One side effect of this, is I had to update several of the examples, that check for devices coming and going and remove them from the devices list and make sure they are on the HID list. Like Mouse.

Note: this also allowed me to remove the special case from HID.cpp to not shy away from claiming boot keyboard.

Also now with this, setup, the
Problem Gigabyte keyboard works without forcing it to go into boot mode. Although still does not resolve the issue that it faults the teensy some of the time... Nullptr for pipe in transfer struct when error condition causes code to walk that list.

Also added support for N-key rollover keyboards. That either work like that Gigabyte, or like Mike Aurus Gigabyte or my ReDragon one which after 6 keys pressed, it then switches to N key rollover messages for additional keys.

Lots more details up on the thread:
https://forum.pjrc.com/threads/71037-USBHost-Testing-Keyboard-object-not-top-level-object-instead-USBHIDParser

@mjs513 and I have been working on this update as well as testing.

A bunch of these were added years ago to work with FrankB's way of building sketches that can have per sketch configuration stuff
Changed the Keyboard to no longer be a top level driver, but always rely on USBHidParser (or BT) to talk to the device.

One side effect of this, is I had to update several of the examples, that check for devices coming and going and remove them from the devices list and make sure they are on the HID list.  Like Mouse.

Note: this also allowed me to remove the special case from HID.cpp to not shy away from claiming boot keyboard.

Also now with this, setup, the
Problem Gigabyte keyboard works without forcing it to go into boot mode.  Although still does not resolve the issue that it faults the teensy some of the time... Nullptr for pipe in transfer struct when error condition causes code to walk that list.

Also added support for N-key rollover keyboards.  That  either work like that Gigabyte, or like Mike Aurus Gigabyte or my ReDragon one which after 6 keys pressed, it then switches to N key rollover messages for additional keys.

Lots more details up on the thread:
https://forum.pjrc.com/threads/71037-USBHost-Testing-Keyboard-object-not-top-level-object-instead-USBHIDParser
The HIDDumper - code was updated to work better with showing keyboard data.

The keyboard_viewer - shows a psuedo keyboard on an ILI9341 display, and changes the color of which keys are pressed, helps visualize that the N key rollover is working.  Also shows last key pressed or released, including multi-media keys

The MouseKeyboardForward - is like KeyboardForward - but also shows debug info if not configured to usb type including keyboard (or mouse)
It is setup with two keyboards objects to help debug with Logitech Pro G wireless mouse which created a phantom keyboard.
@mjs513
Copy link
Contributor

mjs513 commented Sep 10, 2022

@PaulStoffregen @KurtE
Just to confirm the changes work for my two keyboards that I was testing with - the Gigabyte Aorus and RII wireless keyboard.

Also just to confirm all these changes were tested using the new toolchain (11.3.1) and we didn't run into any issues other than was already posted for USBHost and fixed.

As it is installed by Teensyduino.

Note: had a few issues, like CENTER support not there.
Plus Opaque drawing of text using Arial did not correctly
@PaulStoffregen PaulStoffregen merged commit cfa9065 into PaulStoffregen:master Sep 11, 2022
@KurtE KurtE deleted the HID_keyboard_pr branch September 11, 2022 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants