forked from micropython/micropython
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Milestone
Description
Setup
- Firmware: CircuitPython 6.2.0 beta 3 (en_US)
- Board: Raspberry Pi Pico
- Host: Apple MacOS Big Sur 11.2.2 on MacBook Pro 2014
Reproduce
- Load this code as
code.py
import time
import board
from digitalio import DigitalInOut, Pull
import usb_hid
from adafruit_hid.mouse import Mouse
button = DigitalInOut(board.GP16)
button.pull = Pull.DOWN
mouse = Mouse(usb_hid.devices)
while True:
time.sleep(0.1)
if button.value:
print('CLICK!')
mouse.click(Mouse.LEFT_BUTTON)
- Connect to host OS via USB cable.
- Push the button.
Expected results
- Mouse clicks are performed on pushing the button.
- It should work in any operative system.
Actual results
- MacOS recognises there is a mouse (see below), but fails to perform a mouse click.
- It does not work either in MacOS recovery mode (no user config).
- Works as expected on Windows 10.
- Works as expected on GNU/Linux.
- Works as expected on PC BIOS.
- No errors nor warnings are shown in the stdout.
Additional notes.
- Mouse movement and wheel does not work either, with same results regarding OS' (it works in everything but MacOS).
- Mouse
usb_hid.device
is present as expected with 0x01 page and 0x02 usage. - MacOS actually detects there is a mouse connected since the mouse config menu goes from this
Thanks.
TomasHubelbauer