chieffancypants / angular-hotkeys

Configuration-centric keyboard shortcuts for your Angular apps.
http://chieffancypants.github.io/angular-hotkeys/
MIT License
1.68k stars 248 forks source link

Bind hotkey to single element #230

Open cielusinski opened 8 years ago

cielusinski commented 8 years ago

Hello,

Is there any way that i can bind the hotkey to a single element? For an example: if i have date field in my form and i want to open a calendar with a hotkey, is there a way that i can bind the hotkey to work only with this field? When i bind a hotkey, i triggers independent of the field focus.

Thanks in advance.

fontiana commented 8 years ago

+1

ryanfinken commented 8 years ago

I am also interested in this as well as binding to elements within a given controller/scope. For example, I have a page with three tabs on it. I would like to make it so that the hotkeys for a given tab are only fired when that tab is active.

Thanks!

ibreathebsb commented 7 years ago

this is also what i need! i am using ng-repeat to generate DOM(form and input),what i want is to bind hotkey only to one input! however if i bind some function to its parent controller,it wont take effect , only way is to use global hotkey