camerauis/cameraapp/generic/src/CamInfoListBoxContainer.cpp
branchRCL_3
changeset 18 51dda465e618
parent 16 d486e5e3cc9a
child 25 bf64cebf4673
equal deleted inserted replaced
16:d486e5e3cc9a 18:51dda465e618
   392 //
   392 //
   393 TKeyResponse CCamInfoListBoxContainer::OfferKeyEventL( 
   393 TKeyResponse CCamInfoListBoxContainer::OfferKeyEventL( 
   394     const TKeyEvent& aKeyEvent,
   394     const TKeyEvent& aKeyEvent,
   395     TEventCode aType )
   395     TEventCode aType )
   396     {
   396     {
       
   397     if( iController.CurrentMode() == ECamControllerIdle || 
       
   398         iController.CurrentMode() == ECamControllerShutdown )
       
   399         {
       
   400         if( !iController.IsViewFinding() && !iSkinnedBackGround
       
   401             && ( IsCaptureKeyL( aKeyEvent, aType ) 
       
   402             || IsShutterKeyL( aKeyEvent, aType ) ) )
       
   403             {
       
   404             PRINT( _L("Camera <> CCamInfoListBoxContainer::OfferKeyEventL coming back from standby" ))
       
   405             ReserveAndStartVF();
       
   406             }
       
   407         return EKeyWasNotConsumed;
       
   408         }
   397     iController.StartIdleTimer();
   409     iController.StartIdleTimer();
   398 
   410     
   399     // If the Ok button is pressed, select the current item
   411     // If the Ok button or shutter key is pressed, select the current item
   400     if ( aKeyEvent.iCode == EKeyOK && aKeyEvent.iRepeats == 0 && aType == EEventKey )
   412     if ( ( aKeyEvent.iCode == EKeyOK && aKeyEvent.iRepeats == 0 && aType == EEventKey ) ||
       
   413          ( aType == EEventKeyDown && 
       
   414          ( IsCaptureKeyL( aKeyEvent, aType ) || IsShutterKeyL( aKeyEvent, aType ) ) ) )
   401         {
   415         {
   402         TKeyResponse response = iListBox->OfferKeyEventL( aKeyEvent, aType );
   416         TKeyResponse response = iListBox->OfferKeyEventL( aKeyEvent, aType );
   403         iView.HandleCommandL( EAknSoftkeySelect );
   417         iView.HandleCommandL( EAknSoftkeySelect );
   404         return response;
   418         return response;
   405         }
   419         }