Closed
Description
Currently, the keyboard_layout
member is only init'd if keyboard
is None
:
Adafruit_CircuitPython_MacroPad/adafruit_macropad.py
Lines 406 to 410 in 21def3e
This can result in getting a None
return if other calls have been done which initialize keyboard
.
Example:
Adafruit CircuitPython 7.0.0-alpha.5 on 2021-07-21; Adafruit Macropad RP2040 with rp2040
>>> from adafruit_macropad import MacroPad
>>> macropad = MacroPad()
>>> macropad.keyboard.send(0x04)
>>> a
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'a' is not defined
>>> macropad.keyboard_layout.write("hello world")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'NoneType' object has no attribute 'write'
>>>
Metadata
Metadata
Assignees
Labels
No labels