You haven’t even close to given us enough code to help.
Edit: I very much assure you that you can spam messages. So the problem is in your code… which you could easily see by running in a debugger or simply putting some System.out.println() statements in.
I feel like this might be that you are usong an action controller for key input, if you want to get events every update that the key is held down then use an analogue controller. The action controller only sends updates when a key is initially pressed or released. But i can only guess, because you have only shown us a very small part of the code.