Archived
1
Fork 0
This repository has been archived on 2024-10-07. You can view files and clone it, but cannot push or open issues or pull requests.
kilo/include/input.h

29 lines
378 B
C
Raw Permalink Normal View History

2023-09-01 15:04:12 +00:00
#ifndef INPUT_H
#define INPUT_H
#include <stdint.h>
2023-09-08 20:32:29 +00:00
#define CTRL_KEY(key) ((key) & 0x1f)
2023-09-01 15:04:12 +00:00
enum KEYS {
TAB = 9,
2023-09-04 15:53:43 +00:00
ENTER = 13,
ESCAPE = 27,
2023-09-03 11:01:22 +00:00
BACKSPACE = 127,
2023-09-01 15:04:12 +00:00
HOME = 0x100,
DEL,
PG_UP,
PG_DOWN,
END,
ARROW_UP,
ARROW_DOWN,
ARROW_LEFT,
ARROW_RIGHT,
NOP
};
typedef uint16_t KEY;
2023-09-08 20:32:29 +00:00
void input_process_key(KEY c);
2023-09-01 15:04:12 +00:00
#endif // INPUT_H