mirror of
https://github.com/flipperdevices/flipperzero-firmware.git
synced 2025-12-13 05:19:50 +04:00
* add usb hid mouse functions, add mouse functions to BadUsbHidApi * add ble mouse functionality * add hid_usb_mouse_release_all * ducky mouse command skeleton * implement mouse click functions * corrected missing semicolon * added mouse functionality * corrected mouse scroll functionality * mouse key functionality, removed mouse commands, supporting get_mouse_keycode function, added mouse buttons as Keys for HOLD function * add mouse commands * removed mouse middle click * Format sources and fix bunch of mistakes in nfc and subghz * added HID_MOUSE_NONE: added to help with better readability * added script for mouse movement test * Fix: hold and release, imrpove readability * simplified the mouse demo/test * Format sources Co-authored-by: あく <alleteam@gmail.com>
40 lines
1.1 KiB
C
40 lines
1.1 KiB
C
#pragma once
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#include <furi.h>
|
|
#include <furi_hal.h>
|
|
|
|
typedef enum {
|
|
BadUsbHidInterfaceUsb,
|
|
BadUsbHidInterfaceBle,
|
|
} BadUsbHidInterface;
|
|
|
|
typedef struct {
|
|
void* (*init)(FuriHalUsbHidConfig* hid_cfg);
|
|
void (*deinit)(void* inst);
|
|
void (*set_state_callback)(void* inst, HidStateCallback cb, void* context);
|
|
bool (*is_connected)(void* inst);
|
|
|
|
bool (*kb_press)(void* inst, uint16_t button);
|
|
bool (*kb_release)(void* inst, uint16_t button);
|
|
bool (*mouse_press)(void* inst, uint8_t button);
|
|
bool (*mouse_release)(void* inst, uint8_t button);
|
|
bool (*mouse_scroll)(void* inst, int8_t delta);
|
|
bool (*mouse_move)(void* inst, int8_t dx, int8_t dy);
|
|
bool (*consumer_press)(void* inst, uint16_t button);
|
|
bool (*consumer_release)(void* inst, uint16_t button);
|
|
bool (*release_all)(void* inst);
|
|
uint8_t (*get_led_state)(void* inst);
|
|
} BadUsbHidApi;
|
|
|
|
const BadUsbHidApi* bad_usb_hid_get_interface(BadUsbHidInterface interface);
|
|
|
|
void bad_usb_hid_ble_remove_pairing(void);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|