Firstly I have moved your post to a different section. Please do not post questions about using leJOS in the development section that is intended to be used to discus the development of leJOS itself.
As to your question, why are you using both waitForAnyPress and readButtons? This is probably not a good idea. waitForAnyPress returns the state of the buttons after the button is pressed and so you can use this return value directly. Note however that as stated in the documentation. If the button is still down when you call this method then you will have to wait for it to be released before a new press will be detected. This means that you may need to ensure that the key has been released before you call waitForAnyPress again.
Perhaps if you provide details of exactly what it is you are trying to do we can offer a better solution.
leJOS news https://lejosnews.wordpress.com/