You need to intercept pressing and releasing KEY_LCONTROL and save this condition. When you press the command buttons (“s” or “p”) to check the saved status.
Chances are you may already have a delegate. A delegate in this case is just “any of your classes” that happen to have “any of your methods that might do the thing you want doing”. Since I don’t know anything at all about how your code is setup it’s hard for me to comment more specifically.
The delegate is the easiest way because it probably uses code you already have.
In this case, I had the app state itself implement the listeners. It could have just as easily been an inner class or an anonymous inner class. (If you don’t know what an anonymous inner class is then google is your friend as you have some basic Java to beef up on which is probably off topic here.)