scancodes
Posted: Thu Sep 26, 2002 1:37 pm
hey,
my keyboard handler is going good, i can output the scancode to the screen, even though it comes up in some crazy ascii code. But i was wonder, isn't it possible to make a char array of all the keys on the keyboard and then compair it to an array of the scancodes and if found, then it does whatever?
basically i'm asking how do i "see" what they typed, like a (or) 1
i've tried looking up scancodes and just if else it but hten the keysbecome disabled. (some of them). so i'm thinking i need to somethig to flush the keyboard buffer after they hit it? (well after they hit and then i output)
and ALSO! if anyone knows what the & means inside of an if statement, IE:
if( blah & 0x02 ) ???
thank you all very much!
gtsphere
my keyboard handler is going good, i can output the scancode to the screen, even though it comes up in some crazy ascii code. But i was wonder, isn't it possible to make a char array of all the keys on the keyboard and then compair it to an array of the scancodes and if found, then it does whatever?
basically i'm asking how do i "see" what they typed, like a (or) 1
i've tried looking up scancodes and just if else it but hten the keysbecome disabled. (some of them). so i'm thinking i need to somethig to flush the keyboard buffer after they hit it? (well after they hit and then i output)
and ALSO! if anyone knows what the & means inside of an if statement, IE:
if( blah & 0x02 ) ???
thank you all very much!
gtsphere