Index: /FCKeditor/trunk/editor/_source/classes/fckenterkey.js
===================================================================
--- /FCKeditor/trunk/editor/_source/classes/fckenterkey.js	(revision 437)
+++ /FCKeditor/trunk/editor/_source/classes/fckenterkey.js	(revision 438)
@@ -35,13 +35,4 @@
 	this.EnterMode		= enterMode || 'p' ;
 	this.ShiftEnterMode	= shiftEnterMode || 'br' ;
-	this.TabText = "\xa0\xa0" ;	// the default text for each tab is two non-breaking spaces
-
-	if ( tabSpaces > 0 )
-	{
-		var a = [] ;
-		for ( var i = 0 ; i < tabSpaces ; i++ )
-			a.push( "\xa0" ) ;
-		this.TabText = a.join( "" ) ;
-	}
 
 	// Setup the Keystroke Handler.
@@ -54,7 +45,16 @@
 		[ SHIFT + 13, 'ShiftEnter' ],
 		[ 8			, 'Backspace' ],
-		[ 46		, 'Delete' ],
-		[ 9, "Tab" ]
+		[ 46		, 'Delete' ]
 	] ) ;
+
+	if ( tabSpaces > 0 )
+	{
+		this.TabText = '' ;
+		
+		while ( tabSpaces-- > 0 )
+			this.TabText += '\xa0' ;
+
+		oKeystrokeHandler.SetKeystrokes( [ 9, 'Tab' ] ) ;
+	}
 
 	oKeystrokeHandler.AttachToElement( targetWindow.document ) ;
Index: /FCKeditor/trunk/editor/_source/internals/fck.js
===================================================================
--- /FCKeditor/trunk/editor/_source/internals/fck.js	(revision 437)
+++ /FCKeditor/trunk/editor/_source/internals/fck.js	(revision 438)
@@ -78,5 +78,9 @@
 		oKeystrokeHandler.OnKeystroke = _FCK_KeystrokeHandler_OnKeystroke ;
 
+		// Set the config keystrokes.
 		oKeystrokeHandler.SetKeystrokes( FCKConfig.Keystrokes ) ;
+
+		// Set the <Tab> key handling.
+		oKeystrokeHandler.SetKeystrokes( [ 9, 'Tab' ] ) ;
 
 		// In IE7, if the editor tries to access the clipboard by code, a dialog is
@@ -761,13 +765,17 @@
 	if ( FCK.EditMode == FCK_EDITMODE_WYSIWYG )
 	{
-		if ( keystrokeValue == 'Paste' )
-			return !FCK.Events.FireEvent( 'OnPaste' ) ;
-		else if ( keystrokeValue == 'Cut' )
-		{
-			FCKUndo.SaveUndoStep() ;
-			return false ;
-		}
-		else if ( keystrokeValue == 'CustomTab' )
-			return false ;		// ignore it here, it's handled in fckenterkey.js
+		switch ( keystrokeValue )
+		{
+			case 'Paste' :
+				return !FCK.Events.FireEvent( 'OnPaste' ) ;
+
+			case 'Cut' :
+				FCKUndo.SaveUndoStep() ;
+				return false ;
+
+			case 'Tab' :
+				// Ignore it here, it's handled in fckenterkey.js.
+				return ( FCKConfig.TabSpaces == 0 ) ;
+		}
 	}
 	else
@@ -776,7 +784,8 @@
 		if ( keystrokeValue.Equals( 'Paste', 'Undo', 'Redo', 'SelectAll' ) )
 			return false ;
+
 		// Pressing <Tab> in source mode should produce a tab space in the text area, not
 		// changing the focus to something else.
-		if ( keystrokeValue == 'CustomTab' )
+		if ( keystrokeValue == 'Tab' )
 		{
 			if ( FCKBrowserInfo.IsIE )
@@ -785,5 +794,5 @@
 				if ( range.parentElement() != FCK.EditingArea.Textarea ) 
 					return false ;
-				range.text = "\t" ;
+				range.text = '\t' ;
 				range.select() ;
 			}
@@ -795,7 +804,7 @@
 				var selEnd = el.selectionEnd ;
 				a.push( el.value.substr(0, selStart ) ) ;
-				a.push( "\t" ) ;
+				a.push( '\t' ) ;
 				a.push( el.value.substr( selEnd ) ) ;
-				el.value = a.join( "" ) ;
+				el.value = a.join( '' ) ;
 				el.setSelectionRange( selStart + 1, selStart + 1 ) ;
 			}
Index: /FCKeditor/trunk/fckconfig.js
===================================================================
--- /FCKeditor/trunk/fckconfig.js	(revision 437)
+++ /FCKeditor/trunk/fckconfig.js	(revision 438)
@@ -136,6 +136,5 @@
 	[ CTRL + SHIFT + 83 /*S*/, 'Save' ],
 	[ CTRL + ALT + 13 /*ENTER*/, 'FitWindow' ],
-	[ CTRL + 9 /*TAB*/, 'Source' ],
-	[ 9 /*TAB*/, 'CustomTab' ]
+	[ CTRL + 9 /*TAB*/, 'Source' ]
 ] ;
 
