chieffancypants / angular-hotkeys

Configuration-centric keyboard shortcuts for your Angular apps.
http://chieffancypants.github.io/angular-hotkeys/
MIT License
1.68k stars 254 forks source link

i have more hotkeys than the CheatSheet can show #248

Open eassa opened 7 years ago

eassa commented 7 years ago

image

eassa commented 7 years ago

i changed this class in the css , now it works :-

.cfp-hotkeys{
    overflow-y: scroll !important;
    display: block !important;
}
lovelylip commented 7 years ago

Add typeop in attributes of HotKeys, to getType impossible, you can no format combo: shift, left, right, I thinks.

ahmedBassell commented 7 years ago

+1

VictorMedeiros commented 7 years ago

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()">&#215;</div>' +
    '</div></div>';
ylerjen commented 4 years ago

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.