Emakefun Matrix Keyboard Arduino Lib 1.0.1
Loading...
Searching...
No Matches
print_key_state.ino File Reference

Example: Loop to determine the status of each key. More...

#include <Wire.h>
#include "matrix_keyboard.h"

Go to the source code of this file.

Macros

#define PRINT_KEY_STATE(key)
 

Functions

void setup ()
 
void loop ()
 

Detailed Description

Example: Loop to determine the status of each key.

Definition in file print_key_state.ino.

Macro Definition Documentation

◆ PRINT_KEY_STATE

#define PRINT_KEY_STATE ( key)
Value:
if (g_matrix_keyboard.Pressed(emakefun::MatrixKeyboard::kKey##key)) { \
Serial.println(F("key " #key " pressed")); \
} else if (g_matrix_keyboard.Pressing(emakefun::MatrixKeyboard::kKey##key)) { \
Serial.println(F("key " #key " pressing")); \
} else if (g_matrix_keyboard.Released(emakefun::MatrixKeyboard::kKey##key)) { \
Serial.println(F("key " #key " released")); \
}

Definition at line 20 of file print_key_state.ino.

Function Documentation

◆ loop()

void loop ( )

Definition at line 59 of file print_key_state.ino.

◆ setup()

void setup ( )

Definition at line 39 of file print_key_state.ino.