2017-02-20 18:55:16 +00:00
|
|
|
#ifndef __TEENSY_KEYBOARD_H
|
|
|
|
#define __TEENSY_KEYBOARD_H
|
|
|
|
|
|
|
|
#include "physicalkeyboard.h"
|
|
|
|
|
|
|
|
class TeensyKeyboard : public PhysicalKeyboard {
|
|
|
|
public:
|
|
|
|
TeensyKeyboard(VMKeyboard *k);
|
|
|
|
virtual ~TeensyKeyboard();
|
|
|
|
|
|
|
|
// Interface used by the VM...
|
|
|
|
virtual void maintainKeyboard();
|
|
|
|
|
|
|
|
// Interface used by the BIOS...
|
2018-02-07 15:20:26 +00:00
|
|
|
virtual bool kbhit();
|
|
|
|
virtual int8_t read();
|
2017-02-20 18:55:16 +00:00
|
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
void pressedKey(uint8_t key);
|
|
|
|
void releasedKey(uint8_t key);
|
|
|
|
|
|
|
|
private:
|
|
|
|
bool leftShiftPressed;
|
|
|
|
bool rightShiftPressed;
|
|
|
|
bool ctrlPressed;
|
|
|
|
bool capsLock;
|
|
|
|
bool leftApplePressed;
|
|
|
|
bool rightApplePressed;
|
|
|
|
|
|
|
|
int8_t numPressed;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|