angular-hotkeys icon indicating copy to clipboard operation
angular-hotkeys copied to clipboard

i have more hotkeys than the CheatSheet can show

Open eassa opened this issue 8 years ago • 5 comments

image

eassa avatar Sep 23 '16 09:09 eassa

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

.cfp-hotkeys{
    overflow-y: scroll !important;
    display: block !important;
}

eassa avatar Sep 23 '16 12:09 eassa

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

lovelylip avatar Oct 27 '16 03:10 lovelylip

+1

ahmedBassell avatar Nov 06 '16 14:11 ahmedBassell

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>';

VictorMedeiros avatar Dec 09 '16 17:12 VictorMedeiros

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.

ylerjen avatar Dec 20 '19 09:12 ylerjen