brans kernel development tutorial issues.

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
cjhawley001
Member
Member
Posts: 29
Joined: Mon Jun 30, 2008 9:51 am

brans kernel development tutorial issues.

Post 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
User avatar
JamesM
Member
Member
Posts: 2935
Joined: Tue Jul 10, 2007 5:27 am
Location: York, United Kingdom
Contact:

Re: brans kernel development tutorial issues.

Post 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.
cjhawley001
Member
Member
Posts: 29
Joined: Mon Jun 30, 2008 9:51 am

Re: brans kernel development tutorial issues.

Post 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
User avatar
JamesM
Member
Member
Posts: 2935
Joined: Tue Jul 10, 2007 5:27 am
Location: York, United Kingdom
Contact:

Re: brans kernel development tutorial issues.

Post 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.
cjhawley001
Member
Member
Posts: 29
Joined: Mon Jun 30, 2008 9:51 am

Re: brans kernel development tutorial issues.

Post by cjhawley001 »

alright, that answers my question!

Thank You!

chris
Post Reply