Skip to content

Added hidden F codes #74

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

Merged
merged 2 commits into from
Jul 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions adafruit_hid/keycode.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,17 @@ class Keycode:
F19 = 0x6E
"""Function key F19 (Mac)"""

F20 = 0x6F
"""Function key F20"""
F21 = 0x70
"""Function key F21"""
F22 = 0x71
"""Function key F22"""
F23 = 0x72
"""Function key F23"""
F24 = 0x73
"""Function key F24"""

LEFT_CONTROL = 0xE0
"""Control modifier left of the spacebar"""
CONTROL = LEFT_CONTROL
Expand Down
4 changes: 2 additions & 2 deletions examples/gamepad.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,13 @@ def __init__(self, devices):
self.reset_all()

def press_buttons(self, *buttons):
"""Press and hold the given buttons. """
"""Press and hold the given buttons."""
for button in buttons:
self._buttons_state |= 1 << self._validate_button_number(button) - 1
self._send()

def release_buttons(self, *buttons):
"""Release the given buttons. """
"""Release the given buttons."""
for button in buttons:
self._buttons_state &= ~(1 << self._validate_button_number(button) - 1)
self._send()
Expand Down