Skip to content
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