Index: /CKEditor/trunk/CHANGES.html
===================================================================
--- /CKEditor/trunk/CHANGES.html	(revision 5234)
+++ /CKEditor/trunk/CHANGES.html	(revision 5235)
@@ -63,4 +63,5 @@
 		<li><a href="http://dev.fckeditor.net/ticket/4553">#4553</a> : Dirty check result incorrect when editor document is empty.</li>
 		<li><a href="http://dev.fckeditor.net/ticket/4555">#4555</a> : Non-released memory when editor is created and destroyed.</li>
+		<li><a href="http://dev.fckeditor.net/ticket/5118">#5118</a> : Arrow keys navigation in RTL languages is incorrect.</li>
 	</ul>
 	<h3>
Index: /CKEditor/trunk/_source/plugins/smiley/dialogs/smiley.js
===================================================================
--- /CKEditor/trunk/_source/plugins/smiley/dialogs/smiley.js	(revision 5234)
+++ /CKEditor/trunk/_source/plugins/smiley/dialogs/smiley.js	(revision 5235)
@@ -1,3 +1,3 @@
-﻿/*
+/*
 Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
 For licensing, see LICENSE.html or http://ckeditor.com/license
@@ -56,4 +56,5 @@
 
 		var keystroke = ev.getKeystroke();
+		var rtl = editor.lang.dir == 'rtl';
 		switch ( keystroke )
 		{
@@ -87,5 +88,5 @@
 
 			// RIGHT-ARROW
-			case 39 :
+			case rtl ? 37 : 39 :
 			// TAB
 			case 9 :
@@ -108,5 +109,5 @@
 
 			// LEFT-ARROW
-			case 37 :
+			case rtl ? 39 : 37 :
 			// SHIFT + TAB
 			case CKEDITOR.SHIFT + 9 :
Index: /CKEditor/trunk/_source/plugins/specialchar/dialogs/specialchar.js
===================================================================
--- /CKEditor/trunk/_source/plugins/specialchar/dialogs/specialchar.js	(revision 5234)
+++ /CKEditor/trunk/_source/plugins/specialchar/dialogs/specialchar.js	(revision 5235)
@@ -1,3 +1,3 @@
-﻿/*
+/*
 Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
 For licensing, see LICENSE.html or http://ckeditor.com/license
@@ -82,4 +82,5 @@
 		var relative, nodeToMove;
 		var keystroke = ev.getKeystroke();
+		var rtl = editor.lang.dir == 'rtl';
 
 		switch ( keystroke )
@@ -120,5 +121,5 @@
 
 			// RIGHT-ARROW
-			case 39 :
+			case rtl ? 37 : 39 :
 			// TAB
 			case 9 :
@@ -154,5 +155,5 @@
 
 			// LEFT-ARROW
-			case 37 :
+			case rtl ? 39 : 37 :
 			// SHIFT + TAB
 			case CKEDITOR.SHIFT + 9 :
Index: /CKEditor/trunk/_source/plugins/toolbar/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/toolbar/plugin.js	(revision 5234)
+++ /CKEditor/trunk/_source/plugins/toolbar/plugin.js	(revision 5235)
@@ -1,3 +1,3 @@
-﻿/*
+/*
 Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
 For licensing, see LICENSE.html or http://ckeditor.com/license
@@ -61,12 +61,13 @@
 			{
 				var next, nextToolGroup, groupItemsCount;
+				var rtl = editor.lang.dir == 'rtl';
 
 				switch ( keystroke )
 				{
-					case 39 :					// RIGHT-ARROW
+					case rtl ? 37 : 39 :					// RIGHT-ARROW
 					case 9 :					// TAB
 						do
 						{
-							// Look for the previous item in the toolbar.
+							// Look for the next item in the toolbar.
 							next = item.next;
 
@@ -100,5 +101,5 @@
 						return false;
 
-					case 37 :					// LEFT-ARROW
+					case rtl ? 39 : 37 :					// LEFT-ARROW
 					case CKEDITOR.SHIFT + 9 :	// SHIFT + TAB
 						do
