#include "ui_handlers.h" #include #include "ble_hid.h" #include "boot_button.h" #include "esp_log.h" #include "ui_events.h" static const char *TAG = "ui_handlers"; static void send_hid_combo_or_warn(uint8_t modifier, uint8_t keycode) { if (ble_hid_ready()) { ble_hid_send_combo(modifier, keycode); } else { ESP_LOGW(TAG, "HID not ready"); } } static void on_boot_press(void) { send_hid_combo_or_warn(0, HID_KEY_C); } void ui_handlers_init(void) { boot_button_init(on_boot_press); } void update_year_action(lv_event_t * e) { (void)e; } void click_button_two(lv_event_t * e) { (void)e; send_hid_combo_or_warn(HID_MOD_LCTRL, HID_KEY_C); } void click_button_three(lv_event_t * e) { (void)e; send_hid_combo_or_warn(HID_MOD_LCTRL, HID_KEY_V); } void click_button_one(lv_event_t * e) { (void)e; send_hid_combo_or_warn(HID_MOD_LCTRL, HID_KEY_X); }