brtnshrdr / angular2-hotkeys

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

Using combo array => error in cheatsheet #109

Closed gcardozoj closed 5 years ago

gcardozoj commented 5 years ago

When you configure the HotKey using an array of combination the cheatsheet only show the first one.

new Hotkey(['ctrl+up', 'ctrl+down', 'ctrl+left', 'ctrl+right'],(e: KeyboardEvent) => {false;});

The cheatsheet only show the first option 'ctrl+up'

The error is in the "get formatted(): string[]" function of hotkey.model.ts file. You are only using the first element of the array.

wittlock commented 5 years ago

Thanks for the bug report, I'll try to look into fixing it.

omridevk commented 5 years ago

@wittlock Sorry, didn't mean to "steal" the spotlight or something, I thought this library is no longer maintained. sorry, my bad. Great library by the way.

wittlock commented 5 years ago

@omridevk No worries, just cleaning up some clutter. There's no heavy maintenance going on, but I'm trying to keep the issues clear and with relevant comments.

wittlock commented 5 years ago

This should be fixed as of 2.1.4