18 #ifndef USBMOUSEKEYBOARD_H 19 #define USBMOUSEKEYBOARD_H 21 #define REPORT_ID_KEYBOARD 1 22 #define REPORT_ID_MOUSE 2 23 #define REPORT_ID_VOLUME 3 26 #include "USBKeyboard.h" 29 #include "PlatformMutex.h" 89 USBMouseKeyboard(
bool connect_blocking =
true, MOUSE_TYPE mouse_type = REL_MOUSE, uint16_t vendor_id = 0x0021, uint16_t product_id = 0x0011, uint16_t product_release = 0x0001);
109 USBMouseKeyboard(
USBPhy *phy, MOUSE_TYPE mouse_type = REL_MOUSE, uint16_t vendor_id = 0x0021, uint16_t product_id = 0x0011, uint16_t product_release = 0x0001);
128 bool update(int16_t x, int16_t y, uint8_t buttons, int8_t z);
138 bool move(int16_t x, int16_t y);
146 bool press(uint8_t button);
169 bool click(uint8_t button);
191 bool key_code(uint8_t key, uint8_t modifier = 0);
199 virtual int _putc(
int c);
224 virtual const uint8_t *report_desc();
231 virtual void report_rx();
235 MOUSE_TYPE _mouse_type;
237 uint8_t _lock_status;
240 bool _mouse_send(int8_t x, int8_t y, uint8_t buttons, int8_t z);
bool scroll(int8_t z)
Scrolling.
bool doubleClick()
Double click (MOUSE_LEFT)
bool move(int16_t x, int16_t y)
Move the cursor to (x, y)
bool key_code(uint8_t key, uint8_t modifier=0)
To send a character defined by a modifier(CTRL, SHIFT, ALT) and the key.
Abstract interface to physical USB hardware.
uint8_t lock_status()
Read status of lock keys.
bool press(uint8_t button)
Press one or several buttons.
USBMouseKeyboard(bool connect_blocking=true, MOUSE_TYPE mouse_type=REL_MOUSE, uint16_t vendor_id=0x0021, uint16_t product_id=0x0011, uint16_t product_release=0x0001)
Basic constructor.
bool click(uint8_t button)
Click.
virtual int _putc(int c)
Send a character.
bool media_control(MEDIA_KEY key)
Control media keys.
virtual ~USBMouseKeyboard()
Destroy this object.
USBMouseKeyboard example.
bool update(int16_t x, int16_t y, uint8_t buttons, int8_t z)
Write a state of the mouse.
bool release(uint8_t button)
Release one or several buttons.