Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

9
  • 19
    To save other people some time, ng-keypress doesn't seem to be part of angular 1.0.x, ui-keypress (with slightly different calling semantics) is available though: angular-ui.github.io/ui-utils Commented Sep 18, 2013 at 0:38
  • 1
    I think the comment above this was aimed at a different answer. (Just for reference.) Commented Feb 11, 2014 at 12:33
  • Martin that's actually the function of a controller: to handle UI events. Commented Apr 8, 2014 at 14:21
  • 5
    Better yet, use ngKeypress and pass the $event to a custom filter. Commented Oct 2, 2014 at 19:28
  • 8
    Best answer +1. Why should I make my own directive, if there is one, already included in Angular? Commented Jul 13, 2016 at 10:09