angular-hotkeys icon indicating copy to clipboard operation
angular-hotkeys copied to clipboard

Add hotkey shorcut click element in directive. close #197

Open AbraaoAlves opened this issue 9 years ago • 1 comments

Allow use hotkey like this:

<!-- Press "ctrl+q" to trigger click and 'doSomething()' -->
<button ng-click="doSomething()" hotkey="ctrl+q"> 
<!-- If element is disabled, handler is not triggered -->
<button ng-click="doSomething()" hotkey="ctrl+q" ng-disabled="expression"> 

[note]: this PR put event.preventDefault in click event, assuming that ng-click is present. Fixes #197

AbraaoAlves avatar Jan 06 '16 16:01 AbraaoAlves

+1

javisperez avatar Jan 08 '16 19:01 javisperez