teclado.h

Go to the documentation of this file.
00001 /* teclado.h */
00002 
00003 #ifndef _TECLADO_H
00004 #define _TECLADO_H
00005 #define TECLADO_PORT 0x60
00006 
00007 #define ALT         0x0100
00008 #define CTRL        0x0200
00009 #define SHIFT       0x0300
00010 #define TECLA_MODIFICADORA  0xff00
00011 
00012 #define CARACTER_LIMITE 0x0400
00013 
00014 #define HOME            0
00015 #define CURSOR_UP       0
00016 #define CURSOR_DOWN     0
00017 #define CURSOR_LEFT     0
00018 #define CURSOR_RIGHT    0
00019 
00020 #define PAGE_UP         0
00021 #define PAGE_DOWN       0
00022 #define INSERT          0
00023 #define DELETE          0
00024 #define END             0
00025 #define ENTER           0
00026 
00027 #define F1          0x1000
00028 #define F2          (F1 + 1)
00029 #define F3          (F1 + 2)
00030 #define F4          (F1 + 3)
00031 #define F5          (F1 + 4)
00032 #define F6          (F1 + 5)
00033 #define F7          (F1 + 6)
00034 #define F8          (F1 + 7)
00035 #define F9          (F1 + 8)
00036 #define F10         (F1 + 9)
00037 #define F11         (F1 + 10)
00038 #define F12         (F1 + 11)
00039 
00040 #define CAPS_LOCK   0xD000
00041 #define NUM_LOCK    0xE000
00042 #define SCR_LOCK    0xF000
00043 
00044 /* Obtiene el ascii de un scancode (en crudo) */
00045 inline unsigned int _getascii (unsigned char code);
00046 
00047 /* Obtiene el ascii de un scancode, teniendo en cuenta los modificadores (CAPS_LOCK, SHIFT, CTRL, etc) */
00048 unsigned int getascii (unsigned char code);
00049 
00050 /* Tabla de caracteres ASCII de un teclado standar */
00051 unsigned int keymap_std[] = 
00052 {
00053     0, 0, '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', 225, 39, '\b',
00054     0, 'q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', '´', '+', '\n',
00055     CTRL, 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 148, '{', '}', SHIFT, '}',
00056     'z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '-', SHIFT,
00057     '*', ALT, ' ', CAPS_LOCK, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, NUM_LOCK, SCR_LOCK, HOME, CURSOR_UP, PAGE_UP, '-',
00058     CURSOR_LEFT, 0, CURSOR_RIGHT, '+', END, CURSOR_DOWN, PAGE_DOWN, INSERT, DELETE, ENTER, 0, '<', F11, F12
00059 };
00060 
00061 /* Tabla de caracteres ASCII (con shift presionado) de un teclado standar */
00062 unsigned int keymap_std_shift[] = 
00063 {
00064    0, 0, '!', '"', '#', '$', '%', '&', '/', '(', ')', '=', 225, 39, '\b',
00065    0, 'Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I', 'O', 'P', '¨', '*', '\n',
00066    CTRL, 'A', 'S', 'D', 'F', 'G', 'H', 'J', 'K', 'L', 148, '[', '^', SHIFT, ']',
00067    'Z', 'X', 'C', 'V', 'B', 'N', 'M', ',', ':', '_', SHIFT,
00068    '*', ALT, ' ', CAPS_LOCK, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, NUM_LOCK, SCR_LOCK, HOME, CURSOR_UP, PAGE_UP, '-',
00069    CURSOR_LEFT, 0, CURSOR_RIGHT, '+', END, CURSOR_DOWN, PAGE_DOWN, INSERT, DELETE, ENTER, 0, '<', F11, F12
00070 };
00071 
00072 #endif

Generated on Sun May 30 18:38:35 2004 for Routix OS by doxygen 1.3.6