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

Displaying all possible keys for a combo in the cheatsheet #240

Open rerodrigues opened 8 years ago

rerodrigues commented 8 years ago

Hi @chieffancypants I've changed the format function to allow displaying all possible keys for each combo in the cheatsheet.

A possible usecase could be, for example, when you want to create shortcuts using keys that doesn't exist in all platforms.

hotkeys.bindTo($scope)
  .add({
    combo: ['home','alt+left'],
    description: "Go to beginning (PC/Mac)",
    callback: function (event, hotkey) {
      $scope.goToBeginning();
  }
});

It will now display both shortcuts on the cheat sheet.

rerodrigues commented 8 years ago

I also upped the karma-phantomjs-launcher version to 1.0.1 to fix the unsolved peer dependency error for phantomjs@>=1.9