I have an accelerator for ctrl+s and at the same time a keylistener on a JTextField listening for keyTyped(). But when i press ctrl+s i dont want it to trigger keyTyped(). Any suggestions?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Why are you listening for “key typed” events on the text field?
Probably a better solution is to use a DocumentListener to be notified when text is added or removed from the text field.
If you state your actual requirement, not your solution we may be able to give other ideas.