Take the 2-minute tour ×  I've started using the angular-ui
keypress module and was wondering if there is a way to make
global shortcut keys which work no matter where I'm placed
within the body.  I've tried linking my ui-keydown to the body
but as it's not in focus the key events are not fired.   <body
ui-keydown="{'pageup':'nav_to($event, \'users\')'}">  I know I
could just focus a div and attach the key bindings to that but
what happens when I have a form and I want to access all the
global key bindings within each field?  share|improve this
question Did you try to bind the event to $window in your
controller or directive link function? –  rogerz Sep 25 '13 at
1:29 I have now and it's complaining about 'object has no method
'apply'' so I tried putting an apply function in my nav_to
method but it didn't recognise it. Is there a special way to do
that? –  map7 Sep 25 '13 at 4:10 Could you put up a jsfiddle? – 
JQuery Guru Oct 5 '13 at 4:53 add comment  2 Answers  up vote 5
down vote accepted  Try this in you