diff --git a/adafruit_hid/keycode.py b/adafruit_hid/keycode.py index 14ab81e..a4531f4 100644 --- a/adafruit_hid/keycode.py +++ b/adafruit_hid/keycode.py @@ -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 diff --git a/examples/gamepad.py b/examples/gamepad.py index ff496c3..01a9653 100644 --- a/examples/gamepad.py +++ b/examples/gamepad.py @@ -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()