diff --git a/ui/lib/keyboard.js b/ui/lib/keyboard.js index f675c52c..d49b8f22 100755 --- a/ui/lib/keyboard.js +++ b/ui/lib/keyboard.js @@ -673,10 +673,30 @@ function buildKeybindingsHelpHTML(keybindings){ // Build HTML for a single key definition... // +// Format if combining sections (default): +// +// DOC +// KEYS +// +// +// Format if not combining sections: +// +// DOC +// +// MODE NAME +// KEYS +// +// ... +// +// // XXX not yet sure if we are handling the sections correctly... function getKeysByDocHTML(doc, help, combine_sections){ + combine_sections = combine_sections == null ? true : combine_sections + var spec = getKeysByDoc(doc, help) var res = '' + + res += ''+ doc +'' var keys = [] @@ -685,7 +705,7 @@ function getKeysByDocHTML(doc, help, combine_sections){ keys = spec[section].join(', ') res += '' +''+ section +'' - +''+ keys +'' + +''+ keys +'' +'' } else { keys = keys.concat(spec[section]) @@ -693,8 +713,7 @@ function getKeysByDocHTML(doc, help, combine_sections){ } if(combine_sections){ - res += ''+ doc +'' - +''+ keys.join(', ') +'' + res += ''+ keys.join(', ') +'' } return res + ''