KeyboardManager: a class to manage the polling of a switch-matrix keyboard

Dependents:   KeyboardTest

Revision:
2:eb4cc53ff33d
Child:
3:1310c57aca77
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/kbd_mgr/KeyPressEventHandler.h	Sun Jan 23 23:15:36 2011 +0000
@@ -0,0 +1,21 @@
+#ifndef KEY_PRESS_EVENT_HANDLER_H_
+#define KEY_PRESS_EVENT_HANDLER_H_
+
+namespace kbd_mgr {
+
+/**
+ * @brief Interface used to report key presses and releases.
+ */
+class KeyPressEventHandler {
+public:
+    enum {
+        NoKey = -1
+    };
+    
+    virtual void operator()(int key, bool keyDown) = 0;
+    virtual ~KeyPressEventHandler() { }
+};
+    
+} // kbd_mgr
+
+#endif // KEY_PRESS_EVENT_HANDLER_H_