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" 27 #include "platform/Stream.h" 29 #include "PlatformMutex.h" 95 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);
115 USBMouseKeyboard(
USBPhy *phy, MOUSE_TYPE mouse_type = REL_MOUSE, uint16_t vendor_id = 0x0021, uint16_t product_id = 0x0011, uint16_t product_release = 0x0001);
134 bool update(int16_t x, int16_t y, uint8_t buttons, int8_t z);
144 bool move(int16_t x, int16_t y);
152 bool press(uint8_t button);
175 bool click(uint8_t button);
197 bool key_code(uint8_t key, uint8_t modifier = 0);
205 virtual int _putc(
int c);
230 virtual const uint8_t *report_desc();
237 virtual void report_rx();
241 MOUSE_TYPE _mouse_type;
243 uint8_t _lock_status;
246 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.