加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
BleComboMouse.h 954 Bytes
一键复制 编辑 原始数据 按行查看 历史
coco 提交于 2024-08-08 17:05 . Initial commit
#ifndef ESP32_BLE_COMBO_MOUSE_H
#define ESP32_BLE_COMBO_MOUSE_H
#include "BleComboKeyboard.h"
#define MOUSE_LEFT 1
#define MOUSE_RIGHT 2
#define MOUSE_MIDDLE 4
#define MOUSE_BACK 8
#define MOUSE_FORWARD 16
#define MOUSE_ALL (MOUSE_LEFT | MOUSE_RIGHT | MOUSE_MIDDLE) # For compatibility with the Mouse library
class BleComboMouse {
private:
BleComboKeyboard* _keyboard;
uint8_t _buttons;
void buttons(uint8_t b);
public:
BleComboMouse(BleComboKeyboard* keyboard) { _keyboard = keyboard; };
void begin(void) {};
void end(void) {};
void click(uint8_t b = MOUSE_LEFT);
void move(signed char x, signed char y, signed char wheel = 0, signed char hWheel = 0);
void send(int state, int16_t x, int16_t y);
void press(uint8_t b = MOUSE_LEFT); // press LEFT by default
void release(uint8_t b = MOUSE_LEFT); // release LEFT by default
bool isPressed(uint8_t b = MOUSE_LEFT); // check LEFT by default
};
#endif // ESP32_BLE_COMBO_MOUSE_H
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化