00001
00008
00009
00010
00011
00012
00013 #ifndef INP_KEYBOARD_HH
00014 #define INP_KEYBOARD_HH 1
00015
00016 namespace inp {
00017
00024 class Keyboard
00025 {
00026
00027 public:
00031 class Event
00032 {
00033 public:
00034 Event( void )
00035 : mKey(0), mSpecial(0), mPress(0), mShift(0), mCtrl(0), mAlt(0)
00036 { }
00037
00038 Event( int key, bool special, bool press, bool shift, bool ctrl, bool alt )
00039 : mKey(key), mSpecial(special), mPress(press), mShift(shift), mCtrl(ctrl), mAlt(alt)
00040 { }
00041
00042 bool IfModifier( void ) const { return mShift || mCtrl || mAlt; }
00043 public:
00044 int mKey;
00045 bool mSpecial;
00046 bool mPress;
00047 bool mShift;
00048 bool mCtrl;
00049 bool mAlt;
00050 };
00051
00052 protected:
00053
00054 Keyboard( void ) { }
00055 virtual ~Keyboard() { }
00056
00057 public:
00058 virtual void Enable( void ) = 0;
00059 };
00060
00061 }
00062
00063 #endif // INP_KEYBOARD_HH