Delete the delay after the first character while holding the key

When I press and hold the key, the first character is typed, then there is a slight delay, and then other characters are typed. Something like that:

enter image description here

The same thing happens in the terminal. The same thing happens in the linux (tty) console, although this delay is less there.

I am working on a Python console application that uses cursesand handles arrow keystrokes, and this delay is also there.

I want to get rid of this delay, so when I press and hold the key - it will send signals evenly, without any specific delay after the first (or any other) character.

How can i do this? Should I use something from the arsenal curses? Or mess with some system-wide settings?

EDIT1: I think I found one way. I can go to the keyboard settings and set the auto retry delay. But it changes it globally and only for my graphical interface. This does not change anything in the linux console. So, I’m looking for a way to do this in the console as well, so that it only affects my application, not the whole system.

EDIT2: Found a command line way to do this globally in X http://linuxforcynics.com/how-to/set-keyboard-repeat-delay-and-rate

and method for linux console: https://unix.stackexchange.com/questions/58651/adjusting-keyboard-sensitivity-in-a-command-line-terminal

but still looking for an application-only way.

+4

Source: https://habr.com/ru/post/1628290/


All Articles