brtnshrdr / angular2-hotkeys

Keyboard shortcuts for Angular 2 apps
MIT License
203 stars 95 forks source link

feat(): add possibility to listen to change events #119

Open billyjov opened 5 years ago

billyjov commented 5 years ago

It will be cool if we can watch for combo change. e.g on keydown or keyup event

wittlock commented 5 years ago

I'm not quite sure I understand what you are asking for here. Could you try explaining it in a bit more detail?

billyjov commented 5 years ago

Consider for example a user press on the alt key that enable some elements on the pages.. We have to do something like this to listen to the keyup event as soon as the user leave the key.

@HostListener('window:keyup', ['$event'])
  aMethod(event: KeyboardEvent): void {
   // Do Something
}

A suggestion is to integrate this to the library as an built in feature.