Files
nub-os/src/keyboard.h
2025-08-29 15:30:30 +02:00

18 lines
330 B
C

#pragma once
#include <stdbool.h>
#include <stdint.h>
typedef struct
{
uint8_t scan_code;
bool pressed;
bool shift;
bool caps_lock;
char ascii;
} keyboard_event_t;
typedef void (*keyboard_handler_t)(const keyboard_event_t*);
void init_keyboard();
void register_keypress_handler(keyboard_handler_t handler);