Keyboard class
Re:Keyboard class
//Make believe Keyboard.h
class Keyboard
{
public:
Keyboard()
{
copy(keyscan,English);
}
~Keyboard()
{
}
int getchar()
{
outport(key);
return keyscan(key);
}
private:
unsigned char keyscan[256];
};
I just made that up, but can anyone help me figure out how to do it.
class Keyboard
{
public:
Keyboard()
{
copy(keyscan,English);
}
~Keyboard()
{
}
int getchar()
{
outport(key);
return keyscan(key);
}
private:
unsigned char keyscan[256];
};
I just made that up, but can anyone help me figure out how to do it.
Re:Keyboard class
What you need from your keyboard driver:
- To be able to handle interrupts from the keyboard controller
- To accept requests from programs which need to know which keys have been pressed