29 lines
472 B
C
29 lines
472 B
C
//
|
|
// Created by rick on 23-03-20.
|
|
//
|
|
|
|
#ifndef MY_KERNEL_KEYBOARD_H
|
|
#define MY_KERNEL_KEYBOARD_H
|
|
|
|
#include <sys/types.h>
|
|
|
|
typedef struct KeyEvent_t {
|
|
// KeyCode key;
|
|
uint32_t scancode;
|
|
char ascii_code;
|
|
uint8_t is_release: 1;
|
|
uint8_t shift: 1;
|
|
uint8_t alt: 1;
|
|
uint8_t ctrl: 1;
|
|
} KeyEvent;
|
|
|
|
char getc();
|
|
|
|
//const char *key_code_to_string(KeyCode key);
|
|
|
|
KeyEvent *get_next_event();
|
|
|
|
void free_event(KeyEvent *event);
|
|
|
|
#endif //MY_KERNEL_KEYBOARD_H
|