Index: /CKEditor/branches/prototype/_source/core/dom/event.js =================================================================== --- /CKEditor/branches/prototype/_source/core/dom/event.js (revision 2389) +++ /CKEditor/branches/prototype/_source/core/dom/event.js (revision 2390) @@ -40,2 +40,63 @@ this.$ = domEvent; }; + +CKEDITOR.dom.event.prototype = +{ + /** + * Gets the key code associated to the event. + * @returns {Number} The key code. + * @example + * alert( event.getKey() ); "65" is "a" has been pressed + */ + getKey : function() + { + return this.$.keyCode || this.$.which; + }, + + /** + * Gets a number represeting the combination of the keys pressed during the + * event. It is the sum with the current key code and the {@link CKEDITOR.CTRL}, + * {@link CKEDITOR.SHIFT} and {@link CKEDITOR.ALT} constants. + * @returns {Number} The number representing the keys combination. + * @example + * alert( event.getKeystroke() == 65 ); // "a" key + * alert( event.getKeystroke() == CKEDITOR.CTRL + 65 ); // CTRL + "a" key + * alert( event.getKeystroke() == CKEDITOR.CTRL + CKEDITOR.SHIFT + 65 ); // CTRL + SHIFT + "a" key + */ + getKeystroke : function() + { + var keystroke = this.getKey(); + + if ( this.$.ctrlKey || this.$.metaKey ) + keystroke += CKEDITOR.CTRL; + + if ( this.$.shiftKey ) + keystroke += CKEDITOR.SHIFT; + + if ( this.$.altKey ) + keystroke += CKEDITOR.ALT; + + return keystroke; + } +}; + +/** + * CTRL key (1000). + * @constant + * @example + */ +CKEDITOR.CTRL = 1000; + +/** + * SHIFT key (2000). + * @constant + * @example + */ +CKEDITOR.SHIFT = 2000; + +/** + * ALT key (4000). + * @constant + * @example + */ +CKEDITOR.ALT = 4000; Index: /CKEditor/branches/prototype/_source/lang/ar.js =================================================================== --- /CKEditor/branches/prototype/_source/lang/ar.js (revision 2389) +++ /CKEditor/branches/prototype/_source/lang/ar.js (revision 2390) @@ -27,4 +27,9 @@ underline : 'تسطير', bold : 'غامق', - italic : 'مائل' + italic : 'مائل', + + elementsPath : + { + eleTitle : '%1 element' + } }; Index: /CKEditor/branches/prototype/_source/lang/en.js =================================================================== --- /CKEditor/branches/prototype/_source/lang/en.js (revision 2389) +++ /CKEditor/branches/prototype/_source/lang/en.js (revision 2390) @@ -48,4 +48,9 @@ underline : 'Underline', bold : 'Bold', - italic : 'Italic' + italic : 'Italic', + + elementsPath : + { + eleTitle : '%1 element' + } }; Index: /CKEditor/branches/prototype/_source/lang/it.js =================================================================== --- /CKEditor/branches/prototype/_source/lang/it.js (revision 2389) +++ /CKEditor/branches/prototype/_source/lang/it.js (revision 2390) @@ -27,4 +27,9 @@ underline : 'Sottolineato', bold : 'Grassetto', - italic : 'Corsivo' + italic : 'Corsivo', + + elementsPath : + { + eleTitle : '%1 element' + } }; Index: /CKEditor/branches/prototype/_source/lang/pt-br.js =================================================================== --- /CKEditor/branches/prototype/_source/lang/pt-br.js (revision 2389) +++ /CKEditor/branches/prototype/_source/lang/pt-br.js (revision 2390) @@ -27,4 +27,9 @@ underline : 'Sublinhado', bold : 'Negrito', - italic : 'Itálico' + italic : 'Itálico', + + elementsPath : + { + eleTitle : '%1 element' + } }; Index: /CKEditor/branches/prototype/_source/plugins/button/plugin.js =================================================================== --- /CKEditor/branches/prototype/_source/plugins/button/plugin.js (revision 2389) +++ /CKEditor/branches/prototype/_source/plugins/button/plugin.js (revision 2390) @@ -111,12 +111,50 @@ render : function( editor, output ) { + var env = CKEDITOR.env.opera; + + var id = 'cke_' + CKEDITOR.tools.getNextNumber(); + + var instance = + { + id : id, + button : this, + editor : editor, + focus : function() + { + var element = CKEDITOR.document.getById( this.id ); + element.focus(); + }, + execute : function() + { + this.button.click( editor ); + } + }; + + var index = CKEDITOR.ui.button._.instances.push( instance ) - 1; + output.push( - '' + + '' + '' + '', this.label, '' + '' ); + + return instance; } }; @@ -128,12 +166,21 @@ CKEDITOR.ui.button._ = { - click : function( instanceName, uiItemName, elementId ) - { - var editor = CKEDITOR.instances[ instanceName ]; - editor.focus(); - - var uiItem = editor.ui.get( uiItemName ).click( editor, elementId ); - + instances : [], + + click : function( index ) + { + CKEDITOR.ui.button._.instances[ index ].execute(); return false; + }, + + keydown : function( index, ev ) + { + var instance = CKEDITOR.ui.button._.instances[ index ]; + + if ( instance.onkey ) + { + ev = new CKEDITOR.dom.event( ev ); + return ( instance.onkey( instance, ev.getKeystroke() ) !== false ); + } } }; Index: /CKEditor/branches/prototype/_source/plugins/elementspath/plugin.js =================================================================== --- /CKEditor/branches/prototype/_source/plugins/elementspath/plugin.js (revision 2389) +++ /CKEditor/branches/prototype/_source/plugins/elementspath/plugin.js (revision 2390) @@ -25,53 +25,91 @@ */ -CKEDITOR.plugins.add( 'elementspath', +(function() { - requires : [ 'selection' ], + var commands = + { + toolbarFocus : + { + exec : function( editor ) + { + var idBase = editor._.elementsPath.idBase; + var element = CKEDITOR.document.getById( idBase + '0' ); - init : function( editor, pluginPath ) + if ( element ) + element.focus(); + } + } + }; + + CKEDITOR.plugins.add( 'elementspath', { - var spaceId = 'cke_path_' + editor.name; - var spaceElement; - var getSpaceElement = function() + requires : [ 'selection' ], + + init : function( editor, pluginPath ) { - if ( !spaceElement ) - spaceElement = CKEDITOR.document.getById( spaceId ); - return spaceElement; - }; + var spaceId = 'cke_path_' + editor.name; + var spaceElement; + var getSpaceElement = function() + { + if ( !spaceElement ) + spaceElement = CKEDITOR.document.getById( spaceId ); + return spaceElement; + }; - editor.on( 'themeSpace', function( event ) - { - if ( event.data.space == 'bottom' ) - event.data.html += '