Index: /CKEditor/branches/prototype/_source/plugins/dialog/plugin.js
===================================================================
--- /CKEditor/branches/prototype/_source/plugins/dialog/plugin.js	(revision 2674)
+++ /CKEditor/branches/prototype/_source/plugins/dialog/plugin.js	(revision 2675)
@@ -173,7 +173,11 @@
 	CKEDITOR.event.implementOn( this );
 
-	// Initialize load, ok and cancel events.
+	// Initialize load, show, hide, ok and cancel events.
 	if ( definition.onLoad )
 		this.on( 'load', definition.onLoad, this, null, CKEDITOR.tools.getNextNumber() );
+	if ( definition.onShow )
+		this.on( 'show', definition.onShow, this, null, CKEDITOR.tools.getNextNumber() );
+	if ( definition.onHide )
+		this.on( 'hide', definition.onHide, this, null, CKEDITOR.tools.getNextNumber() );
 	if ( definition.onOk )
 		this.on( 'ok', function( evt )
@@ -429,4 +433,10 @@
 		}
 
+		// Register the Esc hotkeys.
+		CKEDITOR.dialog._.registerAccessKey( this, this, '\x1b', null, function()
+				{
+					this.getButton( 'cancel' ) && this.getButton( 'cancel' ).click();
+				} );
+
 		// Save editor selection and grab the focus.
 		if ( !this._.parentDialog )
@@ -552,5 +562,5 @@
 		if ( contents.accessKey )
 		{
-			CKEDITOR.dialog._.registerAccessKey( this, this, contents.accessKey,
+			CKEDITOR.dialog._.registerAccessKey( this, this, 'CTRL+' + contents.accessKey,
 				CKEDITOR.dialog._.tabAccessKeyDown, CKEDITOR.dialog._.tabAccessKeyUp );
 			this._.accessKeyMap[ contents.accessKey ] = contents.id;
@@ -1224,12 +1234,14 @@
 	{
 		var ctrl = evt.data.$.ctrlKey || evt.data.$.metaKey,
+			alt = evt.data.$.altKey,
+			shift = evt.data.$.shiftKey,
 			key = String.fromCharCode( evt.data.$.keyCode ),
-			keyProcessor = CKEDITOR.dialog._.accessKeyProcessors[key];
-
-		if ( !ctrl || !keyProcessor || !keyProcessor.length )
+			keyProcessor = CKEDITOR.dialog._.accessKeyProcessors[( ctrl ? 'CTRL+' : '' ) + ( alt ? 'ALT+' : '') + ( shift ? 'SHIFT+' : '' ) + key];
+
+		if ( !keyProcessor || !keyProcessor.length )
 			return;
 
 		keyProcessor = keyProcessor[keyProcessor.length - 1];
-		keyProcessor.keydown.call( keyProcessor.uiElement, keyProcessor.dialog, keyProcessor.key );
+		keyProcessor.keydown && keyProcessor.keydown.call( keyProcessor.uiElement, keyProcessor.dialog, keyProcessor.key );
 		evt.data.preventDefault();
 	},
@@ -1238,12 +1250,14 @@
 	{
 		var ctrl = evt.data.$.ctrlKey || evt.data.$.metaKey,
+			alt = evt.data.$.altKey,
+			shift = evt.data.$.shiftKey,
 			key = String.fromCharCode( evt.data.$.keyCode ),
-			keyProcessor = CKEDITOR.dialog._.accessKeyProcessors[key];
-
-		if ( !ctrl || !keyProcessor || !keyProcessor.length )
+			keyProcessor = CKEDITOR.dialog._.accessKeyProcessors[( ctrl ? 'CTRL+' : '' ) + ( alt ? 'ALT+' : '') + ( shift ? 'SHIFT+' : '' ) + key];
+
+		if ( !keyProcessor || !keyProcessor.length )
 			return;
 
 		keyProcessor = keyProcessor[keyProcessor.length - 1];
-		keyProcessor.keyup.call( keyProcessor.uiElement, keyProcessor.dialog, keyProcessor.key );
+		keyProcessor.keyup && keyProcessor.keyup.call( keyProcessor.uiElement, keyProcessor.dialog, keyProcessor.key );
 		evt.data.preventDefault();
 	},
@@ -1543,5 +1557,5 @@
 			this.registerEvents( elementDefinition );
 			if ( this.accessKeyUp && this.accessKeyDown && elementDefinition.accessKey )
-				CKEDITOR.dialog._.registerAccessKey( this, dialog, elementDefinition.accessKey );
+				CKEDITOR.dialog._.registerAccessKey( this, dialog, 'CTRL+' + elementDefinition.accessKey );
 		},
 
@@ -1665,4 +1679,18 @@
 
 	/**
+	 * Gets the DOM element that the user inputs values.
+	 * This function is used by setValue(), getValue() and focus(). It should
+	 * be overrided in child classes where the input element isn't the root
+	 * element.
+	 * @returns {CKEDITOR.dom.element} The element where the user input values.
+	 * @example
+	 * var rawValue = textInput.getInputElement().$.value;
+	 */
+	getInputElement : function()
+	{
+		return this.getElement();
+	},
+
+	/**
 	 * Gets the parent dialog object containing this UI element.
 	 * @returns {CKEDITOR.dialog} Parent dialog object.
@@ -1683,5 +1711,5 @@
 	setValue : function( value )
 	{
-		this.getElement().$.value = value;
+		this.getInputElement().$.value = value;
 	},
 
@@ -1694,5 +1722,5 @@
 	getValue : function()
 	{
-		return this.getElement().$.value;
+		return this.getInputElement().$.value;
 	},
 
@@ -1717,5 +1745,5 @@
 	focus : function()
 	{
-		var element = this.getElement(),
+		var element = this.getInputElement(),
 			cursor = element,
 			tabId;
Index: /CKEditor/branches/prototype/_source/plugins/dialogui/plugin.js
===================================================================
--- /CKEditor/branches/prototype/_source/plugins/dialogui/plugin.js	(revision 2674)
+++ /CKEditor/branches/prototype/_source/plugins/dialogui/plugin.js	(revision 2675)
@@ -79,5 +79,6 @@
 					return;
 
-				initPrivateObject.call( this, elementDefinition );
+				var _ = initPrivateObject.call( this, elementDefinition );
+				_.labelId = CKEDITOR.tools.getNextNumber() + '_label';
 				var children = this._.children = [];
 				/** @ignore */
@@ -86,5 +87,5 @@
 					var html = [];
 					if ( elementDefinition.labelLayout != 'horizontal' )
-						html.push( '<div class="cke_dialog_ui_labeled_label">',
+						html.push( '<div class="cke_dialog_ui_labeled_label" id="', _.labelId, '" >',
 							CKEDITOR.tools.htmlEncode( elementDefinition.label ),
 							'</div>' );
@@ -166,4 +167,15 @@
 				if ( elementDefinition.validate )
 					this.validate = elementDefinition.validate;
+
+				// If user presses Enter in a text box, it implies clicking OK for the dialog.
+				var me = this;
+				dialog.on( 'load', function()
+					{
+						me.getInputElement().on( 'keyup', function( evt )
+							{
+								if ( evt.data.$.keyCode == 13 )
+									dialog.getButton( 'ok' ) && dialog.getButton( 'ok' ).click();
+							} );
+					} );
 
 				/** @ignore */
@@ -501,7 +513,27 @@
 		}, true );
 
-	CKEDITOR.ui.dialog.labeledElement.prototype
-		= CKEDITOR.ui.dialog.html.prototype
-		= new CKEDITOR.ui.dialog.uiElement;
+	CKEDITOR.ui.dialog.html.prototype = new CKEDITOR.ui.dialog.uiElement;
+
+	CKEDITOR.ui.dialog.labeledElement.prototype = CKEDITOR.tools.extend( new CKEDITOR.ui.dialog.uiElement,
+			{
+				setLabel : function( label )
+				{
+					var node = CKEDITOR.document.getById( this._.labelId );
+					if ( node.$.getChildCount() < 1 )
+						( new CKEDITOR.dom.text( label, CKEDITOR.document ) ).appendTo( node);
+					else
+						node.getChild( 0 ).$.nodeValue = label;
+					return this;
+				},
+
+				getLabel : function()
+				{
+					var node = CKEDITOR.document.getById( this._.labelId );
+					if ( !node || node.getChildCount() < 1 )
+						return '';
+					else
+						return node.getChild( 0 ).getText();
+				}
+			} );
 
 	CKEDITOR.ui.dialog.button.prototype = CKEDITOR.tools.extend( new CKEDITOR.ui.dialog.uiElement,
@@ -567,5 +599,5 @@
 				 * @returns {CKEDITOR.dom.element} The DOM element of the text input.
 				 */
-				getElement : function()
+				getInputElement : function()
 				{
 					return CKEDITOR.document.getById( this._.inputId );
@@ -582,5 +614,5 @@
 				},
 
-				accessKeyUp : function()
+				accessKeyUp : function( dialog, key )
 				{
 					this.select();
@@ -591,5 +623,5 @@
 			/** @lends CKEDITOR.ui.dialog.select.prototype */
 			{
-				getElement : function()
+				getInputElement : function()
 				{
 					return this._.select.getElement();
@@ -605,5 +637,5 @@
 				 * @returns {CKEDITOR.dom.element} The DOM element of the checkbox.
 				 */
-				getElement : function()
+				getInputElement : function()
 				{
 					return this._.checkbox.getElement();
@@ -685,5 +717,5 @@
 	CKEDITOR.ui.dialog.file.prototype = CKEDITOR.tools.extend( new CKEDITOR.ui.dialog.labeledElement,
 			{
-				getElement : function()
+				getInputElement : function()
 				{
 					return new CKEDITOR.dom.element( CKEDITOR.document.getById( this._.frameId )
Index: /CKEditor/branches/prototype/_source/plugins/link/plugin.js
===================================================================
--- /CKEditor/branches/prototype/_source/plugins/link/plugin.js	(revision 2674)
+++ /CKEditor/branches/prototype/_source/plugins/link/plugin.js	(revision 2675)
@@ -432,5 +432,9 @@
 					]
 				},
-			]
+			],
+			onShow : function()
+			{
+				this.getContentElement( 'info', 'url' ).focus();
+			}
 		};
 	}
