×

Discussion Board

Results 1 to 9 of 9
  1. #1
    Registered User
    Join Date
    Jan 2011
    Posts
    17

    Capture key press event

    Hi..

    I am developing an exe application which should capture key press event

    key 1--> do task 1
    key 2--> do task 2
    --

    http://wiki.forum.nokia.com/index.ph...I_applications

    i am using above example code. but not working. can anybody help me?

    Thanks

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

    Re: Capture key press event

    Which keys, in which device ? Also have you noted the capability ? as well as What is teh actual problem, i.e. what does happen and what does not happen ?

  3. #3
    Registered User
    Join Date
    May 2009
    Posts
    43

    Re: Capture key press event

    hi kararan ,

    u will try this method for observing key events

    HandleKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType);

    for UI application

  4. #4
    Registered User
    Join Date
    Jan 2011
    Posts
    17

    Re: Capture key press event

    Hi.. symbianyucca and renukunta.naveen

    thank you for your reply. it is an exe application

    whai i did was

    1) copied CapturingKeys2.cpp and CapturingKeys2.h
    2)included required LIBRARY and capability


    HTML Code:
    void CTestEngine::ConstructL()
    {
    iKeyCapturer2=CKeyCapturer2::NewL(*this);
    ---
    --
    }
    
    
    
    TBool CTestSEngine:: KeyCapturedL(TWsEvent aEvent)
    {
    Write2file(_L("pressed"), _L("\\data\\keypress.txt"));	
    return ETrue;
    	
    }
    i tested E65 by pressing all key

    Thanks

  5. #5
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,751

    Re: Capture key press event

    Could you check it in the emulator first? (just in this case you may want to force the logfile to drive c: )

  6. #6
    Registered User
    Join Date
    Jan 2011
    Posts
    17

    Re: Capture key press event

    Hi.. wizard_hu_

    thank you for your reply

    in the emulator also it is not working.

    can i try this for an exe application?
    http://wiki.forum.nokia.com/index.ph..._in_background

    thanks

  7. #7
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,751

    Re: Capture key press event

    I have not tried that "capturing all keys" stuff. However the "capturing some keys" works for me, you can find a really compact example in #27 of http://discussion.forum.nokia.com/fo...is-key-capture

  8. #8
    Registered User
    Join Date
    Jan 2011
    Posts
    17

    Re: Capture key press event

    hi..wizard_hu_ , symbianyucca and renukunta.naveen

    it is working. Thank you your support.

    regards
    Karan

  9. #9
    Registered User
    Join Date
    May 2009
    Posts
    43

    Re: Capture key press event

    welcome karan

Similar Threads

  1. Replies: 2
    Last Post: 2009-11-24, 14:57
  2. Unable to capture key press/event
    By narendar_discover in forum Symbian
    Replies: 3
    Last Post: 2009-09-04, 08:17
  3. Temporary stop capture key press
    By nguyend in forum Symbian
    Replies: 2
    Last Post: 2009-08-14, 10:35
  4. Key Press Capture Endless loop
    By GattusoMatrazzi in forum Symbian
    Replies: 1
    Last Post: 2008-01-31, 12:11
  5. How to capture key press and key release events in series 60 for 7650?
    By varshajohn in forum Symbian User Interface
    Replies: 2
    Last Post: 2003-04-30, 13:03

Posting Permissions

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