so i have the ansi codes for the arrows
the problem im running into is how do i use them in a C program?
i need to read keyboard input for the arrow keys
how do i do this?
so i have the ansi codes for the arrows
the problem im running into is how do i use them in a C program?
i need to read keyboard input for the arrow keys
how do i do this?
do u use printf()s like u do with color?
fine lets ask questions and reply to our own questionsdo u use printf()s like u do with color?
Originally Posted by Salem
but is it correct?
What OS/Compiler do you use?Originally posted by revelation437
so i have the ansi codes for the arrows
the problem im running into is how do i use them in a C program?
i need to read keyboard input for the arrow keys
how do i do this?
currently, im on windows 98 with borland 5.01
alth0 for the finished product, i will be compiling the code on Borland Trubo C 3, since thats the only way i can get around the ANSI problem with windows 2k/xp
my problem is that, i can get the number arrow keys to work (by remapping them, basically, if there's a better way, lemme know!)
but i cant get the regular arrow keys to work
arrow keys first sent a 0, then another number and 0 and other number is how the computer identifies that its an arrow key
so once i read the 0, how do u bypass the 0 and get the next number so that i can get the actual arrow key?
figured it out
hopefully
what a fawkin headache
time for some sleep, ill try to impliment the code later
the way i figured it out is
after the 0
RIGHT = M
LEFT = K
UP = H
DOWN = P
actually, looking back on ur code
i think its the same thing, except i dont see a reason why to add 256
just check the next getch to see if its the values for those letters
thanks for the help anyway