// Modifier keys override.\r
keyMap[ CKEDITOR.ALT ] = coreLang[ 18 ];\r
keyMap[ CKEDITOR.SHIFT ] = coreLang[ 16 ];\r
- keyMap[ CKEDITOR.CTRL ] = coreLang[ 17 ];\r
+ keyMap[ CKEDITOR.CTRL ] = CKEDITOR.env.mac ? coreLang[ 224 ] : coreLang[ 17 ];\r
\r
// Sort in desc.\r
var modifiers = [ CKEDITOR.ALT, CKEDITOR.SHIFT, CKEDITOR.CTRL ];\r
function representKeyStroke( keystroke ) {\r
var quotient, modifier,\r
presentation = [];\r
-\r
for ( var i = 0; i < modifiers.length; i++ ) {\r
modifier = modifiers[ i ];\r
quotient = keystroke / modifiers[ i ];\r
return presentation.join( '+' );\r
}\r
\r
- var variablesPattern = /\$\{(.*?)\}/g;\r
-\r
- var replaceVariables = ( function() {\r
- // Swaps keystrokes with their commands in object literal.\r
- // This makes searching keystrokes by command much easier.\r
- var keystrokesByCode = editor.keystrokeHandler.keystrokes,\r
- keystrokesByName = {};\r
-\r
- for ( var i in keystrokesByCode )\r
- keystrokesByName[ keystrokesByCode[ i ] ] = i;\r
+ var variablesPattern = /\$\{(.*?)\}/g,\r
+ replaceVariables = function( match, name ) {\r
+ var keystrokeCode = editor.getCommandKeystroke( name );\r
\r
- return function( match, name ) {\r
// Return the keystroke representation or leave match untouched\r
// if there's no keystroke for such command.\r
- return keystrokesByName[ name ] ? representKeyStroke( keystrokesByName[ name ] ) : match;\r
+ return keystrokeCode ? representKeyStroke( keystrokeCode ) : match;\r
};\r
- } )();\r
\r
// Create the help list directly from lang file entries.\r
function buildHelpContents() {\r
\r
for ( var j = 0; j < itemsLength; j++ ) {\r
var item = items[ j ],\r
- itemLegend = item.legend.replace( variablesPattern, replaceVariables );\r
+ // (http://dev.ckeditor.com/ticket/16980) There should be a different hotkey shown in Commands on Edge browser.\r
+ itemLegend = CKEDITOR.env.edge && item.legendEdge ? item.legendEdge : item.legend;\r
\r
- // (#9765) If some commands haven't been replaced in the legend,\r
+ itemLegend = itemLegend.replace( variablesPattern, replaceVariables );\r
+\r
+ // (http://dev.ckeditor.com/ticket/9765) If some commands haven't been replaced in the legend,\r
// most likely their keystrokes are unavailable and we shouldn't include\r
// them in our help list.\r
- if ( itemLegend.match( variablesPattern ) )\r
+ if ( itemLegend.match( variablesPattern ) ) {\r
continue;\r
+ }\r
\r
sectionHtml.push( itemTpl.replace( '%1', item.name ).replace( '%2', itemLegend ) );\r
}\r
'overflow-y:auto;' +\r
'overflow-x:hidden;' +\r
'}' +\r
- // Some adjustments are to be done for Quirks to work "properly" (#5757)\r
+ // Some adjustments are to be done for Quirks to work "properly" (http://dev.ckeditor.com/ticket/5757)\r
'.cke_browser_quirks .cke_accessibility_legend,' +\r
'{' +\r
'height:390px' +\r