2014-11-10 14:16:45 +00:00
|
|
|
#ifndef __KEYBOARD_H__
|
|
|
|
#define __KEYBOARD_H__
|
2014-10-20 18:19:02 +00:00
|
|
|
|
|
|
|
class Keyboard {
|
|
|
|
public:
|
2018-08-13 13:41:23 +00:00
|
|
|
virtual void up(uint8_t) = 0;
|
|
|
|
virtual void down(uint8_t) = 0;
|
2014-10-20 18:19:02 +00:00
|
|
|
virtual void reset() = 0;
|
2014-11-13 14:10:11 +00:00
|
|
|
|
2018-08-13 13:41:23 +00:00
|
|
|
static inline bool isshift(uint8_t scan) {
|
2014-11-13 14:10:11 +00:00
|
|
|
return scan == 0x12 || scan == 0x59;
|
|
|
|
}
|
2018-08-13 13:41:23 +00:00
|
|
|
static inline bool isctrl(uint8_t scan) {
|
2014-11-13 14:10:11 +00:00
|
|
|
return scan == 0x14;
|
|
|
|
}
|
2014-10-20 18:19:02 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|