2025-07-21 19:33:24 +02:00
|
|
|
#include "TCA8418KeyboardBase.h"
|
2025-04-03 19:18:18 +00:00
|
|
|
|
2025-07-21 19:33:24 +02:00
|
|
|
/**
|
|
|
|
|
* @brief 3x4 keypad with 3 columns and 4 rows
|
|
|
|
|
*/
|
|
|
|
|
class TCA8418Keyboard : public TCA8418KeyboardBase
|
2025-04-03 19:18:18 +00:00
|
|
|
{
|
|
|
|
|
public:
|
2025-07-21 19:33:24 +02:00
|
|
|
TCA8418Keyboard();
|
|
|
|
|
void reset(void) override;
|
|
|
|
|
void setBacklight(bool on) override;
|
2025-04-03 19:18:18 +00:00
|
|
|
|
2025-07-21 19:33:24 +02:00
|
|
|
protected:
|
|
|
|
|
void pressed(uint8_t key) override;
|
|
|
|
|
void released(void) override;
|
2025-04-03 19:18:18 +00:00
|
|
|
|
|
|
|
|
int8_t last_key;
|
2025-07-21 19:33:24 +02:00
|
|
|
int8_t next_key;
|
2025-04-03 19:18:18 +00:00
|
|
|
uint32_t last_tap;
|
|
|
|
|
uint8_t char_idx;
|
|
|
|
|
int32_t tap_interval;
|
2025-07-21 19:33:24 +02:00
|
|
|
bool should_backspace;
|
2025-04-03 19:18:18 +00:00
|
|
|
};
|