How to capture the key event from a view?

You can do this in the view initialize() function:

_.bindAll(this, 'on_keypress');
$(document).bind('keypress', this.on_keypress);

Leave a Comment