refactor: 提升 HID 按键发送逻辑的可重用性
- 将发送 HID 按键的逻辑提取到 send_hid_combo_or_warn 函数中 - 更新 on_boot_press 函数以使用新的发送逻辑 - 在按钮点击事件处理函数中调用 send_hid_combo_or_warn,简化代码并增强可读性
This commit is contained in:
@@ -9,6 +9,8 @@
|
||||
#define HID_MOD_LGUI 0x08
|
||||
|
||||
#define HID_KEY_C 0x06
|
||||
#define HID_KEY_V 0x19
|
||||
#define HID_KEY_X 0x1B
|
||||
#define HID_KEY_F5 0x3E
|
||||
|
||||
typedef void (*ble_hid_status_cb_t)(bool connected);
|
||||
|
||||
Reference in New Issue
Block a user