PS/2 Keyboard: Difference between revisions

Jump to navigation Jump to search
[unchecked revision][unchecked revision]
Content deleted Content added
→‎Scan Code Set 2: Add 2 missing empty lines (before backspace and after \)
m →‎Enough, give me code!: Formatted code for legibility (id est indenting, mostly)
Line 236: Line 236:
inb function and scancode table.
inb function and scancode table.
*/
*/
char getScancode()
char getScancode() {
char c=0;
{
do {
char c=0;
if(inb(0x60)!=c) {
do {
if(inb(0x60)!=c)
c=inb(0x60);
if(c>0)
{
return c;
c=inb(0x60);
}
if(c>0)
} while(1);
return c;
}
}

}while(1);
char getchar() {
}
return scancode[getScancode()+1];
char getchar()
{
return scancode[getScancode()+1];
}
}
</source>
</source>

== Scan Code Sets ==
== Scan Code Sets ==