Mercurial > lcfOS
diff cos/kernel/keyboard.c @ 32:3a6a9b929db0
Added initial ramdisk and some virtual file system functions
author | windel |
---|---|
date | Fri, 13 Jan 2012 18:18:17 +0100 |
parents | d8627924d40d |
children | 8012221dd740 |
line wrap: on
line diff
--- a/cos/kernel/keyboard.c Tue Jan 10 20:40:35 2012 +0100 +++ b/cos/kernel/keyboard.c Fri Jan 13 18:18:17 2012 +0100 @@ -4,7 +4,9 @@ static volatile uint8_t charAvail = 0; static volatile char kbdchar = ' '; -static char keymap[128] = { +// TODO: move to user land: +static char keymap[128] = +{ '?','?','1','2', '3', '4', '5','6', '7', '8','9', '0', '-','=', 0xe, '?', 'q','w','e','r', 't', 'y', 'u','i', 'o', 'p','[', ']', '\n','?', 'a', 's', 'd','f','g','h', 'j', 'k', 'l',';', '\'', '?','?', '?', 'z','x', 'c', 'v', @@ -16,7 +18,8 @@ '?','?','?','?', '?', '?', '?','?', '?', '?','?', '?', '?','?', '?', '?' }; -static char keymapUPPER[128] = { +static char keymapUPPER[128] = +{ '?','?','!','@', '#', '$', '%','^', '&', '*','(', ')', '_','+', '?', '?', 'Q','W','E','R', 'T', 'Y', 'U','I', 'O', 'P','{', '}', '|','?', 'A', 'S', 'D','F','G','H', 'J', 'K', 'L',':', '"', '?','?', '?', 'Z','X', 'C', 'V', @@ -28,8 +31,10 @@ '?','?','?','?', '?', '?', '?','?', '?', '?','?', '?', '?','?', '?', '?' }; -void keyboardDriverUpdate(unsigned char scancode) +void keyboardDriverUpdate() { + unsigned char scancode = inb(0x60); + switch(scancode) { case 0x2a: shiftstate = 1; @@ -64,6 +69,7 @@ return c; } +// Move to user code: void getline(char *buffer, int len) { char c;