Namespaces

Variants
Actions

Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

CEikEdwin::InsertDeleteCharsL does not update virtual keyboard edit field (Known Issue)

From Wiki
Jump to: navigation, search

Characters inserted using CEikEdwin::InsertDeleteCharsL() are not displayed in the edit field of the virtual keyboard (VKB).

Article Metadata
Tested with
Devices(s): Nokia N97, Nokia N97 Mini
Nokia 5800 XpressMusic
Compatibility
Platform(s): S60 5th Edition
S60 5th Edition
Article
Keywords: CEikEdwin, InsertDeleteCharsL
Created: User:Kbwiki (07 Apr 2010)
Last edited: hamishwillee (12 Mar 2012)

Description

CEikEdwin::InsertDeleteCharsL() replaces the cursor selection with the specified text. However, when the virtual keyboard is active, characters inserted into the host editor are not displayed in the VKB edit field.

Solution

Avoid using CEikEdwin::InsertDeleteCharsL() to replace text in an editor. A workaround (when replacing a single character) is to first delete the character at cursor position and then add a new character:

TInt pos = editor->CursorPos();
TKeyEvent keyEvent;
keyEvent.iCode = EKeyDelete;
keyEvent.iScanCode = EStdKeyDelete;
keyEvent.iModifiers = 0;
keyEvent.iRepeats = 0;
iEditor->OfferKeyEventL( keyEvent, aType );
iEditor->SetCursorPosL( pos, EFalse );
iEditor->OfferKeyEventL( newKeyEvent, aType );
This page was last modified on 12 March 2012, at 05:40.
361 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×