Page 1 of 1

brans kernel development tutorial issues.

Posted: Mon Jun 30, 2008 9:57 am
by cjhawley001
This is my first post, and i have searched this topic in this board and google.

So i have read brans tutorial on "osdever.net" and understand it, but i am having some difficulties.
First off, i want to have a user type something, and then make that one string, then when a user presses enter, i would like to have an event be started.

Is there a way that i can add the individual charecters to a string, so i can have the whole string. then when a user presses enter use that string in an if statement to call a function?

-chris

Re: brans kernel development tutorial issues.

Posted: Mon Jun 30, 2008 9:58 am
by JamesM
Is there a way that i can add the individual charecters to a string, so i can have the whole string. then when a user presses enter use that string in an if statement to call a function?
Yes - this is standard, basic C. Nothing OS-specific.

Re: brans kernel development tutorial issues.

Posted: Mon Jun 30, 2008 10:02 am
by cjhawley001
well, i realize that, but i was more asking for a way to have a check for the pressing of the Enter key.

i apoligize.

-chris

Re: brans kernel development tutorial issues.

Posted: Mon Jun 30, 2008 10:03 am
by JamesM
Bran's tutorial has a section on reading from the keyboard, along with a scancode table that lists the ENTER key as '\n'. So you just have to detect a newline in your function's input string.

Re: brans kernel development tutorial issues.

Posted: Mon Jun 30, 2008 10:07 am
by cjhawley001
alright, that answers my question!

Thank You!

chris