scancodes

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
gtsphere

scancodes

Post 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
gtsphere

Re:scancodes

Post by gtsphere »

i also think one of my problems is that the remaining 7 bits hold the actual scancode, how do i access those???
Whatever5k

Re:scancodes

Post 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
Post Reply