1
0
mirror of https://github.com/jscrane/r65emu.git synced 2024-12-27 05:32:04 +00:00
r65emu/keyboard.h

19 lines
318 B
C
Raw Normal View History

2014-11-10 14:16:45 +00:00
#ifndef __KEYBOARD_H__
#define __KEYBOARD_H__
class Keyboard {
public:
virtual void up(byte) = 0;
virtual void down(byte) = 0;
virtual void reset() = 0;
2014-11-13 14:10:11 +00:00
2014-12-15 14:36:52 +00:00
static inline bool isshift(byte scan) {
2014-11-13 14:10:11 +00:00
return scan == 0x12 || scan == 0x59;
}
2014-12-15 14:36:52 +00:00
static inline bool isctrl(byte scan) {
2014-11-13 14:10:11 +00:00
return scan == 0x14;
}
};
#endif