From: Alan Cox Date: Sun, 4 Jan 2015 17:38:02 +0000 (+0000) Subject: trs80: use the new keyboard defines X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=c2755ca013e45f6f98db62c3e6b2e03b3129b5c9;p=FUZIX.git trs80: use the new keyboard defines --- diff --git a/Kernel/platform-trs80/devtty.c b/Kernel/platform-trs80/devtty.c index 54b5c2bd..e609c2b2 100644 --- a/Kernel/platform-trs80/devtty.c +++ b/Kernel/platform-trs80/devtty.c @@ -149,26 +149,26 @@ static void keyproc(void) } } -static uint8_t keyboard[8][8] = { +uint8_t keyboard[8][8] = { {'@', 'a', 'b', 'c', 'd', 'e', 'f', 'g' }, {'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o' }, {'p', 'q', 'r', 's', 't', 'u', 'v', 'w' }, {'x', 'y', 'z', '[', '\\', ']', '^', '_' }, {'0', '1', '2', '3', '4', '5', '6', '7' }, {'8', '9', ':', ';', ',', '-', '.', '/' }, - {13, 12, 3, 0/*up*/, 0/*down*/, 8/* left */, 0/*right*/, ' '}, - { 0, 0, 0, 0, 0xF1, 0xF2, 0xF3, 0 } + {13, 12, 3, KEY_UP, KEY_DOWN, KEY_LEFT, KEY_RIGHT, ' '}, + { 0, 0, 0, 0, KEY_F1, KEY_F2, KEY_F3, 0 } }; -static uint8_t shiftkeyboard[8][8] = { +uint8_t shiftkeyboard[8][8] = { {'@', 'A', 'B', 'C', 'D', 'E', 'F', 'G' }, {'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O' }, {'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W' }, {'X', 'Y', 'Z', '{', '|', '}', '^', '_' }, {'0', '!', '"', '#', '$', '%', '&', '\'' }, {'(', ')', '*', '+', '<', '=', '>', '?' }, - {13, 12, 3, 0/*up*/, 0/*down*/, 8/* left */, 0/*right*/, ' '}, - { 0, 0, 0, 0, 0xF1, 0xF2, 0xF3, 0 } + {13, 12, 3, KEY_UP, KEY_DOWN, KEY_LEFT, KEY_RIGHT, ' '}, + { 0, 0, 0, 0, KEY_F1, KEY_F2, KEY_F3, 0 } }; static uint8_t capslock = 0; @@ -215,7 +215,7 @@ static void keydecode(void) if (capslock && c >= 'a' && c <= 'z') c -= 'a' - 'A'; if (c) - tty_inproc(1, c); + vt_inproc(1, c); } void kbd_interrupt(void) diff --git a/Kernel/platform-trs80/devtty.h b/Kernel/platform-trs80/devtty.h index 5977fd9c..b8167366 100644 --- a/Kernel/platform-trs80/devtty.h +++ b/Kernel/platform-trs80/devtty.h @@ -8,5 +8,6 @@ extern int trstty_close(uint8_t minor); #define KEY_ROWS 8 #define KEY_COLS 8 extern uint8_t keymap[8]; - +extern uint8_t keyboard[8][8]; +extern uint8_t shiftkeyboard[8][8]; #endif