key_state.ch, and command conflicts resolved

This commit is contained in:
taiyu 2015-08-19 18:59:27 -07:00
parent 4db89b5fe4
commit 470b4dfbae
4 changed files with 94 additions and 32 deletions

18
include/key_state.h Normal file
View file

@ -0,0 +1,18 @@
#ifndef _SWAY_KEY_STATE_H
#define _SWAY_KEY_STATE_H
#include <stdbool.h>
#include <stdint.h>
typedef uint32_t keycode;
// returns true if key has been pressed, otherwise false
bool check_key(keycode key);
// sets a key as pressed
void press_key(keycode key);
// unsets a key as pressed
void release_key(keycode key);
#endif