How do I check if the user is pressing a key?
In java you don’t check if a key is pressed, instead you listen to KeyEvents. The right way to achieve your goal is to register a KeyEventDispatcher, and implement it to maintain the state of the desired key: Then you can always use: You can, of course, use same method to implement isPressing(“<some key>”) with … Read more