mpxmusicplayer/commonui/src/mpxfilenamequerydlg.cpp
branchRCL_3
changeset 50 26a1709b9fec
parent 21 a1247965635c
--- a/mpxmusicplayer/commonui/src/mpxfilenamequerydlg.cpp	Thu Jul 15 18:35:42 2010 +0300
+++ b/mpxmusicplayer/commonui/src/mpxfilenamequerydlg.cpp	Thu Aug 19 09:52:08 2010 +0300
@@ -236,7 +236,24 @@
     { 
     TKeyResponse response = EKeyWasNotConsumed;
     // consume 'enter' so it won't acknowledge the dialog
-    if ( aType == EEventKey && aKeyEvent.iCode == EKeyEnter ) 
+
+    TBool vkbOpen = EFalse;
+    CAknQueryControl* queryControl = QueryControl();
+    if ( queryControl )
+        {
+        CEikEdwin* edwin = static_cast< CEikEdwin* >(
+            queryControl->ControlByLayoutOrNull( EDataLayout ) );
+        if ( edwin )
+            {            
+            if ( edwin->AknEdwinFlags() & EAknEditorFlagTouchInputModeOpened )
+                {
+                // virtual keyboard is active.                
+                vkbOpen = ETrue;
+                }
+            }
+        }    
+    
+    if ( vkbOpen && aType == EEventKey && aKeyEvent.iCode == EKeyEnter ) 
         { 
         response = EKeyWasConsumed;
         }