Skip to content

Commit 78b0fbb

Browse files
authored
Merge pull request #69 from jfurcean/fix-led-example
fix led_on example
2 parents de8fd34 + 08ed8db commit 78b0fbb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

adafruit_hid/keyboard.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,9 @@ def led_on(self, led_code):
168168
from adafruit_hid.keycode import Keycode
169169
import time
170170
171+
# Initialize Keybaord
172+
kbd = Keyboard(usb_hid.devices)
173+
171174
# Press and release CapsLock.
172175
kbd.press(Keycode.CAPS_LOCK)
173176
time.sleep(.09)

0 commit comments

Comments
 (0)