From c0c420cd6c77897e6d21de7f2e8ee4e78a37f4f0 Mon Sep 17 00:00:00 2001 From: Jonathan Park Date: Tue, 3 Mar 2015 11:15:49 -0800 Subject: [PATCH] hotkeys interface supports both string and string[] for combos --- angular-hotkeys/angular-hotkeys-tests.ts | 5 +++++ angular-hotkeys/angular-hotkeys.d.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/angular-hotkeys/angular-hotkeys-tests.ts b/angular-hotkeys/angular-hotkeys-tests.ts index a065d4b21..358410811 100644 --- a/angular-hotkeys/angular-hotkeys-tests.ts +++ b/angular-hotkeys/angular-hotkeys-tests.ts @@ -22,4 +22,9 @@ hotkeyProvider.bindTo(scope) description: 'blah blah', callback: function() {} }); + .add({ + combo: ['w', 'mod+w'], + description: 'blah blah', + callback: function() {} + }); diff --git a/angular-hotkeys/angular-hotkeys.d.ts b/angular-hotkeys/angular-hotkeys.d.ts index 63da273ce..83d5021cc 100644 --- a/angular-hotkeys/angular-hotkeys.d.ts +++ b/angular-hotkeys/angular-hotkeys.d.ts @@ -40,7 +40,7 @@ declare module ng.hotkeys { } interface Hotkey { - combo: string; + combo: string | string[]; description?: string; callback: (event: Event, hotkey: ng.hotkeys.Hotkey) => void; action?: string;