Skip to content

Commit

Permalink
(js) Improve hotkeys cheat sheet
Browse files Browse the repository at this point in the history
Add mapping for '*' character code and remove hotkeys from cheat sheet
when no callback is registered.
  • Loading branch information
cgx committed Oct 17, 2016
1 parent 9a05062 commit 1c0c7ab
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions UI/WebServerResources/js/Common/sgHotkeys.service.js
Expand Up @@ -71,6 +71,7 @@
};
// Char-code values for characters that require a key combinations
var CHAR_CODES = {
42: '*',
63: '?'
};

Expand Down Expand Up @@ -272,6 +273,8 @@
ret = callbackArray.splice(i, 1);
}
}
if (callbackArray.length === 0)
delete this._hotkeys[hotkey.key];
}
return ret;
};
Expand Down

0 comments on commit 1c0c7ab

Please sign in to comment.