Is it possible? Something like this:
...
events {
'keydown body' : 'doSmth'
}
...
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.
This is not possible because Backbone uses the events hash to subscribe to events on the view’s element (view.el property) and the element’s descendants. It does not subscribe to events from elements outside the view’s element.
So if your view’s element is table, then the doSomething() function will be called when the keydown event is fired on the table, but it will not be called if the keydown event is fired on another element on the page.