Reputation: 3432
I want to write keyReleased method which can check that Ctrl was released.
How to check that button is Ctrl in keyReleased handler?
Thanks friends!
Upvotes: 1
Views: 75
Reputation: 46861
Add KeyListener
on the component.
public void keyReleased(KeyEvent event) {
if(event.getKeyCode()==KeyEvent.VK_CONTROL){
// ctrl key is released
}
}
Upvotes: 3