Page 2 of 2

Re: Keyboard input

Posted: Sun Apr 05, 2015 3:42 am
by glauxosdev
I think it's a good idea, thank you.

Re: Keyboard input

Posted: Sun Apr 05, 2015 5:25 am
by Roman
char key
terminal_writestring(key)
If you are following the Bare Bones tutorial, this code will crash. You don't look like someone who understands even C.

Re: Keyboard input

Posted: Sun Apr 05, 2015 6:46 am
by Icee
catnikita255 wrote:There's a code:

Code: Select all

char oldkey;
char key;
for(;;)
{
   oldkey = key;
   key = inb(60);
   if(!oldkey = key)
   terminal_writestring(key);
}
This wouldn't even compile because "!oldkey" is not an l-value.

Re: Keyboard input

Posted: Wed Apr 08, 2015 12:27 pm
by osdever
Thank you for that, now keyboard is working.