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

fix: USB HID Keyboard raw report #9473

Merged
merged 1 commit into from
Apr 10, 2024
Merged

fix: USB HID Keyboard raw report #9473

merged 1 commit into from
Apr 10, 2024

Conversation

SuGlider
Copy link
Collaborator

@SuGlider SuGlider commented Apr 9, 2024

Description of Change

Fixes key modifier bitmap when using USBHIDKeyboard::pressRaw(uint8_t k) and USBHIDKeyboard::releaseRaw(uint8_t k).

The modifiers are marked in a bitmap in the HID Report Descriptor.

Bit:        7   6   5   4   3   2   1   0
          +---+---+---+---+---+---+---+---+
Byte 0    | RG| RA| RS| RC| LG| LA| LS| LC|  Modifier bits (LC=Left Control, LS= Left Shift, etc)
          +---+---+---+---+---+---+---+---+
Byte 1    |        Reserved byte          |
          +---+---+---+---+---+---+---+---+
Byte 2    |        Key 1                  |
          +---+---+---+---+---+---+---+---+
Byte 3    |        Key 2                  |
          +---+---+---+---+---+---+---+---+
Byte 4    |        Key 3                  |
          +---+---+---+---+---+---+---+---+
Byte 5    |        Key 4                  |
          +---+---+---+---+---+---+---+---+
Byte 6    |        Key 5                  |
          +---+---+---+---+---+---+---+---+
Byte 7    |        Key 6                  |
          +---+---+---+---+---+---+---+---+

Tests scenarios

ESP32-S2

Related links

Fix #9377

@SuGlider SuGlider added this to the 3.0.0-RC1 milestone Apr 9, 2024
@SuGlider SuGlider self-assigned this Apr 9, 2024
Copy link
Contributor

github-actions bot commented Apr 9, 2024

Warnings
⚠️

The source branch "SuGlider-patch-1" incorrect format:

  • contains uppercase letters. This can cause troubles on case-insensitive file systems (macOS).
    Please rename your branch.

👋 Hello SuGlider, we appreciate your contribution to this project!


Click to see more instructions ...


This automated output is generated by the PR linter DangerJS, which checks if your Pull Request meets the project's requirements and helps you fix potential issues.

DangerJS is triggered with each push event to a Pull Request and modify the contents of this comment.

Please consider the following:
- Danger mainly focuses on the PR structure and formatting and can't understand the meaning behind your code or changes.
- Danger is not a substitute for human code reviews; it's still important to request a code review from your colleagues.
- Resolve all warnings (⚠️ ) before requesting a review from human reviewers - they will appreciate it.
- To manually retry these Danger checks, please navigate to the Actions tab and re-run last Danger workflow.

Review and merge process you can expect ...


We do welcome contributions in the form of bug reports, feature requests and pull requests.

1. An internal issue has been created for the PR, we assign it to the relevant engineer.
2. They review the PR and either approve it or ask you for changes or clarifications.
3. Once the GitHub PR is approved we do the final review, collect approvals from core owners and make sure all the automated tests are passing.
- At this point we may do some adjustments to the proposed change, or extend it by adding tests or documentation.
4. If the change is approved and passes the tests it is merged into the default branch.

Generated by 🚫 dangerJS against 638be04

@SuGlider SuGlider requested a review from me-no-dev April 9, 2024 18:34
@SuGlider
Copy link
Collaborator Author

SuGlider commented Apr 9, 2024

@me-no-dev - a quick fix. Please add it to release/v2.x branch too.

@SuGlider SuGlider added Area: Libraries Issue is related to Library support. Area: BLE Issues related to BLE and removed Area: BLE Issues related to BLE labels Apr 9, 2024
Copy link
Collaborator

@lucasssvaz lucasssvaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@P-R-O-C-H-Y P-R-O-C-H-Y added the Status: Pending Merge Pull Request is ready to be merged label Apr 10, 2024
@me-no-dev me-no-dev merged commit 8ceb4ba into master Apr 10, 2024
69 checks passed
@me-no-dev me-no-dev deleted the SuGlider-patch-1 branch April 10, 2024 08:54
me-no-dev pushed a commit that referenced this pull request Apr 10, 2024
P-R-O-C-H-Y pushed a commit to P-R-O-C-H-Y/arduino-esp32 that referenced this pull request Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Libraries Issue is related to Library support. Backport needed 🔙 Status: Pending Merge Pull Request is ready to be merged
Projects
Development

Successfully merging this pull request may close these issues.

USB USBHIDKeyboard::pressRaw() modifier key not working
4 participants