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