IoAbstraction
Public Member Functions | List of all members
KeyboardLayout Class Reference

#include <KeyboardManager.h>

Public Member Functions

 KeyboardLayout (uint8_t rows, uint8_t cols, const char *pgmLayout)
 
int numColumns ()
 
int numRows ()
 
void setColPin (int col, int pin)
 
void setRowPin (int row, int pin)
 
int getRowPin (int row)
 
int getColPin (int col)
 
char keyFor (uint8_t row, uint8_t col)
 

Detailed Description

The keyboard manager can handle any layout of matrix keyboard by providing it a layout. This class is used to tell the matrix manager the row and column arrangements of your keyboard matrix. There are two standard ones defined in this file. They are LAYOUT_3X4, LAYOUT_4X4. When creating a class of this type, be sure that your string of keyCode mappings is defined as PROGMEM and at rows * cols in size. You can either use one of the standard defined layouts or generate your own.

Constructor & Destructor Documentation

◆ KeyboardLayout()

KeyboardLayout::KeyboardLayout ( uint8_t  rows,
uint8_t  cols,
const char *  pgmLayout 
)
inline

Create a keyboard layout with a number of rows and columns, the characters that are associated with each key are also provided in a char array.

Parameters
rowsthe number of rows in the keyboard
colsthe number of columns in the keyboard.
pgmLayoutthe character codes for each position in the keyboard

The documentation for this class was generated from the following file: