I have this piece of code which allows a user to leave comments on a list of items. I created a directive and listen to keydown in order to let the user submit a comment if
you don't need to write a directive, if you want to use ng-keydown..
$scope.checkKeyCode = ($event)-> if $event.keyCode == 13 and $scope.myText? $scope.doSomething()