blob: 4b7eb059b81e0d1aefede1301bb840b36434fff5 (
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
|
#ifndef _INPUT_H
#define _INPUT_H
#include "editor.h"
enum editor_key {
BACKSPACE = 127,
ARROW_LEFT = 1000,
ARROW_RIGHT,
ARROW_UP,
ARROW_DOWN,
DELETE_KEY,
HOME_KEY,
END_KEY,
PAGE_UP,
PAGE_DOWN
};
#define CTRL_KEY(k) ((k) & 0x1f)
int editor_read_key();
void editor_move_cursor(struct editor_state* editor, int key);
void editor_process_keypress(struct editor_state* editor, int keycode);
#endif
|