×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    May 2007
    Location
    Miami
    Posts
    4

    Question Send Keystrokes to screen

    Hi,
    I'm a newbie to Symbian. Trying to write some code to send keystrokes / key events to screen. Basically if the user presses 1 then 1 should be displayed on the screen, and so on.

    My HandleKeyEvent is as follows:

    TKeyResponse CMyPhoneAppAppUi::HandleKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType)
    {
    if(aType == EEventKey)
    {
    // if number key 1
    if(aKeyEvent.iScanCode == EStdKeyNkp1)
    {
    RStringBuf t;
    t.CopyLC( _L("1") );
    //t.AppendFillL( 'a', 1 );
    CAknInformationNote* infoNote;

    infoNote = new ( ELeave ) CAknInformationNote;
    infoNote->ExecuteLD(t);
    CleanupPopAndDestroy( t );

    }
    // do nothing
    }
    return EKeyWasConsumed;
    }

    Could somebody help me with how to get it to display on the UI of my Application.

    Thank u
    k9p4

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,166

    Re: Send Keystrokes to screen

    just add the UI-Container into the Control stack inyour Appui-class, and then implement the OfferKeyevent function to catch the kays. You could then append the keys in a Buffer (that is member variable of your class) and draw it to the screen in Draw-function with the function provide by the Gc.

    yucca

  3. #3
    Registered User
    Join Date
    May 2007
    Location
    Miami
    Posts
    4

    Re: Send Keystrokes to screen

    yucca,

    this may seem kinda annoying but can u walk me through this, please.

    Regards
    k9p4

Similar Threads

  1. GPRS connection problems on 6600..
    By suckho in forum Symbian Networking & Messaging (Closed)
    Replies: 10
    Last Post: 2005-12-02, 14:00
  2. Nokia 6600 Socket Server send delay Problem
    By dicson_hu in forum Mobile Java Networking & Messaging & Security
    Replies: 1
    Last Post: 2005-10-31, 07:37
  3. Replies: 3
    Last Post: 2005-07-22, 02:35
  4. Multiple Screen
    By thephong in forum Symbian Tools & SDKs
    Replies: 0
    Last Post: 2005-05-11, 06:27
  5. Replies: 0
    Last Post: 2003-04-13, 23:59

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×