detect_keydown returns true when you pressed the specified key.
However, the “key press” signal will be emitted several times when you press and hold a key.
Make sure you release your finger immediately after pressing a key just in case so that this function catches key press only once.