diff options
Diffstat (limited to 'src/keysym/system.c')
| -rw-r--r-- | src/keysym/system.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/keysym/system.c b/src/keysym/system.c new file mode 100644 index 0000000..2aa9be9 --- /dev/null +++ b/src/keysym/system.c @@ -0,0 +1,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; + } +} |
