TacOS
0.2
|
Driver clavier. Plus de détails...
#include <types.h>
#include <ioports.h>
#include <drivers/keyboard.h>
#include <drivers/console.h>
#include <klog.h>
Structures de données | |
struct | symbole |
Macros | |
#define | KEY_RELEASE 0x80 |
#define | KEYBOARD_ERROR_MODE_2 0x00 |
#define | KEYBOARD_BAT_OK 0xAA |
#define | KEYBOARD_ECHO_RES 0xEE |
#define | KEYBOARD_UNKNOWN 0xF1 |
#define | KEYBOARD_BAT_KO 0xFC |
#define | KEYBOARD_FAILURE 0xFD |
#define | KEYBOARD_ERROR_MODE_1 0xFF |
#define | KEYBOARD_EXPAND 0xE0 |
#define | KEYBOARD_PAUSE 0xE1 |
#define | KEY_ESCAPE 0x01 |
#define | KEY_ALT 0x38 |
#define | KEY_LSHIFT 0x2A |
#define | KEY_RSHIFT 0x36 |
#define | KEY_LCTRL 0x1D |
#define | KEY_CAPSLOCK 0x3A |
#define | KEY_NUMLOCK 0x45 |
#define | KEY_RETURN 0x1C |
#define | KEY_SPACE 0x39 |
#define | KEY_F1 0x3b |
#define | KEY_F2 0x3c |
#define | KEY_F3 0x3d |
#define | KEY_F4 0x3e |
#define | KEY_F5 0x3f |
#define | KEY_F6 0x40 |
#define | KEY_F7 0x41 |
#define | KEY_F8 0x42 |
#define | KEY_F9 0x43 |
#define | KEY_F10 0x44 |
#define | KEY_F11 0x57 |
#define | KEY_F12 0x58 |
#define | TAB_KEY "\x09" |
#define | ENTER_KEY "\x0d" |
#define | ESC_KEY "\x1b" |
#define | BS_KEY "\x7f" |
#define | LEFT_KEY "\x1b\x5b\x44" |
#define | RIGHT_KEY "\x1b\x5b\x43" |
#define | UP_KEY "\x1b\x5b\x41" |
#define | DOWN_KEY "\x1b\x5b\x42" |
#define | HOME_KEY "\x1b\x5b\x31\x7e" |
#define | INSERT_KEY "\x1b\x5b\x31\x7e" |
#define | DEL_KEY "\x1b\x5b\x33\x7e" |
#define | END_KEY "\x1b\x5b\x34\x7e" |
#define | PGUP_KEY "\x1b\x5b\x35\x7e" |
#define | PGDOWN_KEY "\x1b\x5b\x36\x7e" |
Fonctions | |
void | selectLayout (int use_azerty) |
void | keyboardInterrupt (int id) |
Variables | |
struct symbole | qwerty_keymap [] |
struct symbole | azerty_keymap [] |
Copyright (C) 2010-2014 TacOS developers.
This program 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) any later version.
This program 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 at http://www.gnu.org/copyleft/gpl.html
You should have received a copy of the GNU General Public License along with this program; if not, see http://www.gnu.org/licenses.
#define BS_KEY "\x7f" |
ANSI code for backspace key.
#define DEL_KEY "\x1b\x5b\x33\x7e" |
ANSI code for delete key.
#define DOWN_KEY "\x1b\x5b\x42" |
ANSI code for down key.
#define END_KEY "\x1b\x5b\x34\x7e" |
ANSI code for end key.
#define ENTER_KEY "\x0d" |
ANSI code for enter key.
#define ESC_KEY "\x1b" |
ANSI code for escape key.
#define HOME_KEY "\x1b\x5b\x31\x7e" |
ANSI code for home key.
#define INSERT_KEY "\x1b\x5b\x31\x7e" |
ANSI code for insert key.
#define KEY_ALT 0x38 |
scancode alt key.
#define KEY_CAPSLOCK 0x3A |
scancode capslock key.
#define KEY_ESCAPE 0x01 |
scancode escape key.
#define KEY_F1 0x3b |
scancode F1 key.
#define KEY_F10 0x44 |
scancode F10 key.
#define KEY_F11 0x57 |
scancode F11 key.
#define KEY_F12 0x58 |
scancode F12 key.
#define KEY_F2 0x3c |
scancode F2 key.
#define KEY_F3 0x3d |
scancode F3 key.
#define KEY_F4 0x3e |
scancode F4 key.
#define KEY_F5 0x3f |
scancode F5 key.
#define KEY_F6 0x40 |
scancode F6 key.
#define KEY_F7 0x41 |
scancode F7 key.
#define KEY_F8 0x42 |
scancode F8 key.
#define KEY_F9 0x43 |
scancode F9 key.
#define KEY_LCTRL 0x1D |
scancode left control key.
#define KEY_LSHIFT 0x2A |
scancode left shift key.
#define KEY_NUMLOCK 0x45 |
scancode numlock key.
#define KEY_RELEASE 0x80 |
Scancode SET 1 : (IBM XT) http://www.computer-engineering.org/ps2keyboard/scancodes1.htmlSCAN CODES Masque pour le scancode d'un relâchement de touche.
#define KEY_RETURN 0x1C |
scancode return key.
#define KEY_RSHIFT 0x36 |
scancode right shift key.
#define KEY_SPACE 0x39 |
scancode space key.
#define KEYBOARD_BAT_KO 0xFC |
Basic Assurance Test
#define KEYBOARD_BAT_OK 0xAA |
Basic Assurance Test
#define KEYBOARD_ECHO_RES 0xEE |
Result of echo command
#define KEYBOARD_ERROR_MODE_1 0xFF |
Erreur en scancode mode 1
#define KEYBOARD_ERROR_MODE_2 0x00 |
Erreur en scancode mode 2 et 3
#define KEYBOARD_EXPAND 0xE0 |
scancode sur 2 octets.
#define KEYBOARD_FAILURE 0xFD |
Internal failure
#define KEYBOARD_PAUSE 0xE1 |
scancode sur 3 octets.
#define KEYBOARD_UNKNOWN 0xF1 |
????
#define LEFT_KEY "\x1b\x5b\x44" |
ANSI code for left key.
#define PGDOWN_KEY "\x1b\x5b\x36\x7e" |
ANSI code for page down key.
#define PGUP_KEY "\x1b\x5b\x35\x7e" |
ANSI code for page up key.
#define RIGHT_KEY "\x1b\x5b\x43" |
ANSI code for right key.
#define TAB_KEY "\x09" |
ANSI code for tab key.
#define UP_KEY "\x1b\x5b\x41" |
ANSI code for up key.
void keyboardInterrupt | ( | int | id | ) |
Handler d'une interruption clavier.
id | non utilisé. |
void selectLayout | ( | int | use_azerty | ) |
Choix du layout clavier. Pour le moment juste entre azerty et qwerty.
struct symbole azerty_keymap[] |
Keymap azerty: keycode vers chaine ANSI.
struct symbole qwerty_keymap[] |
Keymap qwerty: keycode vers chaine ANSI.