30 static uint32_t active_start = 0;
31 static int active_key = -1;
35 int pos = 0, row, col;
36 for (
auto *row : this->
rows_) {
57 if (key != active_key) {
58 if ((active_key != -1) && (this->
pressed_key_ == active_key)) {
61 ESP_LOGD(TAG,
"key @ row %d, col %d released", row, col);
63 listener->button_released(row, col);
64 if (!this->
keys_.empty()) {
66 ESP_LOGD(TAG,
"key '%c' released", keycode);
67 for (
auto &listener : this->listeners_)
68 listener->key_released(keycode);
84 ESP_LOGD(TAG,
"key @ row %d, col %d pressed", row, col);
86 listener->button_pressed(row, col);
87 if (!this->
keys_.empty()) {
88 uint8_t keycode = this->
keys_[key];
89 ESP_LOGD(TAG,
"key '%c' pressed", keycode);
91 trigger->trigger(keycode);
92 for (
auto &listener : this->listeners_)
93 listener->key_pressed(keycode);