angular-hotkeys
angular-hotkeys copied to clipboard
i have more hotkeys than the CheatSheet can show
i changed this class in the css , now it works :-
.cfp-hotkeys{
overflow-y: scroll !important;
display: block !important;
}
Add typeop in attributes of HotKeys, to getType impossible, you can no format combo: shift, left, right, I thinks.
+1
I had the same problem. What I did was split the generated table to show two hotkeys/description per row. You can change the template of the cheatseet by setting the property template of the hotkeysProvider on your config function.
My code:
hotkeysProvider.template = '<div class="cfp-hotkeys-container fade" ng-class="{in: helpVisible}" style="display: none;"><div class="cfp-hotkeys">' +
'<h4 class="cfp-hotkeys-title" ng-if="!header">{{ title }}</h4>' +
'<div ng-bind-html="header" ng-if="header"></div>' +
'<table>' +
'<tbody ng-repeat="hotkey in hotkeys | filter:{ description: \'!$$undefined$$\' }">' +
'<tr ng-if="$even">' +
'<td class="cfp-hotkeys-keys">' +
'<span ng-repeat="key in hotkey.format() track by $index" class="cfp-hotkeys-key">{{ key }}</span>' +
'</td>' +
'<td class="cfp-hotkeys-text">{{ hotkey.description }}</td>' +
'<td style="width:50px;"></td>' +
'<td class="cfp-hotkeys-keys">' +
'<span ng-repeat="key in hotkeys[$index+1].format() track by $index" class="cfp-hotkeys-key">{{ key }}</span>' +
'</td>' +
'<td class="cfp-hotkeys-text">{{ hotkeys[$index+1].description }}</td>' +
'</tr>' +
'</tbody>' +
'</table>' +
'<div ng-bind-html="footer" ng-if="footer"></div>' +
'<div class="cfp-hotkeys-close" ng-click="toggleCheatSheet()">×</div>' +
'</div></div>';
This thread is more than 3 years old, but as there's still angularjs applications using it, and as I'm concerned by the fix, I've made a fix proposal with this PR : https://github.com/chieffancypants/angular-hotkeys/pull/292 Please review.