| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- /* Copyright (C) 2021 Rain */
- /* This file is part of XNIX. */
- /*
- XNIX is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) and later version.
- */
- /*
- XNIX is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
- */
- /*
- You should have received a copy of the GNU General Public License
- along with XNIX. If not, see <https://www.gnu.org/licenses/>.
- */
- #ifndef _KBD_H
- #define _KBD_H
- #include <kernel/types.h>
- #include <kernel/errno.h>
- struct keyboard_buf {
- char raw;
- __uint32_t cooked;
- struct keyboard_buf *next;
- };
- errno_t kbd_init(void);
- void put_keycode(void);
- #define KBD_DATA 0x60
- #define MAX_KEYS 128
- #define CTRL 0x1d
- #define EXT 0xe0
- #define LSHIFT 0x2a
- #define RSHIFT 0x36
- #define ALT 0x38
- #define CAPSLK 0x3a
- #define BREAK 0x80
- #define UP 0x48
- #define LEFT 0x4b
- #define DOWN 0x50
- #define RIGHT 0x4d
- #define BACKSP 0x0e
- #define ENTER 0x1c
- #define TAB 0x0f
- #endif
|