static int event_source_poll(key_event_source_t* source) { uint16_t value = target_power_key(); if(keys_set_report_key(source, 0, &value)){ keys_post_event(13, value); } value = target_volume_up(); if(keys_set_report_key(source, 1, &value)){ keys_post_event(KEY_VOLUMEUP, value); } value = target_volume_down(); if(keys_set_report_key(source, 2, &value)){ keys_post_event(KEY_VOLUMEDOWN, value); } return NO_ERROR; }
static int event_source_poll(key_event_source_t* source) { keys_set_report_key(source, KEY_RIGHT, target_power_key()); return NO_ERROR; }