I am trying to move a box on the screen using onKeyDown(). The problem is that when I press and hold down my move key, I get a delay of about 500ms between the first and the second key-down events. After that, the events come in smooth. I am handling onKeyDown() in the main thread.
What is causing this and how can I solve it?