aboutsummaryrefslogtreecommitdiffstats
path: root/src/keysym/system.c
blob: 2aa9be9263b16d4b23e7117e62d574a23a70985d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include "keysym/system.h"

#include "hid/system.h"

#include <stdint.h>

uint16_t
keysym_to_system(uint32_t keysym)
{
	switch (keysym) {
		case KS_SYSTEM_POWER:
			return SYSTEM_POWER_DOWN;
		case KS_SYSTEM_SLEEP:
			return SYSTEM_SLEEP;
		case KS_SYSTEM_WAKE:
			return SYSTEM_WAKE_UP;
		default:
			return 0;
	}
}