Configure key repeat delay to detect if key is being pressed
问题 I am writing a program in C that uses ncurses to check if a key is being pressed. The problem is that there is a key repeat delay. If I for example hold the key 'a' while in the terminal there is a short delay before 'a' gets repeatedly entered. I want to be able to know if it is being pressed from the point where it is actually pressed. How do temporarily change this delay to be equal to 0 while in the terminal? I'm currently using Mac OSX 10.10.5. 回答1: With ncurses (any curses