Updated to keep reading the same key until the DEBOUNCE is zero.