aboutsummaryrefslogtreecommitdiffstats
path: root/moder.c
blob: a10a6da255df1f053a2ee96ab7332f7f9f06151d (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
#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);

	return 0;
}