blob: 1dd4e526465936a22b6076f29f7dbd8f1b49c7a0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#include <stdio.h>
#include "dome_key_map.h"
#define SIZE 2
int main() {
HeadphoneButton mode_buttons[SIZE] = {HeadphoneButton_Play, HeadphoneButton_Up};
Trigger mode_trigger = {
.buttons = mode_buttons,
.length = SIZE
};
const CKeyActionResult *mode = c_run_key_action(mode_trigger, NULL);
printf("%d\n", *mode->kind);
HeadphoneButton buttons[] = {HeadphoneButton_Down};
Trigger trigger = {
.buttons = buttons,
.length = 1
};
const CKeyActionResult *result = c_run_key_action(trigger, mode->in_mode);
printf("%d\n", *result->kind);
printf("%s", result->action);
/* printf("\n%d\n", *mode->kind); */
return 0;
}
|