keyboard driver
Posted: Wed Aug 15, 2007 11:05 am
hi
i have a question to ask: i have a minimal boot program implementing functions like putchar, putnumber, putstring and so on
i also have a function scrollscreen, so i can output stuff on the screen and everything
now, what im trying to do is implement keyboard functionality..how should i go about? i know i have to convert the scancodes into ascii characters, what i dont really know how to handle is whitespaces
take for example the del key...should i check for this key directly when the scancode is received and erase directly from there the last character immediately before the cursor or should i convert the scan code to an ascii code, pass it on to putchar and have putchar handle the erasure?
this would make sense because, after all, there is a DEL character defined in the ascii table, but on the other hand, ordinary output functions in c dont handle these keys directly either, not that i know of...i guess im just a bit confused and it probably sounds confused...all i want is write a command prompt, so my little kernel starts interacting with the user...
i have a question to ask: i have a minimal boot program implementing functions like putchar, putnumber, putstring and so on
i also have a function scrollscreen, so i can output stuff on the screen and everything
now, what im trying to do is implement keyboard functionality..how should i go about? i know i have to convert the scancodes into ascii characters, what i dont really know how to handle is whitespaces
take for example the del key...should i check for this key directly when the scancode is received and erase directly from there the last character immediately before the cursor or should i convert the scan code to an ascii code, pass it on to putchar and have putchar handle the erasure?
this would make sense because, after all, there is a DEL character defined in the ascii table, but on the other hand, ordinary output functions in c dont handle these keys directly either, not that i know of...i guess im just a bit confused and it probably sounds confused...all i want is write a command prompt, so my little kernel starts interacting with the user...