Page 1 of 1

scancodes

Posted: Thu Sep 26, 2002 1:37 pm
by gtsphere
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

Re:scancodes

Posted: Thu Sep 26, 2002 1:48 pm
by gtsphere
i also think one of my problems is that the remaining 7 bits hold the actual scancode, how do i access those???

Re:scancodes

Posted: Fri Sep 27, 2002 3:18 am
by Whatever5k
After you have received an IRQ1 (keyboard), you inb() the scancode...
But you also have to tell the keyboard controller that you received the scancode...

the & is the AND operator..it ANDs two binaries...for example:

0010 1001
&
1001 1011
=
0000 1001