×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Jan 2010
    Posts
    25

    Question Simulating Menu key

    Hi,

    I use S60 3rd Edition FP2 SDK.

    I'm trying to simulate key press of 'Menu'-key on the main screen of phone.

    Simulation of keys in other screen works but the 'Menu' key press on the main screen alone is not working.

    How to do this?

    Please help.

    Thanks.

  2. #2
    Registered User
    Join Date
    Jul 2007
    Location
    Noida
    Posts
    1,503

    Re: Simulating Menu key

    Quote Originally Posted by sathyr View Post
    Hi,

    I use S60 3rd Edition FP2 SDK.

    I'm trying to simulate key press of 'Menu'-key on the main screen of phone.

    Simulation of keys in other screen works but the 'Menu' key press on the main screen alone is not working.

    How to do this?

    Please help.

    Thanks.
    try to simulate EKeyMenu. Search in Wikki about this
    Regards,
    Amit


    ****"Putting a Smile on other's faces is the essence of true Happiness"****

  3. #3
    Registered User
    Join Date
    Jan 2010
    Posts
    25

    Re: Simulating Menu key

    Hi,

    I tried using EKeyMenu, but the result is that of Menu long press (active applications list)

    I'm trying to launch LSK for the current active window.

    Find below my code for LSK activation. It works fine for other SDK's.

    Even on SDK 3rd Edition FP2 it is fine, except when the active window is the initial phone screen with Menu button(home screen).

    How to solve this?
    ___________________________________________________________

    TWsEvent lEvent;
    RWsSession lWsSession;

    User::LeaveIfError(lWsSession.Connect());

    TInt lId = lWsSession.GetFocusWindowGroup();

    if (lId == KErrNotFound)
    return;

    lEvent.SetType(EEventKey);
    lEvent.SetTimeNow();

    lEvent.Key()->iCode = EKeyCBA1;
    lEvent.Key()->iModifiers = 0;
    lEvent.Key()->iRepeats = 0;
    lEvent.Key()->iScanCode = EStdKeyNull;

    lWsSession.SendEventToWindowGroup(lId, lEvent);
    lWsSession.Flush();
    lWsSession.Close();
    _____________________________________________________________

  4. #4
    Registered User
    Join Date
    Jun 2008
    Location
    Pune, India
    Posts
    18

    Re: Simulating Menu key

    Hi,

    TO simulate Menu key you can try ScanCode as EStdKeyApplication0. To get it working from all the screen try to simulate it using UserSvr::AddEvent(TRawEvent).

    I hope this will serve your requirement.

    Thank You

Similar Threads

  1. simulating key in s60 3rd edition
    By sid_diu in forum Symbian
    Replies: 4
    Last Post: 2009-07-25, 10:38
  2. Replies: 6
    Last Post: 2009-07-22, 09:44
  3. Capture menu key
    By strike_noir in forum Symbian User Interface
    Replies: 1
    Last Post: 2008-08-11, 16:34
  4. APPLICATION MENU with left selection key???
    By sagars in forum Symbian
    Replies: 13
    Last Post: 2008-07-24, 07:34
  5. menu from select key press.
    By engrsanjiv in forum Symbian
    Replies: 0
    Last Post: 1970-01-01, 02:00

Posting Permissions

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