36 #include <Languages.hrh> |
36 #include <Languages.hrh> |
37 #endif |
37 #endif |
38 #include <AknUtils.h> |
38 #include <AknUtils.h> |
39 #include <e32property.h> |
39 #include <e32property.h> |
40 #include <AknFepInternalCRKeys.h> |
40 #include <AknFepInternalCRKeys.h> |
|
41 #include <AknFepInternalPSKeys.h> |
41 #include <AvkonInternalCRKeys.h> |
42 #include <AvkonInternalCRKeys.h> |
42 |
43 |
43 const TInt KDefaultLanguageGran = 5; |
44 const TInt KDefaultLanguageGran = 5; |
44 const TInt KDefaultLangNamesGran = 40; |
45 const TInt KDefaultLangNamesGran = 40; |
45 const TInt KPhraseSeparator = 0x0020; |
46 const TInt KPhraseSeparator = 0x0020; |
1034 |
1035 |
1035 case EPtiEngineStrokeQwerty: |
1036 case EPtiEngineStrokeQwerty: |
1036 case EPtiEngineStrokePhraseHalfQwerty: |
1037 case EPtiEngineStrokePhraseHalfQwerty: |
1037 case EPtiEngineStrokePhraseQwerty: |
1038 case EPtiEngineStrokePhraseQwerty: |
1038 { |
1039 { |
1039 TPtiKeyboardType keyboardType = EPtiKeyboardNone; |
1040 TPtiKeyboardType keyboardType = ActiveKeyboardType(); |
1040 TBool IsStokeKey = EFalse; |
1041 TBool IsStokeKey = EFalse; |
1041 TRAP_IGNORE(keyboardType = ActiveKeyboardTypeL()); |
|
1042 if(EPtiKeyboardQwerty4x10 == keyboardType || |
1042 if(EPtiKeyboardQwerty4x10 == keyboardType || |
1043 EPtiKeyboardQwerty3x11 == keyboardType ) |
1043 EPtiKeyboardQwerty3x11 == keyboardType ) |
1044 { |
1044 { |
1045 TBuf<KMaxName> lowerdata; |
1045 TBuf<KMaxName> lowerdata; |
1046 TInt StrokeUnicodePosition =0; |
1046 TInt StrokeUnicodePosition =0; |
3257 TPtiNumericKeyBinding bind; |
3257 TPtiNumericKeyBinding bind; |
3258 |
3258 |
3259 TPtiKeyboardType keyboardType = aKeyboardType; |
3259 TPtiKeyboardType keyboardType = aKeyboardType; |
3260 if (keyboardType == EPtiKeyboardNone) |
3260 if (keyboardType == EPtiKeyboardNone) |
3261 { |
3261 { |
3262 keyboardType = ActiveKeyboardTypeL(); |
3262 keyboardType = ActiveKeyboardType(); |
3263 |
3263 |
3264 if (keyboardType == EPtiKeyboard12Key || |
3264 if (keyboardType == EPtiKeyboard12Key || |
3265 keyboardType == EPtiKeyboardNone) |
3265 keyboardType == EPtiKeyboardNone) |
3266 { |
3266 { |
3267 keyboardType = FindFirstAvailableQwertyKeyboardType(aLanguage); |
3267 keyboardType = FindFirstAvailableQwertyKeyboardType(aLanguage); |
3722 { |
3722 { |
3723 return maps->KeyboardType(); |
3723 return maps->KeyboardType(); |
3724 } |
3724 } |
3725 |
3725 |
3726 return EPtiKeyboardNone;*/ |
3726 return EPtiKeyboardNone;*/ |
3727 TInt keyboardLayout = 0; |
3727 TInt keyboardLayout = ActiveKeyboardType(); |
3728 |
|
3729 RProperty::Get(KCRUidAvkon, KAknKeyBoardLayout, keyboardLayout); |
|
3730 |
3728 |
3731 if (keyboardLayout <= 0 || |
3729 if (keyboardLayout <= 0 || |
3732 keyboardLayout > EPtiKeyboardMaxLayout - 1) |
3730 keyboardLayout > EPtiKeyboardMaxLayout - 1) |
3733 { |
3731 { |
3734 return EPtiKeyboardNone; |
3732 return EPtiKeyboardNone; |
3880 } |
3878 } |
3881 } |
3879 } |
3882 |
3880 |
3883 |
3881 |
3884 // --------------------------------------------------------------------------- |
3882 // --------------------------------------------------------------------------- |
3885 // CPtiEngineImpl::ActiveKeyboardTypeL |
3883 // CPtiEngineImpl::ActiveKeyboardType |
3886 // |
3884 // |
3887 // --------------------------------------------------------------------------- |
3885 // --------------------------------------------------------------------------- |
3888 // |
3886 // |
3889 TPtiKeyboardType CPtiEngineImpl::ActiveKeyboardTypeL() |
3887 TPtiKeyboardType CPtiEngineImpl::ActiveKeyboardType() const |
3890 { |
3888 { |
3891 // Qwerty Keyboard layout |
3889 TInt keyboardType = EPtiKeyboardNone; |
3892 TInt keyboardLayout = 0; |
3890 #ifdef RD_SCALABLE_UI_V2 |
3893 |
3891 // Get physical keyboard type |
3894 RProperty::Get(KCRUidAvkon, KAknKeyBoardLayout, keyboardLayout); |
3892 RProperty::Get(KCRUidAvkon, KAknKeyBoardLayout, keyboardType ); |
3895 |
3893 |
3896 if (keyboardLayout <= 0 || |
3894 // When active keyboard is virtual keyboard, |
3897 keyboardLayout > EPtiKeyboardMaxLayout - 1) |
3895 // need to get the active virtual keyboard type |
3898 { |
3896 // and set keyboardType again. |
3899 return EPtiKeyboardNone; |
3897 |
3900 } |
3898 // When the default physical keyboard is 0, |
3901 |
3899 // it means that there is no physical keyboard, |
3902 return (TPtiKeyboardType)keyboardLayout; |
3900 // also need to get the active virtual keyboard type. |
|
3901 TInt isVirtualInputActive = 0; |
|
3902 RProperty::Get( KPSUidAknFep, KAknFepTouchInputActive, |
|
3903 isVirtualInputActive ); |
|
3904 if ( isVirtualInputActive > 0 || keyboardType == 0 ) |
|
3905 { |
|
3906 // Active keyboard is virtual keyboard |
|
3907 RProperty::Get( KPSUidAknFep, KAknFepVirtualKeyboardType, |
|
3908 keyboardType ); |
|
3909 } |
|
3910 #else if |
|
3911 // Get physical keyboard type |
|
3912 RProperty::Get(KCRUidAvkon, KAknKeyBoardLayout, keyboardType ); |
|
3913 #endif |
|
3914 |
|
3915 if ( keyboardType <= 0 || keyboardType >= EPtiKeyboardMaxLayout ) |
|
3916 { |
|
3917 keyboardType = EPtiKeyboardNone; |
|
3918 } |
|
3919 return (TPtiKeyboardType)keyboardType; |
3903 } |
3920 } |
3904 |
|
3905 |
3921 |
3906 // --------------------------------------------------------------------------- |
3922 // --------------------------------------------------------------------------- |
3907 // CPtiEngineImpl::GetNumericModeKeysForQwertyL |
3923 // CPtiEngineImpl::GetNumericModeKeysForQwertyL |
3908 // |
3924 // |
3909 // --------------------------------------------------------------------------- |
3925 // --------------------------------------------------------------------------- |