Purpose

PtiEngine (Predictive Text Engine) API provides low level text input interface to applications. Its purpose is to handle all the non-UI related low level text input operations and act as an integration layer for third party text input engines. The basic use case for PtiEngine is one where it receives a sequence of key presses, processes them and returns one or more candidate words as a result. It knows what input languages and input methods are available in the device and provides the interface for using them.

Constraints

None.

Classification and release information

This API is an SDK API and was first published in S60 3rd Edition.

Emulator support

This API is fully supported in the WINS/WINSCW emulator environment.

API Description

PtiEngine API is a single calling point to provide all the low level text input functionality. It provides methods for querying and activating installed input languages, changing input modes and text cases and performing text input operations. The API contains set of methods for Latin based, Chinese and Japanese text input. Some of the methods are common to all of those variants. PtiEngine also provides access to predictive text input functionality, in case there is need to use it directly without standard CEikEdwin / FEP chain (hence the name 'predictive text input engine') Predictive text engine integration is hidden behind PtiCore Plug-in API and is used through PtiEngine API.

Use Case

With PtiEngine API, typical use cases are

  • Initializing PtiEngine

  • Entering text in Latin multitapping mode.

  • Entering text in Latin predictive mode.

  • Querying and activating installed languages.

  • Numeric language

  • Changing input modes and text cases.

  • User dictionary

  • Keymappings

PtiEngine design

The class CPtiEngine implements the PtiEngine client side API. It is a thin wrapper class and acts only as an API front-end CPtiEngine is the main class for PtiEngine API. The client application creates an instance of this class when it wants to use PtiEngine API. The CPtiEngine class has the following responsibilities:

  • Maintain the language list

  • Forward the API function calls to the correct core object depending on the selected input mode and language

  • Maintain the list of active user dictionaries (see next chapter) and secondary core related data files

  • Below figure shows the main classes of PtiEngine API. The figure shows logical relations. In the PtiEngine API, most objects are accessible via M mixin classes. In the plug-in API, C or T counterpart of the corresponding M mixin classes are used.

PtiEngine class diagram


PtiEngine class diagram

Related APIs
  • CPtiEngine

User dictionary

Typically third party text input engines are delivered with a language databases containing a list of the most frequently used words for each language. These default language databases are usually optimized to be as small as possible, which also means that the number of words in them is more or less limited. There are always words (such as names, abbreviations, etc.) that are related to a specific user and cannot be included into the default language databases by the engine vendor. Prediction engines typically support some kind of user dictionary mechanism for expanding default language databases. The PtiEngine user dictionary is a set of words that can be dynamically attached to the default language database. Once a user dictionary is attached, its entries are available as candidates in prediction result data in a same way as the entries from the default language databases. Some prediction engines allow several user dictionaries to be attached simultaneously.

PtiEngine API supports two kinds of user dictionaries: default and additional. The default user dictionary is something that a core object automatically loads and sets up when an instance of PtiEngine is created. The client application does not need to know the filename or the location for the default user dictionary file. Additional user dictionaries can be attached independently using the CPtiEngine->AttachUserDictionary() method. In that case the client application must know the full name of the user dictionary file. There can be as many additional user dictionaries as the core object allows (it is possible that none are allowed), but only one default dictionary per core object.

The client does not know the location of the default dictionary and if client wants to create an additional dictionary, add it to the core, then client would know the location of the dictionary that is added.

Related APIs
  • CPtiEngine->AttachUserDictionary()

Observer

PtiEngine observer is used for indicating the client application when multitapping timer expires, last item in prediction candidate list is reached, first item in prediction candidate list is reached. If the client application needs to observe PtiEngine, it must inherit the MPtiObserver interface class and call the CPtiEngine->SetObserver() method.

Related APIs
  • CPtiEngine->SetObserver()
  • MPtiObserver

Language databases

Core (third party text input engine) objects may implement their language data in any format they wish, PtiEngine also provides a wrapper class for scanning, loading and accessing language data. It is recommended that a core object uses MPtiLanguageDatabase interface instead of implementing its own. Language database, The default implementation is provided in the class CPtiLanguageDatabase . The core object language database implementation should inherit from latter.

Related APIs
  • CPtiLanguageDatabase
  • MPtiLanguageDatabase
Related APIs
  • CEikEdwin

Using the PtiEngine API

Below are some of the most frequently used methods of PtiEngine explained by using use cases.

Initializing PtiEngine

Predictive Text Input Engine is created and initialized by using the following method:

             
              static CPtiEngine* NewL(TBool aUseDefaultUserDictionary = EFalse)
             
            

When this method is called, it creates an instance of the CPtiEngine class, initializes the default core object and connects it to the CPtiEngine object. The default core object scans available multitapping and QWERTY resource files, updates the language list and prepares to handle multitapping, QWERTY and numeric input modes. Then it does the ECom plug-in query for other available core objects and initializes the found plug-ins in a similar way.

The Boolean parameter aUseDefaultUserDictionary specifies whether core objects are instructed to load and attach their default user dictionaries. This parameter applies to all core objects for the whole lifetime of the CPtiEngine instance.

After this method is successfully called, PtiEngine is ready to be used but at this point there is not an active language yet, so most of the PtiEngine API methods would return an error value (usually KErrNoActiveLanguage ). The client application must call the method

             
              TInt ActivateLanguageL(TInt aEpocLanguageID, TPtiEngineInputMode aMode = EPtiEngineInputModeNone)
             
            

to activate one of the available languages. PtiEngine is set to the aMode input mode. Available input modes are explained in the following sections.

             
                  CPtiEngine* eng = CPtiEngine::NewL( ETrue );
              
    CleanupStack::PushL( eng );
    
    //Active english input with multitapping mode
    eng->ActivateLanguageL(ELangEnglish,EPtiEngineMultitapping);
    .......
    eng->CloseCurrentLanguageL();//close the language
    
    CleanupStack::Pop(eng);
    delete eng;    

Multitapping

The multitapping input mode ( EPtiEngineMultitapping ) implements the basic multitapping input for ITU-T keyboard. This is the traditional text input mode, where the user may need to press one key several times to input the requested character.

Related APIs
  • EPtiEngineMultitapping

Predictive

The predictive input mode ( EPtiEngineMultitapping ) implements the predictive text input such as T9® or eZiText®. In this input, instead of cycling through characters bound to keys, the user presses each key only once and Predictive Text Input Engine tries to guess which word the user is inputting. Usually Predictive Text Input Engine prepares several candidates for each input sequence. The candidates can be queried with the CPtiEngine methods: GetCandidateListL, GetFirstCandidate, GetNextCandidate, GetPreviousCandidate .

Related APIs
  • CPtiEngine
  • EPtiEngineMultitapping

Numeric

The numeric input mode ( EPtiEngineNumeric ) is a basic input mode for numeric data. It works exactly like the multitapping mode, except that key mappings are not loaded from the resource file, but are always available in memory. This input mode is always available for each language. In addition there is a special language object called numeric language. See the section Numeric language for more details

Related APIs
  • EPtiEngineNumeric

Pinyin

The Pinyin input mode ( EPtiEnginePinyin ) is a Chinese input method where the user inputs phonetic spellings for Chinese characters using Latin characters. Key presses produce a candidate list consisting of Pinyin spellings. The user selects one of the Pinyin spellings, which is then fed again to the prediction engine. The result is a set of Chinese candidate words (a candidate page).

The rest of the pages can be accessed with the following CPtiEngine methods: CandidatePage, NextCandidatePage, PreviousCandidatePage, and MoreCandidatePages . The length of the candidate page can be controlled with the method SetCandidatePageLength .

Related APIs
  • CPtiEngine
  • EPtiEnginePinyin
  • SetCandidatePageLength

Stroke

The stroke input mode ( EPtiEngineStroke ) is a Chinese input method where the user builds Chinese characters from a set of strokes. Key presses produce a string of stroke characters, which is passed to prediction engine. The list of Chinese candidate characters is produced as a result. Symbian platform supports the 6-stroke version.

Related APIs
  • EPtiEngineStroke

Zhuyin

The Zhuyin input mode ( EPtiEngineZhuyin ) is a Chinese input method, where the user enters a string of Zhuyin symbols. That string is passed to prediction engine and a list of Chinese candidate characters is produced as a result. Since there are more Zhuyin symbols than keys in a normal ITU-T keypad, Zhuyin symbols are entered by using the multitapping method. Illegal Zhuyin characters are rejected and the user is allowed to enter only valid combinations.

Related APIs
  • EPtiEngineZhuyin

Pinyin phrase

The Pinyin phrase input ( EPtiEnginePinyinByPhrase ) is essentially the same as regular the Pinyin input, except that the user may enter several Pinyin words. Candidates can be fetched either by using the GetcandidatePage() method (as with regular Pinyin) or by using GetChinesePhraseCandidates() . The latter method returns all candidates in a single table.

Related APIs
  • EPtiEnginePinyinByPhrase
  • GetChinesePhraseCandidates()
  • GetcandidatePage()

Zhuyin phrase

The Zhuyin phrase input ( EPtiEngineZhuyinByPhrase ) is essentially the same as the regular Zhuyin input, except that Zhuyin symbols are entered by using QWERTY keyboard.

Related APIs
  • EPtiEngineZhuyinByPhrase

CangJie

The CangJie input is separated to three different input modes:

  • EPtiEngineNormalCangjieQwerty implements normal CangJie input.

  • EPtiEngineEasyCangjieQwerty implements easy CangJie input.

  • EPtiEngineAdvCangjieQwerty implements advanced CangJie input.

Related APIs
  • EPtiEngineAdvCangjieQwerty
  • EPtiEngineEasyCangjieQwerty
  • EPtiEngineNormalCangjieQwerty

QWERTY

The QWERTY input mode ( EPtiEngineQwerty ) implements the basic QWERTY input mode for Latin-like languages. Basic functionality of Latin QWERTY input is very simple. The client calls the CPtiEngine::AppendKeyPress method and PtiEngine appends a new character to the input buffer according to the current key mappings. In addition to normal upper and lower test cases, there are two extra case definitions: EPtiCaseChrLower and EPtiCaseChrUpper . They are needed for the Chr-key functionality and when either of them is activated (by calling CPtiEngine::SetCase ) consecutive key presses cycle through accented characters associated to that key.

Another QWERTY related special case is the dead key functionality. A dead key does not produce any character initially when pressed, but when a suitable key is pressed next, the character associated to the second key is appended to the buffer in accented form. If the second key is not able to produce any accented form associated to the first key, then both the dead key root character and the character for second key are appended to the buffer. PtiEngine client should prepare to handle a situation in which a single key press produces two characters.

Dead key functionality variation is implemented for Vietnamese QWERTY. Vietnamese input specification specifies certain vowel sequences, where two consecutive key presses are combined into one character. The vowel sequences are not defined in key mapping data, but handled as hardcoded special case in QWERTY key mapping handler.

Related APIs
  • CPtiEngine::AppendKeyPress
  • CPtiEngine::SetCase
  • EPtiCaseChrLower
  • EPtiCaseChrUpper
  • EPtiEngineQwerty

Chinese QWERTY

The following input modes are defined for Chinese QWERTY:

  • EPtiEngineZhuyinQwerty for the Zhuyin QWERTY mode.

  • EPtiEngineZhuyinPhraseQwerty for the Zhuyin QWERTY phrase mode.

  • EPtiEnginePinyinQwerty for the Pinyin QWERTY mode.

  • EPtiEnginePinyinPhraseQwerty for the Pinyin QWERTY phrase mode.

  • EPtiEngineStrokeQwerty for the Stroke QWERTY mode.

Related APIs
  • EPtiEnginePinyinPhraseQwerty
  • EPtiEnginePinyinQwerty
  • EPtiEngineStrokeQwerty
  • EPtiEngineZhuyinPhraseQwerty
  • EPtiEngineZhuyinQwerty

Japanese input modes

The following input modes are defined for Japanese input:

  • EPtiEngineHiraganaKanji for the Hiragana/Kanji mode.

  • EPtiEngineHiraganaKanjiPredictive for the predictive Hiragana/Kanji mode.

  • EPtiEngineKatakana for the half-width Katakana mode.

  • EPtiEngineFullWidthKatakana for the full-width Katakana mode.

  • EPtiEngineFullWidthNumeric for the full-width numeric.

  • EPtiEngineFullWidthAlphabet for the full-width alphabet mode.

Related APIs
  • EPtiEngineFullWidthAlphabet
  • EPtiEngineFullWidthKatakana
  • EPtiEngineFullWidthNumeric
  • EPtiEngineHiraganaKanji
  • EPtiEngineHiraganaKanjiPredictive
  • EPtiEngineKatakana
Related APIs
  • CPtiEngine
  • KErrNoActiveLanguage
  • aMode
  • aUseDefaultUserDictionary

Entering text in Latin multitapping mode

The multitapping input mode ( EPtiEngineMultitapping ) implements the basic multitapping input for ITU-T keyboard. This is the traditional text input mode, where the user may need to press one key several times to input the requested character. The basic use case for inputting one character is presented in next figure .

Inputting one character


Inputting one character

The below code fragment shows how to input text "dog" to PtiEngine using multitapping input mode.

             
                 CPtiEngine* eng = CPtiEngine::NewL();
              
   CleanupStack::PushL(eng);
   
   ....
   eng->ActivateLanguageL(ELangEnglish, EPtiEngineMultitapping);
   eng->AppendKeyPress(EPtiKey3);
   eng->AppendKeyPress(EPtiKey6);
   eng->AppendKeyPress(EPtiKey6);
   eng->AppendKeyPress(EPtiKey6);
   eng->AppendKeyPress(EPtiKey4);
   TBuf<100> temp;
   temp.Copy(eng->CurrentWord()); // At this point temp would contain word "dog"
   ....
   
   eng->CloseCurrentLanguageL();
   
   CleanupStack::Pop(eng);
   delete eng;
Related APIs
  • EPtiEngineMultitapping

Entering text in Latin predictive mode

The predictive input mode ( EPtiEngineMultitapping ) implements the predictive text input. In this input, instead of cycling through characters bound to keys, the user presses each key only once and Predictive Text Input Engine tries to guess which word the user is inputting. Usually Predictive Text Input Engine returns several candidates for each input sequence. The basic use case for entering one key and returning the topmost candidate for it is presented in next figure.

Candidate for input


Candidate for input

The below code fragment shows how to input text "this" to PtiEgine using predictive input mode.

             
                 CPtiEngine* eng = CPtiEngine::NewL();
              
    CleanupStack::PushL(eng);
    
    ....
    eng->ActivateLanguageL(ELangEnglish, EPtiEnginePredictive);
    eng->AppendKeyPress(EPtiKey8);
    eng->AppendKeyPress(EPtiKey4);
   eng->AppendKeyPress(EPtiKey4);
   eng->AppendKeyPress(EPtiKey7);
   TBuf<100> temp; 
   temp.Copy(eng->CurrentWord()); // At this point temp would contain(depending on the underlying engine) word "this". 
   temp.Copy(eng->NextCandidate()); // Move on to next candidate. 
   eng->CommitCurrentWord(); // Tell engine that current word was accepted.
   ....
   eng->CloseCurrentLanguageL();
    
   CleanupStack::Pop(eng);
   delete eng;
Related APIs
  • EPtiEngineMultitapping

Querying and activating installed languages

PtiEngine can query for the list of installed languages and can activate any of the installed languages with a particular input mode. The client application must call the method

             
              TInt ActivateLanguageL(TInt aEpocLanguageID, TPtiEngineInputMode aMode = EPtiEngineInputModeNone)
             
            

to activate one of the available languages. If ActivateLanguageL is called without passing any TPtiEngineInputMode (default mode is EPtiEngineInputModeNone ), client has to call SetInputMode separately to set the desired input mode.

             
                  CPtiEngine* eng = CPtiEngine::NewL( ETrue );
              
    CleanupStack::PushL( eng );
    
    if ( eng->NumberOfLanguages() )
        {
        RArray<TInt> languages;
      eng->GetAvailableLanguagesL( languages );
       ........
        
        // see if finnish language is there in list of available input languages and if "yes", activate finnish input. 
       for(TInt i=0;i<languages.Count();i++)
            {
            if(languages[i] ==ELangFinnish)
                {
                eng->ActivateLanguageL(ELangFinnish,EPtiEngineMultitapping);
                ........
                eng->CloseCurrentLanguageL();
                }
            }   
        languages.Close();
          }
    
  CleanupStack::Pop(eng);
  delete eng;
Related APIs
  • ActivateLanguageL
  • EPtiEngineInputModeNone
  • SetInputMode
  • TPtiEngineInputMode

Numeric language

When Predictive Text Input Engine is initialized, it creates a special language object called numeric language and adds it to the list of available languages. The numeric language is for those clients who wish to use the numeric input mode without activating a real language. The numeric language implements only one input mode, EPtiEngineNumeric . The numeric language is excluded from the list of available languages returned by the GetAvailableLangugesL method. It is also excluded from the value returned by the NumberOfLanguages method. However it is possible to get access to the numeric language via the GetLanguage method. The numeric language has the language code ELangNumeric and can be activated as follows:

             
                 CPtiEngine* eng = CPtiEngine::NewL();
              
   CleanupStack::PushL(eng);
   
   ....
   eng->ActivateLanguageL(ELangNumeric, EPtiEngineNumeric);
   eng->AppendKeyPress(EPtiKey8);
   eng->AppendKeyPress(EPtiKey4);
   eng->AppendKeyPress(EPtiKey2);
   eng->AppendKeyPress(EPtiKey7);
   TBuf<100> temp; 
   temp.Copy(eng->CurrentWord());// At this point the temp will contain "8427"
    
   eng->CloseCurrentLanguageL();
    
   CleanupStack::Pop(eng);
   delete eng;
Related APIs
  • ELangNumeric
  • EPtiEngineNumeric
  • GetAvailableLangugesL
  • GetLanguage
  • NumberOfLanguages

Changing Input modes and Text cases

The client can change the input mode when ever there is a need for specific input mode. For example, if the user wants to activate the multitapping predictive mode, that can be done using the following method.

             
              CPtiEngine::SetInputMode(TPtiEngineInputMode aMode);
              

//Here aMode can be one of the modes found in enum TPtiEngineInputMode of PtiDefs.h

In the same way client can change the text case between lower and upper when ever there is a need using the method below.

             
              IMPORT_C void CPtiEngine::SetCase(TPtiTextCase  aCase);
              
    
    //Here aCase could either be EPtiCaseUpper or EPtiCaseLower.
    
   
   //Code fragment on how to change the Text Case:
    
   CPtiEngine* eng = CPtiEngine::NewL();
   CleanupStack::PushL(eng);
   
   ....
   eng->ActivateLanguageL(ELangEnglish, EPtiEngineMultitapping);
   eng->SetCase(EPtiCaseUpper);
   eng->AppendKeyPress(EPtiKey3);
   eng->AppendKeyPress(EPtiKey6);
   eng->AppendKeyPress(EPtiKey6);
   eng->AppendKeyPress(EPtiKey6);
   eng->AppendKeyPress(EPtiKey4);
   TBuf<100> temp;
   temp.Copy(eng->CurrentWord()); // At this point temp would contain word "DOG"
   ....
   
    eng->CloseCurrentLanguageL();
   
   CleanupStack::Pop(eng);
   delete eng;

User dictionary

The PtiEngine user dictionary is a set of words that can be dynamically attached to the default language database. Once a user dictionary is attached, its entries are available as candidates in prediction result data in a same way as the entries from the default language databases. Some prediction engines allow several user dictionaries to be attached simultaneously. For more details, refer to User dictionary section of API Description. The below code fragment shows how to add a user dictionary to default language database. The support for adding additional user dictionary is entirely depends up on the core that supports that current language and input mode. But each core will have a default dictionary to which words can be added using API AddUserDictionaryEntry , and pointer to default user dictionary for current language can be get by using API DefaultUserDictionary of CPtiEngine .

             
                  CPtiEngine* eng = CPtiEngine::NewL();
              
  
    CleanupStack::PushL(eng);
  eng->ActivateLanguageL(ELangEnglish, EPtiEngineMultitapping);
  
  CDesCArrayFlat* words = new (ELeave) CDesCArrayFlat(5);
  CleanupStack::PushL( words );
  words->AppendL(_L("lorem"));
  words->AppendL(_L("ipsum"));
  words->AppendL(_L("dolor"));
   words->AppendL(_L("sit"));
  TBuf<50> filename(_L("C:\\data\\TempUDB\\TestUserDictFile.txt"));
  
  RFs fsSession;
  User::LeaveIfError( fsSession.Connect() );
  CleanupClosePushL( fsSession );
  
  RFile file;
  CleanupClosePushL(file);
  if ( file.Open( fsSession, filename, EFileWrite | EFileShareAny ) != KErrNone )
        {
        file.Create( fsSession, filename, EFileWrite | EFileShareAny );
        }
    
  file.Close();
  CleanupStack::PopAndDestroy(2); //file , fsSession
  
  TInt err  = eng->CreateUserDictionaryL(filename, words, EPtiEnginePredictive);
  CleanupStack::PopAndDestroy(words);  //words
  
  // The above call will add the words "lorem",ipsum","dolor",and "sit" to the user dictonary.
  if(KErrNone == err)
        {
        MPtiUserDictionary* dict = eng->AttachUserDictionaryL(filename);
    
    //The above call will attach the created user dictonary to the current core.From now onwards ,     the above 4 words will be
    //predicted by the current active core.
    if(dict)
            {
       TFileName msg;
       TPtiUserDictionaryEntry entry(_L("amet"));
       eng->AddUserDictionaryEntry(entry,dict->Id());  //The above call will add "amet" to the user               dictonary ,so it will be predicted from now on.
       //the prediction engine will start predicting the above added words   ....   
       eng->RemoveEntryFromUserDictionary(entry,dict->Id());  //The above call will remove "amet"            from the user dictornary,so it will not be predicted anymore.
       
       eng->DetachUserDictionary(filename);
       //Above call detaches the dictonery from the current core.
       
       }
        
        }
    eng->CloseCurrentLanguageL();
  CleanupStack::Pop(eng);
  delete eng;
Related APIs
  • AddUserDictionaryEntry
  • CPtiEngine
  • DefaultUserDictionary

Keymappings

CPtiKeyMappings class can be used to get the data that is mapped to a particular key ( TPtiKey ) with a particular case ( TPtiTextCase ) and input mode ( TPtiEngineInputMode ). Call the function StartMapping to get the first character that is mapped to the particular key and then call NextKey to get the subsequent mapped characters. We can replace the data that is mapped to a particular key by using the ReplaceKeyMapL function. Next subsequent StartMapping , or NextKey calls for that key returns the newly mapped characters.

             
                  CPtiEngine* eng = CPtiEngine::NewL();
              
    CleanupStack::PushL(eng);
  
    eng->ActivateLanguageL(ELangEnglish, EPtiEngineMultitapping);
  
    CPtiKeyMappings * keyMappings = dynamic_cast < CPtiKeyMappings* > (dynamic_cast < CPtiCoreLangua ge* >(eng->CurrentLanguage())->GetKeymappings());
  
    TBool isAppend;
    TUint16 key = keyMappings->StartMapping(EPtiKey2,EPtiCaseLower,EPtiEngineMultitapping); // retur    ns the first character that is mapped to EPtiKey2 'a'
    TUint16 key1 = keyMappings->NextKey(EPtiKey2,isAppend,EPtiCaseLower);    // returns the next cha  racter that is mapped to EPtiKey2 'b'
      
    TBuf<20> beforeReplace;
    keyMappings->GetDataForKey(EPtiKey2,beforeReplace,EPtiCaseLower); // gets the first 20 characters     that are mapped to EPtiKey2 for lower case "abc2...."
   
    _LIT(KNewMapLower, "def");
    TBuf<5> lowerMap(KNewMapLower);
    keyMappings->ReplaceKeyMapL(EPtiKey2,lowerMap,EPtiCaseLower); // replaces the data that is mapped    to EPtiKey2 for lower case
      
    TUint16 key2 = keyMappings->StartMapping(EPtiKey2,EPtiCaseLower,EPtiEngineMultitapping);// retur ns the first character that is mapped to EPtiKey2 'd'
    TUint16 key3 = keyMappings->NextKey(EPtiKey2,isAppend,EPtiCaseLower); // returns the first chara cter that is mapped to EPtiKey2 'e'
  
    TBuf<20> afterReplace;
    keyMappings->GetDataForKey(EPtiKey2,beforeReplace,EPtiCaseLower);  // gets the first 20 characte  rs that are mapped to EPtiKey2 for lower case "def"
      
    eng->CloseCurrentLanguageL();
    
    eng->ActivateLanguageL(ELangEnglish, EPtiEngineHalfQwerty);
    
    CPtiHalfQwertyKeyMappings * keyHalfQwertyMappings = dynamic_cast< CPtiHalfQwertyKeyMappings*> (d    ynamic_cast< CPtiCoreLanguage* >(eng->CurrentLanguage())->GetHalfQwertyKeymappings());
    
    TUint16 key4 = keyHalfQwertyMappings->StartMapping(EPtiKeyQwertyA,EPtiCaseFnLower,EPtiEngineHalf  Qwerty);
    // returns the first functionalized character that is mapped to EPtiKeyQwertyA '?'
    
    eng->CloseCurrentLanguageL();
    
    CleanupStack::Pop(eng);
    delete eng;
Related APIs
  • CPtiKeyMappings
  • NextKey
  • ReplaceKeyMapL
  • StartMapping
  • TPtiEngineInputMode
  • TPtiKey
  • TPtiTextCase

Glossary

The following are the abbreviations and definitions used in this document.

Abbreviations

FEP Front End Processor

UI

User Interface

Definitions

PtiEngine

Predictive Text Input Engine

Multitapping

The conventional text input method for mobile phones where often several key presses are required to insert a single character.

Predictive text input

Text input method where the text input software tries to guess the correct words simultaneously when the user is typing them. Its purpose is to decrease the number of required key presses and to make text input faster and easier.

Input sequence

The sequence of key presses. Predictive Text Input Engine may produce several candidate words for a single input sequence.