20 #include <barsread.h> |
20 #include <barsread.h> |
21 #include <apgwgnam.h> |
21 #include <apgwgnam.h> |
22 #include <e32property.h> |
22 #include <e32property.h> |
23 #include <UikonInternalPSKeys.h> // KUikLayoutState, KUikFlipStatus |
23 #include <UikonInternalPSKeys.h> // KUikLayoutState, KUikFlipStatus |
24 #include <AvkonInternalCRKeys.h> // KAknQwertyInputModeActive |
24 #include <AvkonInternalCRKeys.h> // KAknQwertyInputModeActive |
25 #include <EIKPRIV.rsg> |
25 #include <eikpriv.rsg> |
26 #include <AknDef.h> |
26 #include <AknDef.h> |
27 #include <AknSgcc.h> |
27 #include <AknSgcc.h> |
28 #include <aknenv.h> |
28 #include <aknenv.h> |
|
29 #include <AknFepInternalPSKeys.h> |
|
30 #include <AknFepGlobalEnums.h> |
29 #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS |
31 #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS |
30 #include <uikon/eikenvinterface.h> |
32 #include <uikon/eikenvinterface.h> |
31 #endif |
33 #endif |
32 |
34 |
33 |
35 |
164 iAvkonRepository = CRepository::NewL(KCRUidAvkon); |
166 iAvkonRepository = CRepository::NewL(KCRUidAvkon); |
165 TInt keyboardLayout = HwKeyToKeyBoardType(hwKeyCode); |
167 TInt keyboardLayout = HwKeyToKeyBoardType(hwKeyCode); |
166 |
168 |
167 // Set default value for the KAknKeyBoardLayout Pub&Sub key. |
169 // Set default value for the KAknKeyBoardLayout Pub&Sub key. |
168 RProperty::Set(KCRUidAvkon, KAknKeyBoardLayout, keyboardLayout); |
170 RProperty::Set(KCRUidAvkon, KAknKeyBoardLayout, keyboardLayout); |
|
171 |
|
172 #ifdef RD_SCALABLE_UI_V2 |
|
173 // Define KAknFepVirtualKeyboardType Pub&sub key. |
|
174 RProperty::Define( KPSUidAknFep, KAknFepVirtualKeyboardType, RProperty::EInt ); |
|
175 // Set default value for KAknFepVirtualKeyboardType Pub&sub key. |
|
176 RProperty::Set( KPSUidAknFep, KAknFepVirtualKeyboardType, EPtiKeyboard12Key ); |
|
177 |
|
178 // Define KAknFepTouchInputActive Pub&sub key |
|
179 RProperty::Define( KPSUidAknFep, KAknFepTouchInputActive, RProperty::EInt ); |
|
180 // Set default value for KAknFepTouchInputActive Pub&sub key. |
|
181 RProperty::Set( KPSUidAknFep, KAknFepTouchInputActive, 0 ); |
|
182 #endif // RD_SCALABLE_UI_V2 |
169 #else |
183 #else |
170 |
184 |
171 RProperty::Define( KCRUidAvkon, KAknKeyBoardLayout, RProperty::EInt ); |
185 RProperty::Define( KCRUidAvkon, KAknKeyBoardLayout, RProperty::EInt ); |
172 iAvkonRepository = CRepository::NewL(KCRUidAvkon); |
186 iAvkonRepository = CRepository::NewL(KCRUidAvkon); |
173 TInt keyboardLayout = EPtiKeyboard12Key; |
187 TInt keyboardLayout = EPtiKeyboard12Key; |
174 iAvkonRepository->Get(KAknKeyBoardLayout, keyboardLayout); |
188 iAvkonRepository->Get(KAknKeyBoardLayout, keyboardLayout); |
175 RProperty::Set(KCRUidAvkon, KAknKeyBoardLayout, keyboardLayout); |
189 RProperty::Set(KCRUidAvkon, KAknKeyBoardLayout, keyboardLayout); |
176 |
190 |
|
191 #ifdef RD_SCALABLE_UI_V2 |
|
192 // Define KAknFepVirtualKeyboardType Pub&sub key. |
|
193 RProperty::Define( KPSUidAknFep, KAknFepVirtualKeyboardType, RProperty::EInt ); |
|
194 // Set default value for KAknFepVirtualKeyboardType Pub&sub key. |
|
195 RProperty::Set( KPSUidAknFep, KAknFepVirtualKeyboardType, EPtiKeyboard12Key ); |
|
196 |
|
197 // Define KAknFepTouchInputActive Pub&sub key |
|
198 RProperty::Define( KPSUidAknFep, KAknFepTouchInputActive, RProperty::EInt ); |
|
199 // Set default value for KAknFepTouchInputActive Pub&sub key. |
|
200 RProperty::Set( KPSUidAknFep, KAknFepTouchInputActive, 0 ); |
|
201 |
|
202 #endif // RD_SCALABLE_UI_V2 |
177 #endif // !__WINS__ |
203 #endif // !__WINS__ |
178 TBool isQwertyOn = EFalse; |
204 TBool isQwertyOn = EFalse; |
179 switch(keyboardLayout) |
205 switch(keyboardLayout) |
180 { |
206 { |
181 case EPtiKeyboardQwerty4x12: |
207 case EPtiKeyboardQwerty4x12: |
406 iHomeTimer->Cancel(); |
432 iHomeTimer->Cancel(); |
407 delete iHomeTimer; |
433 delete iHomeTimer; |
408 iHomeTimer = NULL; |
434 iHomeTimer = NULL; |
409 if ( !iAppUi->HandleShortAppsKeyPressL() ) |
435 if ( !iAppUi->HandleShortAppsKeyPressL() ) |
410 { |
436 { |
|
437 RWsSession& ws = iEikonEnv->WsSession(); |
|
438 TApaTaskList apList( ws ); |
|
439 TApaTask task = apList.FindApp( iHomeViewId.iAppUid ); |
|
440 if( task.Exists() && task.WgId() == ws.GetFocusWindowGroup() ) |
|
441 { |
|
442 GfxTransEffect::BeginFullScreen( |
|
443 AknTransEffect::EApplicationExit, |
|
444 TRect(), |
|
445 AknTransEffect::EParameterType, |
|
446 AknTransEffect::GfxTransParam( iHomeViewId.iAppUid ) ); |
|
447 } |
411 ToggleShellL(); |
448 ToggleShellL(); |
412 } |
449 } |
413 |
450 |
414 return EKeyWasConsumed; |
451 return EKeyWasConsumed; |
415 } |
452 } |