Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
arduino-esp32
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
arduino-esp32
Commits
83372a3b
Commit
83372a3b
authored
Apr 10, 2024
by
Rodrigo Garcia
Committed by
me-no-dev
Apr 10, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: USB HID Keyboard raw report (#9473)
parent
4465cacf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
libraries/USB/src/USBHIDKeyboard.cpp
libraries/USB/src/USBHIDKeyboard.cpp
+2
-2
No files found.
libraries/USB/src/USBHIDKeyboard.cpp
View file @
83372a3b
...
...
@@ -219,7 +219,7 @@ size_t USBHIDKeyboard::pressRaw(uint8_t k)
uint8_t
i
;
if
(
k
>=
0xE0
&&
k
<
0xE8
)
{
// it's a modifier key
_keyReport
.
modifiers
|=
(
1
<<
(
k
-
0x
8
0
));
_keyReport
.
modifiers
|=
(
1
<<
(
k
-
0x
E
0
));
}
else
if
(
k
&&
k
<
0xA5
)
{
// Add k to the key report only if it's not already present
// and if there is an empty slot.
...
...
@@ -250,7 +250,7 @@ size_t USBHIDKeyboard::releaseRaw(uint8_t k)
uint8_t
i
;
if
(
k
>=
0xE0
&&
k
<
0xE8
)
{
// it's a modifier key
_keyReport
.
modifiers
&=
~
(
1
<<
(
k
-
0x
8
0
));
_keyReport
.
modifiers
&=
~
(
1
<<
(
k
-
0x
E
0
));
}
else
if
(
k
&&
k
<
0xA5
)
{
// Test the key report to see if k is present. Clear it if it exists.
// Check all positions in case the key is present more than once (which it shouldn't be)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment