I wasn't quite sure how to word the title of this question. Basically I'm making space invaders with JFrames, and using KeyBindings for keyboard input. The keybindings work fine, and I can move the ship around without a problem. However, if I hold down a key, the ship moves 5 pixels and then pauses for about half a second, after which it moves smoothly. When the key is pressed, my code increases the ship's speed (which moves the ship by 5-10 pixels every frame). I'm assuming this is a common and normal behaviour of keyboard input, but I want the ship to move consistently smoothly. Is there a way to achieve this?
(Note. My code is very long, and since I'm assuming this is a normal thing to happen, I won't post it straight away. However, if you do need to see it, leave a comment and I'll edit it in.)