M5Unit-KEYBOARD 0.1.0 git rev:b58d024
Loading...
Searching...
No Matches
unit_Tab5Keyboard.cpp File Reference

Tab5 Keyboard Unit for M5UnitUnified. More...

#include "unit_Tab5Keyboard.hpp"
#include <algorithm>
#include <cstring>
#include <M5Utility.hpp>
#include "../utility/hid_keycode.hpp"

Namespaces

namespace  m5
 Top level namespace of M5Stack.
 

Functions

HidMapping m5::unit::tab5_keyboard::keyMatrixToHidBase (const uint8_t row, const uint8_t col)
 Base (no Sym held) HID mapping for the given (row, col)
 
HidMapping m5::unit::tab5_keyboard::keyMatrixToHidSym (const uint8_t row, const uint8_t col)
 Sym-held variant of the HID mapping for the given (row, col)
 

Detailed Description

Tab5 Keyboard Unit for M5UnitUnified.

Function Documentation

◆ keyMatrixToHidBase()

HidMapping m5::unit::tab5_keyboard::keyMatrixToHidBase ( const uint8_t row,
const uint8_t col )

Base (no Sym held) HID mapping for the given (row, col)

Parameters
rowMatrix row (0..4)
colMatrix column (0..13)
Returns
HidMapping for the key. Returns {0, 0} for out-of-range coordinates and for the four modifier keys (Sym/Aa/Ctrl/Alt).
Note
US ANSI layout, derived from Tab5 firmware HID-mode logs.

◆ keyMatrixToHidSym()

HidMapping m5::unit::tab5_keyboard::keyMatrixToHidSym ( const uint8_t row,
const uint8_t col )

Sym-held variant of the HID mapping for the given (row, col)

Parameters
rowMatrix row (0..4)
colMatrix column (0..13)
Returns
HidMapping that reflects the Sym-layer character. Keys whose Sym layer is identical to the base layer return the same value as keyMatrixToHidBase(). Modifier keys and out-of-range coordinates return {0, 0}.