     {'*', '0', '#', 'D'}
 };
 
+uint16_t buttons_held = 0;
+
 static inline char dequeue_key(void) {
     if (head == tail)
         return '\0';

    for (uint8_t i = 0; i != KEYPAD_NUM_ROWS_COLS ; i++) {
        pinMode(KEYPAD_COL_PIN_BASE + i, OUTPUT);
        digitalWrite(KEYPAD_COL_PIN_BASE + i, LOW);
        // TODO unsure if INPUT_PULLUP is digital high with high impedance, needs testing.
        pinMode(KEYPAD_ROW_PIN_BASE + i, INPUT_PULLUP);
        // TODO set to CHANGED and handle multiple buttons!
        attachInterrupt(INTERRUPT_BASE + i, handle_interrupt, FALLING);
    }
}



    for (uint8_t i = 0; i != KEYPAD_NUM_ROWS_COLS ; i++) {
        digitalWrite(KEYPAD_COL_PIN_BASE + i, LOW);
        for (uint8_t j = 0; j != KEYPAD_NUM_ROWS_COLS ; j++) {
            uint16_t bitmask = (1 << (i * 4 + j));
            if (has_press(j) && !was_pressed(bitmask))
                queue_key(buttons[i][j]);
            buttons_held ^= bitmask;
        }
        digitalWrite(KEYPAD_COL_PIN_BASE + i, HIGH);
    }

