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 "rtos/Mutex.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);
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);
USBMouseKeyboard example.
bool move(int16_t x, int16_t y)
Move the cursor to (x, y)
USBMouseKeyboard(USBPhy *phy, MOUSE_TYPE mouse_type=REL_MOUSE, uint16_t vendor_id=0x0021, uint16_t product_id=0x0011, uint16_t product_release=0x0001)
Fully featured constructor.
bool release(uint8_t button)
Release one or several buttons.
bool key_code(uint8_t key, uint8_t modifier=0)
To send a character defined by a modifier(CTRL, SHIFT, ALT) and the key.
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 doubleClick()
Double click (MOUSE_LEFT)
virtual int _putc(int c)
Send a character.
bool scroll(int8_t z)
Scrolling.
virtual ~USBMouseKeyboard()
Destroy this object.
bool press(uint8_t button)
Press one or several buttons.
bool click(uint8_t button)
Click.
uint8_t lock_status()
Read status of lock keys.
bool media_control(MEDIA_KEY key)
Control media keys.
bool update(int16_t x, int16_t y, uint8_t buttons, int8_t z)
Write a state of the mouse.
Abstract interface to physical USB hardware.
The Mutex class is used to synchronize the execution of threads.