PtiKeyMappings.h

Go to the documentation of this file.
00001 /*
00002 * ============================================================================
00003 *  Name       : PtiKeyMappings.h
00004 *  Part of    : PtiEngine
00005 *  Description: PtiLanguage class definitions.
00006 *  Version:
00007 *
00008 *  Copyright © 2003-2006 Nokia Corporation.
00009 *  This material, including documentation and any related 
00010 *  computer programs, is protected by copyright controlled by 
00011 *  Nokia Corporation. All rights are reserved. Copying, 
00012 *  including reproducing, storing,  adapting or translating, any 
00013 *  or all of this material requires the prior written consent of 
00014 *  Nokia Corporation. This material also contains confidential 
00015 *  information which may not be disclosed to others without the 
00016 *  prior written consent of Nokia Corporation.
00017 * ============================================================================
00018 */
00019 #ifndef _PTI_KEY_MAPPINGS_H
00020 #define _PTI_KEY_MAPPINGS_H
00021 
00022 #include <e32base.h>
00023 #include "PtiDefs.h"
00024 
00025 
00026 const TInt KPtiKeyDataDeadKeySeparator = 0xffff;
00027 const TInt KPtiPinyinMarker = 0x2460;
00028 const TInt KPtiStrokeMarker = 0x2461;
00029 const TInt KPtiZhuyinMarker = 0x2462;
00030 const TInt KPtiCangjieMarker = 0x2463;
00031 const TInt KPtiGetAllMarker = 0x2464;
00032 
00033 // FORWARD DECLARATIONS
00034 class CPtiKeyMapData;
00035 
00036 // 
00037 // CPtiQwertyKeymappingsExtension
00038 //
00039 
00040 NONSHARABLE_CLASS(CPtiQwertyKeymappingsExtension) : public CBase
00041         {
00042         public:
00043                 static CPtiQwertyKeymappingsExtension* NewL();
00044                 ~CPtiQwertyKeymappingsExtension();              
00045         
00046         private:
00047                 CPtiQwertyKeymappingsExtension();
00048         
00049         public:
00050                 TUint16 iLastChar;             // for Vietnamese                        
00051                 TInt16 iLastTone;          // for Vietnamese
00052                 TUint16 iReplaced;             // for Vietnamese
00053                 TPtiTextCase iVowelCase;   // for Vietnamese
00054                 TPtiKey iLastToneKey;      // for Vietnamese                    
00055         };
00056 
00057 
00058 //
00059 // TPtiKeyMapping
00060 //
00061 
00062 class TPtiKeyMapping  
00063         {
00064         public: 
00065                 TInt iIndex;
00066                 TInt iNumChars;
00067         };
00068         
00069 
00070 //
00071 // TPtiReplacedMapping
00072 //
00073         
00074 const TInt KMaxReplacedMappingCharacters = 5;           
00075 class TPtiReplacedMapping
00076         {
00077         public:
00078                 TPtiKey iKey;
00079                 TPtiTextCase iCase;     
00080                 TPtiEngineInputMode iMode;
00081                 TPtiKeyboardType iKeyboardType;
00082                 TInt iNumChars;
00083                 TUint16 iChrs[KMaxReplacedMappingCharacters];
00084         };      
00085 
00086 
00092 class MPtiKeyMappings
00093         {
00094         public:
00095                 virtual ~MPtiKeyMappings() {}
00096                 
00109                 virtual TUint16 StartMapping(TPtiKey aKey,
00110                                                  TPtiTextCase aCase,
00111                                                                          TPtiEngineInputMode aMode = EPtiEngineInputModeNone) = 0;
00112                                                          
00127                 virtual TUint16 NextKey(TPtiKey aKey, TBool &aAppend, TPtiTextCase aCase) = 0;
00128                 
00135                 virtual TPtiKey CurrentKey() = 0;
00136                 
00146                 virtual TInt ReplaceKeyMapL(TPtiKey aKey, TDesC& aMap, TPtiTextCase aCase) = 0;
00147                 
00155                 virtual TPtiKey KeyForCharacter(TUint16 aChar) = 0;
00156                 
00165                 virtual TPtrC GetAll(TPtiTextCase aCase) = 0;                                   
00166         };
00167 
00168 
00175 class CPtiMappings : public CBase
00176         {
00177         public:
00178                 CPtiMappings();
00179                 CPtiMappings(CPtiKeyMapData* aData);
00180                 ~CPtiMappings();
00181                 inline CPtiKeyMapData* KeyMapData() const;
00182                 
00183                 // DEPRECATED
00184                 virtual TInt WriteData(TInt16*);   
00185                 // DEPRECATED                
00186                 virtual TInt ChunkDataSize() const;
00187                 
00188                 IMPORT_C TPtiKeyboardType KeyboardType() const;                         
00189                 
00190         protected:      
00191                 TInt FindReplacedMapping(TPtiKey aKey, TPtiTextCase aCase, TPtiEngineInputMode aMode) const;
00192                 void ReplaceKeyMapLocalL(TPtiKey aKey, TDesC& aMap, TPtiTextCase aCase, TPtiEngineInputMode aMode);
00193                 
00194     public:             
00195                 TPtrC DataForKeyLocal(TPtiKey aKey, TPtiTextCase aCase, TPtiEngineInputMode aMode) const;       
00196                                                 
00197         protected:
00198                 TPtiKey iCurrentKey;    
00199                 TPtiEngineInputMode iCurrentMode;
00200                 TInt iCurrentChar;
00201                 RArray<TPtiReplacedMapping> iReplacedMappings;
00202                 CPtiKeyMapData* iKeyMapData;          // Not owned
00203                 TPtiKeyboardType iKeyboardType;
00204         };
00205 
00206 
00212 NONSHARABLE_CLASS(CPtiKeyMappings) : public CPtiMappings, public MPtiKeyMappings
00213         {
00214         public: 
00218                 IMPORT_C static CPtiKeyMappings* NewL(TDesC& aData);
00219                 
00223                 IMPORT_C static CPtiKeyMappings* NewL(TInt16* aData);           
00224                 
00228                 IMPORT_C static CPtiKeyMappings* NewL(CPtiKeyMapData* aData);
00229                 
00230                 IMPORT_C ~CPtiKeyMappings();
00231                 
00240                 IMPORT_C virtual TUint16 StartMapping(TPtiKey aKey,
00241                                                  TPtiTextCase aCase,
00242                                                                          TPtiEngineInputMode aMode = EPtiEngineInputModeNone);                                                                           
00243                                                                          
00258                 IMPORT_C TUint16 NextKey(TPtiKey aKey, TBool &aAppend, TPtiTextCase aCase);
00259                 
00265                 inline TPtiKey CurrentKey();
00266                 
00276                 IMPORT_C TInt ReplaceKeyMapL(TPtiKey aKey, TDesC& aMap, TPtiTextCase aCase);
00277                 
00285                 IMPORT_C TPtiKey KeyForCharacter(TUint16 aChar);
00286                 
00294                 IMPORT_C void GetDataForKey(TPtiKey aKey, TDes& aResult, TPtiTextCase aCase);
00295                                                                 
00304                 TPtrC GetAll(TPtiTextCase aCase);                                                       
00305 
00306         protected:              
00307                 CPtiKeyMappings();
00308                 CPtiKeyMappings(CPtiKeyMapData* aData);
00309                 TUint16 NextChar(TPtiTextCase aCase);
00310                 inline void KeyCodeToInternal(TPtiKey aKey);
00311                 inline void DeQwertyfyCaseValue(TPtiTextCase& aCase);           
00312         };
00313 
00314 
00320 NONSHARABLE_CLASS(CPtiQwertyKeyMappings) : public CPtiMappings, public MPtiKeyMappings
00321         {
00322         public:  
00326                 IMPORT_C static CPtiQwertyKeyMappings* NewL(TDesC& aData);
00327                 
00331                 IMPORT_C static CPtiQwertyKeyMappings* NewL(TInt16* aData);
00332                 
00336                 IMPORT_C static CPtiQwertyKeyMappings* NewL(CPtiKeyMapData* aData);                             
00337                 
00338                 IMPORT_C ~CPtiQwertyKeyMappings();
00339                 
00348                 IMPORT_C TUint16 StartMapping(TPtiKey aKey,
00349                                                   TPtiTextCase aCase,
00350                                                                           TPtiEngineInputMode aMode = EPtiEngineInputModeNone);
00351                                                                           
00366                 IMPORT_C TUint16 NextKey(TPtiKey aKey, TBool &aAppend, TPtiTextCase aCase);
00367                 
00373                 inline TPtiKey CurrentKey();
00374                 
00384                 IMPORT_C TInt ReplaceKeyMapL(TPtiKey aKey, TDesC& aMap, TPtiTextCase aCase);
00385                 
00393                 IMPORT_C TPtiKey KeyForCharacter(TUint16 aChar);
00394                 
00402                 IMPORT_C void GetDataForKey(TPtiKey aKey, TDes& aResult, TPtiTextCase aCase);
00403                 
00405                 TInt WriteData(TInt16* aDest);
00406                 
00408                 TInt ChunkDataSize() const;
00409                 
00411                 inline TBool DeadKeyRootFlag() const;
00412                 
00414                 inline TUint16 DeadKeyRootChar() const;
00415                 
00417                 inline TBool VowelSequenceFlag() const;
00418                 
00420                 inline TUint16 VowelSequenceResult() const;
00421                 
00423                 inline void ClearVowelSequence();
00424                 
00426                 inline TInt16 DeadKey() const;
00427                 
00429                 inline void ClearDeadKey();
00430                 
00432                 inline void ClearLastChar();
00433                 
00435                 inline void SetLastChar(TInt aLastChar);
00436                 
00438                 inline TInt GetLastChar() const;
00439                 
00441                 inline TUint16 ReplacedCharacter();
00442                 
00444                 inline void SetLastKey(TPtiKey aKey);
00445                 
00447                 inline TPtiTextCase VowelCase() const;
00448                 
00450                 inline void ResetVietnameseVowelSequenceAndToneMarks();
00451                 
00453                 inline TPtiKey LastKey() const;
00454 
00463                 TPtrC GetAll(TPtiTextCase aCase);                                                       
00464                 
00466                 inline void SetFlag(TInt aFlag);
00467                 
00469                 inline void ResetFlag(TInt aFlag);      
00470                 
00479                 void GetNumericModeKeysFromDataL(RArray<TPtiNumericKeyBinding>& aResult);
00480                 
00489                 IMPORT_C TInt SetKeyboardType(TPtiKeyboardType aKeyboardType);  
00490                 
00499                 IMPORT_C TBool HasDataBlockForKeyboardType(TPtiKeyboardType aKeyboardType) const;                       
00500 
00501         public:
00502                 enum
00503                         {
00504                         EDeadKeyRootFlag = 0x01,
00505                         EVowelSeqFlag    = 0x02,
00506                         EPrevKeyInUpperCase = 0x04,
00507                         ETrackVietnameseToneMarksAndVowels = 0x08
00508                         };
00509                                                 
00510         private:                        
00511                 CPtiQwertyKeyMappings();        
00512                 CPtiQwertyKeyMappings(CPtiKeyMapData* aData);
00513                 void ConstructL();
00514         
00515                 TUint16 NextChar(TPtiTextCase aCase);
00516                 void KeyCodeToInternal(TPtiKey aKey);
00517                 TUint16 GetDeadKeyChar(TPtiKey aKey, TPtiTextCase aCase);
00518                 inline TInt DeadKeyIndex(TUint16 aDeadKeyUnicode);
00519                 inline TBool IsDeadKeyCode(TUint16 aChar) const;
00520                 inline TBool IsModeControlChar(TUint16 aChar) const;
00521         TUint16 GetCharForMode(TPtiEngineInputMode aMode, TPtrC aChars, TBool aSkipFirst);
00522                 TBool DoesModeCharMatchToInputMode(TUint16 aChar, TPtiEngineInputMode aMode) const;
00523                 TUint16 VowelSequence(TPtiKey aKey1, TPtiKey aKey2, TPtiTextCase aCase) const;  
00524                 TUint16 VietnameseToneMark(TUint16 aPrevChar, TPtiKey aKey);
00525                 TUint16 RepeatingVowelSequence(TPtiKey aKey);
00526                 TPtiKey VowelSeqRootKey(TUint16 aChar);
00527                 inline TBool ChineseChrModeConversionNeeded(TPtiTextCase aCase, TPtiEngineInputMode aMode) const;
00528                 inline TBool IsChnSpecialCharKey(TPtiKey aKey) const;
00529 
00530         private:
00531                 RArray<TPtiKeyMapping> iReservedArray;                  
00532                 TAny* iReservedPtr;
00533                 TUint16 iDeadKey;
00534                 TUint16 iDeadKeyRootChar;
00535                 TUint16 iVowelSeqResult;
00536                 TPtiKey iLastKey;
00537                 TInt iFlags;
00538                 CPtiQwertyKeymappingsExtension* iExtension;
00539         };
00540 
00541 
00548 NONSHARABLE_CLASS(CPtiHalfQwertyKeyMappings) : public CPtiKeyMappings
00549     {
00550     public:
00551             IMPORT_C static CPtiHalfQwertyKeyMappings* NewL(CPtiKeyMapData* aData);
00552         IMPORT_C ~CPtiHalfQwertyKeyMappings();      
00553         
00554     public: // From MPtiKeyMappings
00555                 IMPORT_C TInt ReplaceKeyMapL(TPtiKey aKey, TDesC& aMap, TPtiTextCase aCase);
00556                 IMPORT_C TPtiKey KeyForCharacter(TUint16 aChar);
00557                 IMPORT_C TPtrC GetAll(TPtiTextCase aCase);        
00558                 
00567                 void GetNumericModeKeysFromDataL(RArray<TPtiNumericKeyBinding>& aResult);
00568                 
00577                 IMPORT_C void GetDataForKey(TPtiKey aKey, TDes& aResult, TPtiTextCase aCase);                           
00590                 IMPORT_C TUint16 StartMapping(TPtiKey aKey, TPtiTextCase aCase,
00591                                                TPtiEngineInputMode aMode = EPtiEngineInputModeNone);
00592 
00607                 IMPORT_C TUint16 NextKey(TPtiKey aKey, TBool &aAppend, TPtiTextCase aCase);
00608         protected:      
00609                 TUint16 NextChar(TPtiTextCase aCase);
00610 
00611     private:
00612         CPtiHalfQwertyKeyMappings(CPtiKeyMapData* aData);                 
00613     };
00614 
00615 // ---------------------------------------------------------------------------
00616 // CPtiKeyMappings::CurrentKey
00617 // 
00618 // ---------------------------------------------------------------------------
00619 // 
00620 inline TPtiKey CPtiKeyMappings::CurrentKey()
00621         {
00622         return iCurrentKey;
00623         }
00624 
00625 // ---------------------------------------------------------------------------
00626 // CPtiQwertyKeyMappings::CurrentKey
00627 // 
00628 // ---------------------------------------------------------------------------
00629 // 
00630 inline TPtiKey CPtiQwertyKeyMappings::CurrentKey()
00631         {
00632         return iCurrentKey;
00633         }
00634 
00635 // ---------------------------------------------------------------------------
00636 // CPtiQwertyKeyMappings::DeadKeyIndex
00637 // 
00638 // ---------------------------------------------------------------------------
00639 // 
00640 inline TInt CPtiQwertyKeyMappings::DeadKeyIndex(TUint16 aDeadKeyUnicode)
00641         {
00642         return (aDeadKeyUnicode & 0x00ff);
00643         }
00644 
00645 // ---------------------------------------------------------------------------
00646 // CPtiQwertyKeyMappings::IsDeadKeyCode
00647 // 
00648 // ---------------------------------------------------------------------------
00649 // 
00650 inline TBool CPtiQwertyKeyMappings::IsDeadKeyCode(TUint16 aChar) const
00651         {
00652         if (((aChar & 0xff00) == 0xf000) &&
00653             ((aChar & 0xff) <= 5))
00654                 {
00655                 return ETrue;   
00656                 }
00657                 
00658         return EFalse;  
00659         }
00660 
00661 // ---------------------------------------------------------------------------
00662 // CPtiQwertyKeyMappings::DeadKeyRootFlag
00663 // 
00664 // ---------------------------------------------------------------------------
00665 // 
00666 inline TBool CPtiQwertyKeyMappings::DeadKeyRootFlag() const
00667         {
00668         return (iFlags & EDeadKeyRootFlag) != 0;                
00669         }
00670 
00671 // ---------------------------------------------------------------------------
00672 // CPtiQwertyKeyMappings::IsModeControlChar
00673 // 
00674 // ---------------------------------------------------------------------------
00675 // 
00676 inline TBool CPtiQwertyKeyMappings::IsModeControlChar(TUint16 aChar) const
00677         {
00678         if ((aChar == KPtiPinyinMarker) ||
00679                 (aChar == KPtiStrokeMarker) ||
00680                 (aChar == KPtiZhuyinMarker) ||
00681                 (aChar == KPtiCangjieMarker))
00682                 {       
00683                 return ETrue;
00684                 }
00685 
00686         return EFalse;
00687         }
00688 
00689 // ---------------------------------------------------------------------------
00690 // CPtiQwertyKeyMappings::VowelSequenceFlag
00691 // 
00692 // ---------------------------------------------------------------------------
00693 // 
00694 inline TBool CPtiQwertyKeyMappings::VowelSequenceFlag() const
00695         {
00696         return (iFlags & EVowelSeqFlag) != 0;
00697         }
00698 
00699 // ---------------------------------------------------------------------------
00700 // CPtiQwertyKeyMappings::SetFlag
00701 // 
00702 // ---------------------------------------------------------------------------
00703 // 
00704 inline void CPtiQwertyKeyMappings::SetFlag(TInt aFlag)
00705         {
00706         iFlags |= aFlag;        
00707         }
00708 
00709 // ---------------------------------------------------------------------------
00710 // CPtiQwertyKeyMappings::ResertFlag
00711 // 
00712 // ---------------------------------------------------------------------------
00713 // 
00714 inline void CPtiQwertyKeyMappings::ResetFlag(TInt aFlag)
00715         {       
00716         iFlags &= ~aFlag;       
00717         }
00718 
00719 // ---------------------------------------------------------------------------
00720 // CPtiQwertyKeyMappings::VowelSequenceResult
00721 // 
00722 // ---------------------------------------------------------------------------
00723 // 
00724 inline TUint16 CPtiQwertyKeyMappings::VowelSequenceResult() const
00725         {
00726         return iVowelSeqResult;
00727         }
00728 
00729 // ---------------------------------------------------------------------------
00730 // CPtiQwertyKeyMappings::ClearVowelSequence
00731 // 
00732 // ---------------------------------------------------------------------------
00733 // 
00734 inline void CPtiQwertyKeyMappings::ClearVowelSequence()
00735         {
00736         iLastKey = EPtiKeyNone;
00737         }
00738         
00739 // ---------------------------------------------------------------------------
00740 // CPtiQwertyKeyMappings::DeadKeyRootChar
00741 // 
00742 // ---------------------------------------------------------------------------
00743 //              
00744 inline TUint16 CPtiQwertyKeyMappings::DeadKeyRootChar() const
00745         {
00746         return iDeadKeyRootChar;        
00747         }
00748                 
00749 // ---------------------------------------------------------------------------
00750 // CPtiQwertyKeyMappings::DeadKey
00751 // 
00752 // ---------------------------------------------------------------------------
00753 //      
00754 inline TInt16 CPtiQwertyKeyMappings::DeadKey() const
00755         {
00756         return iDeadKey;        
00757         }       
00758 
00759 // ---------------------------------------------------------------------------
00760 // CPtiQwertyKeyMappings::ClearDeadKey
00761 // 
00762 // ---------------------------------------------------------------------------
00763 // 
00764 inline void CPtiQwertyKeyMappings::ClearDeadKey()
00765         {
00766         iDeadKey = 0;
00767         }
00768                 
00769 // ---------------------------------------------------------------------------
00770 // CPtiQwertyKeyMappings::ClearLastChar
00771 // 
00772 // ---------------------------------------------------------------------------
00773 //      
00774 inline void CPtiQwertyKeyMappings::ClearLastChar()
00775         {
00776         iExtension->iLastChar = 0;
00777         }
00778 
00779 // ---------------------------------------------------------------------------
00780 // CPtiQwertyKeyMappings::SetLastChar
00781 // 
00782 // ---------------------------------------------------------------------------
00783 //      
00784 inline void CPtiQwertyKeyMappings::SetLastChar(TInt aLastChar)
00785         {
00786         iExtension->iLastChar = (TUint16)aLastChar;
00787         }
00788         
00789 // ---------------------------------------------------------------------------
00790 // CPtiQwertyKeyMappings::GetLastChar
00791 // 
00792 // ---------------------------------------------------------------------------
00793 //      
00794 inline TInt CPtiQwertyKeyMappings::GetLastChar() const
00795         {
00796         return iExtension->iLastChar;
00797         }
00798                 
00799 // ---------------------------------------------------------------------------
00800 // CPtiQwertyKeyMappings::ReplacedCharacter
00801 // 
00802 // ---------------------------------------------------------------------------
00803 //      
00804 inline TUint16 CPtiQwertyKeyMappings::ReplacedCharacter()
00805         {       
00806         return iExtension->iReplaced;
00807         }
00808 
00809 // ---------------------------------------------------------------------------
00810 // CPtiQwertyKeyMappings::SetLastKey
00811 // 
00812 // ---------------------------------------------------------------------------
00813 //              
00814 inline void CPtiQwertyKeyMappings::SetLastKey(TPtiKey aKey)
00815         {
00816         iLastKey = aKey;        
00817         }
00818                 
00819 // ---------------------------------------------------------------------------
00820 // CPtiQwertyKeyMappings::KeyCodeToInternal
00821 // 
00822 // ---------------------------------------------------------------------------
00823 //                              
00824 inline void CPtiKeyMappings::KeyCodeToInternal(TPtiKey aKey)
00825         {
00826         iCurrentKey = aKey;
00827         }
00828 
00829 // ---------------------------------------------------------------------------
00830 // CPtiQwertyKeyMappings::VowelCase
00831 // 
00832 // ---------------------------------------------------------------------------
00833 // 
00834 inline TPtiTextCase CPtiQwertyKeyMappings::VowelCase() const
00835         {
00836         return iExtension->iVowelCase;
00837         }
00838 
00839 // ---------------------------------------------------------------------------
00840 // CPtiQwertyKeyMappings::ResetVietnameseVowelSequenceAndToneMarks
00841 // 
00842 // ---------------------------------------------------------------------------
00843 // 
00844 inline void CPtiQwertyKeyMappings::ResetVietnameseVowelSequenceAndToneMarks()
00845         {
00846         iExtension->iLastChar = 0;
00847         iExtension->iReplaced = 0;
00848         iExtension->iLastTone = 0;
00849         iVowelSeqResult = 0;
00850         iLastKey = EPtiKeyNone;
00851         ResetFlag(EVowelSeqFlag);
00852         }
00853         
00854 // ---------------------------------------------------------------------------
00855 // CPtiQwertyKeyMappings::LastKey
00856 // 
00857 // ---------------------------------------------------------------------------
00858 // 
00859 inline TPtiKey CPtiQwertyKeyMappings::LastKey() const
00860         {
00861         return iLastKey;
00862         }
00863         
00864 // ---------------------------------------------------------------------------
00865 // CPtiQwertyKeyMappings::ChineseChrModeConversionNeeded
00866 // 
00867 // ---------------------------------------------------------------------------
00868 // 
00869 inline TBool CPtiQwertyKeyMappings::ChineseChrModeConversionNeeded(TPtiTextCase aCase, 
00870                                                          TPtiEngineInputMode aMode) const
00871         {
00872         if (aCase == EPtiCaseChrLower &&
00873        (aMode == EPtiEnginePinyinQwerty  || aMode ==  EPtiEnginePinyinPhraseQwerty ||
00874         aMode == EPtiEngineStrokeQwerty  || aMode ==EPtiEngineNormalCangjieQwerty  ||
00875         aMode == EPtiEngineZhuyinQwerty  || aMode == EPtiEngineZhuyinPhraseQwerty  ||
00876         aMode == EPtiEngineStrokePhraseQwerty))
00877                 {
00878                 return ETrue;
00879                 }
00880         
00881         return EFalse;
00882         }
00883         
00884 // ---------------------------------------------------------------------------
00885 // CPtiKeyMappings::DeQwertyfyCaseValue
00886 // 
00887 // ---------------------------------------------------------------------------
00888 //      
00889 inline void CPtiKeyMappings::DeQwertyfyCaseValue(TPtiTextCase& aCase)
00890         {
00891         if (aCase == EPtiCaseChrLower)
00892                 {
00893                 aCase = EPtiCaseLower;
00894                 }
00895         else if (aCase == EPtiCaseChrUpper)
00896                 {
00897                 aCase = EPtiCaseUpper;
00898                 }               
00899         }
00900         
00901 // ---------------------------------------------------------------------------
00902 // CPtiKeyMappings::KeyMapData
00903 // 
00904 // ---------------------------------------------------------------------------
00905 //              
00906 inline CPtiKeyMapData* CPtiMappings::KeyMapData() const
00907         {
00908         return iKeyMapData;
00909         }
00910         
00911 // ---------------------------------------------------------------------------
00912 // CPtiKeyMappings::IsChnSpecialCharKey
00913 // 
00914 // ---------------------------------------------------------------------------
00915 //              
00916 inline TBool CPtiQwertyKeyMappings::IsChnSpecialCharKey(TPtiKey aKey) const
00917         {
00918         if (aKey == EPtiKeyQwertyPlus  ||
00919         aKey == EPtiKeyQwertyMinus ||
00920         aKey == EPtiKeyQwertyComma ||
00921         aKey == EPtiKeyQwertySemicolon ||
00922         aKey == EPtiKeyQwertyFullstop ||
00923         aKey == EPtiKeyQwertyHash     ||
00924         aKey == EPtiKeyQwertySlash    ||
00925         aKey == EPtiKeyQwertyApostrophe)
00926                 {
00927                 return ETrue;
00928                 }
00929                 
00930         return EFalse;  
00931         }
00932                         
00933 #endif // _PTI_KEY_MAPPINGS_H
00934 
00935 // End of file

Copyright © Nokia Corporation 2001-2007
Back to top