i in ckb) { var key = i.replace(/(^|-)\w/g, function (x) { return x.toUpperCase(); }); var commands = ckb[i]; if (!Array.isArray(commands)) commands = [commands]; commands.forEach(function (command) { if (typeof command != "string") command = command.name; if (commandMap[command]) { commandMap[command].key += "|" + key; } else { commandMap[command] = { key: key, command: command }; keybindings.push(commandMap[command]); } }); } }); return keybindings; }; }); ace.define("ace/ext/keybinding_menu",["require","exports","module","ace/editor","ace/ext/menu_tools/overlay_page","ace/ext/menu_tools/get_editor_keyboard_shortcuts"], function(require, exports, module){/*jslint indent: 4, maxerr: 50, white: true, browser: true, vars: true*/ "use strict"; var Editor = require("../editor").Editor; function showKeyboardShortcuts(editor) { if (!document.getElementById('kbshortcutmenu')) { var overlayPage = require('./menu_tools/overlay_page').overlayPage; var getEditorKeybordShortcuts = require('./menu_tools/get_editor_keyboard_shortcuts').getEditorKeybordShortcuts; var kb = getEditorKeybordShortcuts(editor); var el = document.createElement('div'); var commands = kb.reduce(function (previous, current) { return previous + '
'; }, ''); el.id = 'kbshortcutmenu'; el.innerHTML = '