KeyboardManager: a class to manage the polling of a switch-matrix keyboard
KeyboardStateChangeMonitor.cpp
- Committer:
- osmeest
- Date:
- 2011-01-23
- Revision:
- 2:eb4cc53ff33d
- Child:
- 3:1310c57aca77
File content as of revision 2:eb4cc53ff33d:
#include "kbd_mgr/KeyboardStateChangeMonitor.h" namespace kbd_mgr { void KeyboardStateChangeMonitor::operator()(const KeyboardState &newState) { if (newState != this->lastState) { if (this->handler) { (*this->handler)(newState); } this->lastState = newState; } } } // kbd_mgr