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

Dependents:   KeyboardTest

Embed: (wiki syntax)

« Back to documentation index

SingleKeyPressMonitor Class Reference

SingleKeyPressMonitor Class Reference

A keyboard state change handler that reports on single keypresses. More...

#include <SingleKeyPressMonitor.h>

Inherits kbd_mgr::KeyPressEventServer, and kbd_mgr::KeyboardStateHandler.

Public Member Functions

void attach (FunctionKeyPressEventHandler::HandlerFunction fn)
 Attaches the monitor to a function.
template<class T >
void attach (T *obj, typename MemberKeyPressEventHandler< T >::MemberFunction fn)
 Attaches the monitor to a method of an object.

Detailed Description

A keyboard state change handler that reports on single keypresses.

It voluntarily ignores key combinations (only the first key pressed in a combo is reported).

Definition at line 13 of file SingleKeyPressMonitor.h.


Member Function Documentation

void attach ( FunctionKeyPressEventHandler::HandlerFunction  fn ) [inherited]

Attaches the monitor to a function.

Parameters:
fnEvent handler called to report keyboard state change.

Definition at line 18 of file KeyPressEventServer.h.

void attach ( T *  obj,
typename MemberKeyPressEventHandler< T >::MemberFunction  fn 
) [inherited]

Attaches the monitor to a method of an object.

Parameters:
objEvent handler object
fnEvent handler method called to report keyboard state after each complete scan.

Definition at line 28 of file KeyPressEventServer.h.