I want add handler or listener to button which will respond every time I press key on keyboard even It’s not focus on it. How I can do that ?
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.
I was using a code like this in my onModuleLoad() method to catch the a keypress event and hide it from the browser. You can also use the
to check where it is coming from (for example tag name is “input”, “textarea”), and do your event handling based on that.