Alpha keys vs. numeric keys (on Nokia E61)

Login to reply to this topic.
Tue, 2006-12-19 17:44
Joined: 2004-05-29
Forum posts: 149
Hello all.  I have a custom control (CCoeControl) that handles key input via the OfferKeyEventL method.  There's a "feature" that is happening that I don't know how to turn off. 

The Nokia E61 has a QWERTY keyboard.  The numeric keys (0-9) are located over the alpha keys (A-Z), and you press the green button to access them.  However, for my control, when you press the keys which have the numbers on them, you receive the number instead of the letter.  But for the other keys, which only have puncuation on them, you receive the letter.  Basically I can get Q, W, E, but no R, T, Y because RTY comes back as 123!

I bet I can change this somehow, but I can't find anything in the SDK.  I tried adding the following to my code, but the same behavior persists:
Code:
TCoeInputCapabilities CScrollCtrl::InputCapabilities() const
{
return TCoeInputCapabilities(TCoeInputCapabilities::EWesternAlphabetic |
TCoeInputCapabilities::ENonPredictive);

}

Thanks,
-euroq

Tue, 2006-12-19 17:56
Forum Nokia Champion
Joined: 2004-05-26
Forum posts: 732
Re: Alpha keys vs. numeric keys (on Nokia E61)
Wed, 2006-12-20 00:44
Joined: 2004-05-29
Forum posts: 149
Re: Alpha keys vs. numeric keys (on Nokia E61)
Right..... from the article,

Solution  Applications should always use standard Avkon editor controls for text input.

 Angry Angry !

I wish, at least, whomever wrote that article had the gumption to admit that it was either a mistake on someone's part or a terrible design flaw.  You cannot expect every application to not use the keyboard except for Avkon editor controls.  You cannot expect every application to only need alphabet keys for text entry.

I am seriously pissed.  I can manually short circuit the keys by translating "1"->"R" and so on, but then what happens when the phones change. 

Symbian OS's 3rd Edition has been a nightmare.
Mon, 2007-08-20 22:23
Joined: 2004-05-29
Forum posts: 149
Re: Alpha keys vs. numeric keys (on Nokia E61)

The following code will take a scan code and return the first key in lowercase that would appear if you were using a text editor (i.e. when you press "F" on the keyboard it can correspond to F and 4; first "F" appears, but if you press "F" again it is replaced by a 4). If, for example, you don't want the 4 when pressing "F" (which is the default on a CCoeControl) you can translate it with this:

// Header file
        CPtiEngine *iEngine;
        CPtiQwertyKeyMappings* iQwertyKeyMappings;

// Source file
#ifdef __SERIES60_30__
TUint CMyCtrl::GetTranslatedKey(TInt aScanCode)
{
        if (iEngine == NULL)
        {
                iEngine = CPtiEngine::NewL(/*ETrue*/);
                CPtiCoreLanguage* iCoreLanguage = static_cast<CPtiCoreLanguage*>
                        (iEngine->GetLanguage(User::Language()));

                // Get the keyboard mappings for the language
                iQwertyKeyMappings = static_cast<CPtiQwertyKeyMappings*>
                        (iCoreLanguage->GetQwertyKeymappings());
        }

        TPtiKey key = (TPtiKey)aScanCode;

        // gets something like "aáªäàâãåæe", but first is (we think?) what we want
        TBuf<64> result;               
        iQwertyKeyMappings->GetDataForKey(key, result, EPtiCaseLower);
        return result[0];
}

Tue, 2007-08-21 06:26
Joined: 2007-08-20
Forum posts: 21
Re: Alpha keys vs. numeric keys (on Nokia E61)

we r using CEikGlobalTextEditor and CEikRichTextEditor, and both r working fine on E61/N73/N80 etc.

editor->ConstructL(this, 1, 16, EAknEditorFlagNoEditIndicators | EEikEdwinNoWrap, EGulFontControlAll, EGulNoSymbolFonts);
editor->SetAknEditorCase(EAknEditorLowerCase);

saur

Tue, 2007-08-21 19:38
Joined: 2004-05-29
Forum posts: 149
Re: Alpha keys vs. numeric keys (on Nokia E61)

we r using CEikGlobalTextEditor and CEikRichTextEditor, and both r working fine on E61/N73/N80 etc.

This message thread is not referring to the standard text editors, it is referring to custom CCoeControls.

-euroq

  • Login to reply to this topic.