phoneapp/phoneui/src/cphoneappui.cpp
branchRCL_3
changeset 5 2a26698d78ba
parent 3 8871b09be73b
child 6 38529f706030
equal deleted inserted replaced
4:24062c24fe38 5:2a26698d78ba
   600                     {
   600                     {
   601                     Exit();
   601                     Exit();
   602                     return;     
   602                     return;     
   603                     }
   603                     }
   604                            
   604                            
   605                 if ( iQwertyHandler->IsQwertyInput() )
   605                 // Check if key press is simulated by FEP or by touch dialer
       
   606                 TBool fepSimulated = keyEvent->iModifiers & EModifierSpecial;               
       
   607                 TInt modifierMask = ( EModifierNumLock | EModifierKeypad );
       
   608                 TBool dialerSimulated = ( ( keyEvent->iModifiers & modifierMask ) == modifierMask );
       
   609                         
       
   610                 if ( !fepSimulated && !dialerSimulated && iQwertyHandler->IsQwertyInput() )
   606                     {
   611                     {
   607                     TInt code = iQwertyHandler->NumericKeyCode( *keyEvent );
   612                     TInt code = iQwertyHandler->NumericKeyCode( *keyEvent );                    
   608                     TBool fepSimulated = keyEvent->iModifiers & EModifierSpecial; 
   613                     if ( code == EKeyNull && CPhoneKeys::IsNumericKey( *keyEvent, ( TEventCode ) aEvent.Type() ) )
   609                     if ( !fepSimulated && 
   614                         {
   610                          ( ( code != EKeyNull && code != keyEvent->iCode ) ||
   615                         code = keyEvent->iCode;
   611                          ( code == EKeyNull && CPhoneKeys::IsNumericKey( 
   616                         }
   612                                                              *keyEvent, 
   617                     
   613                                                              ( TEventCode ) aEvent.Type() ) ) )
   618                     if ( code != EKeyNull ) 
   614                          ) 
       
   615                         {
   619                         {
   616                         // Modify event according to keyboard layout
   620                         // Modify event according to keyboard layout
   617                         TWsEvent newWsEvent = aEvent;    
   621                         TWsEvent newWsEvent = aEvent;    
   618                         TKeyEvent* newKeyEvent = newWsEvent.Key();
   622                         TKeyEvent* newKeyEvent = newWsEvent.Key();
   619                         newKeyEvent->iCode = code;
   623                         newKeyEvent->iCode = code;
   822     TInt aType,
   826     TInt aType,
   823     const TWsEvent& aEvent )
   827     const TWsEvent& aEvent )
   824     {
   828     {
   825     __LOGMETHODSTARTEND( EPhonePhoneapp, "CPhoneAppUI::HandleApplicationSpecificEventL" );
   829     __LOGMETHODSTARTEND( EPhonePhoneapp, "CPhoneAppUI::HandleApplicationSpecificEventL" );
   826     
   830     
   827     if( aType == EEikKeyLockEnabled )
       
   828         {
       
   829         iPhoneUIController->HandleKeyLockEnabled( ETrue );
       
   830         }
       
   831     else if( aType == EEikKeyLockDisabled )
       
   832         {
       
   833         iPhoneUIController->HandleKeyLockEnabled( EFalse );
       
   834         }
       
   835     
       
   836     CAknAppUi::HandleApplicationSpecificEventL( aType, aEvent );
   831     CAknAppUi::HandleApplicationSpecificEventL( aType, aEvent );
   837     }
   832     }
   838 
   833 
   839 // -----------------------------------------------------------------------------
   834 // -----------------------------------------------------------------------------
   840 // CPhoneAppUI::HandleResourceChangeL
   835 // CPhoneAppUI::HandleResourceChangeL