|
1 /* |
|
2 * Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0"" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * Provides the TAknFepInputStateInitialArabicHebrewMultitap methods. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 #include "AknFepUiInputStateInitialArabicHebrewMultitap.h" |
|
31 #include "AknFepUIManagerStateInterface.h" //MAknFepUIManagerStateInterface |
|
32 |
|
33 #include "AknFepCaseManager.h" |
|
34 #include <uikon.hrh> |
|
35 |
|
36 #include <PtiEngine.h> |
|
37 |
|
38 TAknFepInputStateInitialArabicHebrewMultitap:: |
|
39 TAknFepInputStateInitialArabicHebrewMultitap(MAknFepUIManagerStateInterface* aOwner) |
|
40 :TAknFepInputStateInitialLatinMultitap(aOwner) |
|
41 { |
|
42 CPtiEngine* ptiengine = iOwner->PtiEngine(); |
|
43 |
|
44 // This can be removed now because the PTI engine is in use? |
|
45 TPtiTextCase caseMode = ptiengine->Case(); |
|
46 |
|
47 ptiengine->ClearCurrentWord(); |
|
48 ptiengine->SetInputMode(EPtiEngineMultitapping); |
|
49 |
|
50 ptiengine->SetCase(caseMode); |
|
51 } |
|
52 |
|
53 TBool TAknFepInputStateInitialArabicHebrewMultitap::HandleKeyL(TInt aKey, TKeyPressLength aLength) |
|
54 { |
|
55 MAknFepManagerUIInterface* fepMan = iOwner->FepMan(); |
|
56 CPtiEngine* ptiengine = iOwner->PtiEngine(); |
|
57 TBool ret = ETrue; |
|
58 |
|
59 if(iData && (iData != aKey)) |
|
60 { |
|
61 fepMan->CommitInlineEditL(); |
|
62 ptiengine->ClearCurrentWord(); |
|
63 CAknFepCaseManager* caseMan = iOwner->CaseMan(); |
|
64 caseMan->UpdateCase(ENullNaviEvent); |
|
65 } |
|
66 |
|
67 iData = aKey; |
|
68 if(aLength == EShortKeyPress) |
|
69 { |
|
70 if (aKey == EPtiKeyStar) |
|
71 { |
|
72 if (!fepMan->EditSubmenuInUse() && fepMan->IsAbleToLaunchSCT()) |
|
73 { |
|
74 fepMan->LaunchSpecialCharacterTableL(); |
|
75 } |
|
76 } |
|
77 else |
|
78 { |
|
79 TPtrC text = ptiengine->AppendKeyPress((TPtiKey)aKey); |
|
80 if (text.Length()) |
|
81 { |
|
82 fepMan->NewCharacterL(text); |
|
83 } |
|
84 } |
|
85 } |
|
86 else // long keypress |
|
87 { |
|
88 if (aKey == EPtiKeyStar && fepMan->EditSubmenuInUse()) |
|
89 { |
|
90 fepMan->LaunchSpecialCharacterTableL(); |
|
91 } |
|
92 else |
|
93 { |
|
94 TChar ch(aKey); |
|
95 |
|
96 TBuf<1> buf; |
|
97 buf.Append(ch); |
|
98 fepMan->NewCharacterL(buf); |
|
99 fepMan->CommitInlineEditL(); |
|
100 ptiengine->ClearCurrentWord(); |
|
101 } |
|
102 } |
|
103 |
|
104 return ret; |
|
105 } |
|
106 |
|
107 |
|
108 // End of file |