Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ClusterM/flipperzero-firmware.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/targets/furi-hal-include/furi-hal-usb-hid.h')
-rw-r--r--firmware/targets/furi-hal-include/furi-hal-usb-hid.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/firmware/targets/furi-hal-include/furi-hal-usb-hid.h b/firmware/targets/furi-hal-include/furi-hal-usb-hid.h
index 559a20af..a5f58170 100644
--- a/firmware/targets/furi-hal-include/furi-hal-usb-hid.h
+++ b/firmware/targets/furi-hal-include/furi-hal-usb-hid.h
@@ -255,6 +255,13 @@ typedef void (*HidStateCallback)(bool state, void* context);
/** ASCII to keycode conversion macro */
#define HID_ASCII_TO_KEY(x) (((uint8_t)x < 128) ? (hid_asciimap[(uint8_t)x]) : KEY_NONE)
+/** HID keyboard leds */
+enum HidKeyboardLeds {
+ HID_KB_LED_NUM = (1 << 0),
+ HID_KB_LED_CAPS = (1 << 1),
+ HID_KB_LED_SCROLL = (1 << 2),
+};
+
/** HID mouse buttons */
enum HidMouseButtons {
HID_MOUSE_BTN_LEFT = (1 << 0),
@@ -268,6 +275,12 @@ enum HidMouseButtons {
*/
bool furi_hal_hid_is_connected();
+/** Get USB HID keyboard leds state
+ *
+ * @return leds state
+ */
+uint8_t furi_hal_hid_get_led_state();
+
/** Set USB HID connect/disconnect callback
*
* @param cb callback
@@ -316,3 +329,15 @@ bool furi_hal_hid_mouse_release(uint8_t button);
* @param delta number of scroll steps
*/
bool furi_hal_hid_mouse_scroll(int8_t delta);
+
+/** Set the following consumer key to pressed state and send HID report
+ *
+ * @param button key code
+ */
+bool furi_hal_hid_consumer_key_press(uint16_t button);
+
+/** Set the following consumer key to released state and send HID report
+ *
+ * @param button key code
+ */
+bool furi_hal_hid_consumer_key_release(uint16_t button); \ No newline at end of file