webengine/osswebengine/WebKit/s60/webcoresupport/WebEditorClient.cpp
branchRCL_3
changeset 35 1f3c3f2f5b0a
parent 27 6297cdf66332
child 36 c711bdda59f4
--- a/webengine/osswebengine/WebKit/s60/webcoresupport/WebEditorClient.cpp	Fri Mar 12 15:48:51 2010 +0200
+++ b/webengine/osswebengine/WebKit/s60/webcoresupport/WebEditorClient.cpp	Mon Mar 15 12:44:50 2010 +0200
@@ -413,7 +413,14 @@
                 break;
 
             case EKeyUpArrow:
-                frame->editor()->execCommand("MoveUp");
+                if (select) { //If shift is pressed then highlight the selection
+                    if(kevent->isKeyDown())
+                        break;
+                    frame->editor()->execCommand("MoveUpAndModifySelection");//from createCommandMap()
+                }
+                else {
+                    frame->editor()->execCommand("MoveUp");
+                }
                 m_webView->fepTextEditor()->HandleUpdateCursor();
                 if (frame->selectionController()->start() != startPos &&
                     frame->selectionController()->end() != endPos) {
@@ -425,7 +432,14 @@
                 break;
 
             case EKeyDownArrow:
-                frame->editor()->execCommand("MoveDown");
+                if (select) {//If shift is pressed then highlight the selection
+                    if(kevent->isKeyDown())
+                        break;
+                    frame->editor()->execCommand("MoveDownAndModifySelection");//from createCommandMap()
+                }
+                else {
+                    frame->editor()->execCommand("MoveDown");
+                }
                 m_webView->fepTextEditor()->HandleUpdateCursor();
                 if (frame->selectionController()->start() != startPos &&
                     frame->selectionController()->end() != endPos) {