diff --git a/lib/ace/ext/show_keyboard_shortcuts.js b/lib/ace/ext/show_keyboard_shortcuts.js index e2469e60..a88a6e55 100644 --- a/lib/ace/ext/show_keyboard_shortcuts.js +++ b/lib/ace/ext/show_keyboard_shortcuts.js @@ -33,13 +33,12 @@ define(function(require, exports, module) { module.exports = function showKeyboardShortcuts (editor) { var kb = getEditorKeybordShortcuts(editor); var el = document.createElement('div'); - el.innerHTML = '

' + - 'Keyboard Shortcuts

' + - JSON.stringify(kb, null, ' ') + - '
'; - el.style.cssText = 'margin:0; padding:0; ' + - 'background-color:white; color:black; ' + - 'white-space: pre-wrap;'; + var commands = kb.reduce(function (previous, current) { + return previous + '
' + current.command + ' : ' + + current.key + '
'; + }, ''); + el.innerHTML = '

Keyboard Shortcuts

' + commands; + el.style.cssText = 'margin:0; padding:0;'; overlayPage(el, '0', '0', '0', null); }; }); \ No newline at end of file