microsoft / pxt-adafruit

Microsoft MakeCode editor for Adafruit Circuit Playground Express
https://makecode.adafruit.com
Other
81 stars 77 forks source link

HID Mouse buttons are swapped #1077

Closed jedgarpark closed 5 years ago

jedgarpark commented 5 years ago

Calling the left mouse button down event causes the HID right mouse button to be "pressed" and vice versa.

abchatra commented 5 years ago

Hmmm.. our enum

declare const enum MouseButton {
//% block="right" enumval=2
Right = 0x02,
//% block="middle" enumval=4
Middle = 0x04,
//% block="left" enumval=1
Left = 0x01,
}

maps codal https://github.com/lancaster-university/codal-core/blob/9643ee76d2af1eb501f70d5d8cbc405ab7a42291/inc/drivers/HIDMouse.h#L34

pelikhan commented 5 years ago

I fixed it in common packages recently. Needs deployment.

abchatra commented 5 years ago

fixed in /beta