×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Regular Contributor
    Join Date
    Sep 2008
    Location
    Karachi, Pakistan
    Posts
    98

    Power Key press when device is locked

    Hi,

    Can we listen to Power Key press when device is locked. I am getting code 21 some times twice or thrice. It also gives same code (21) on press of Menu button. Can we differentiate between these keys when device is locked?

    Secondly, I want to check the key press and hold for certain period of time, for e.g. 1/4 of second. Can we detect when Power key released (when device is locked) ? As currently I am getting the key code when the power key is pressed but not on release.

    I am using C7 with Symbian Anna.

    Regards,

    Jawad.

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

    Re: Power Key press when device is locked

    AFAIK you should not get any event, since when the device keylock is on, the focus app (key loack) should get all events. Basically then to get the key event, you should use key capturing with high capturing priority.

  3. #3
    Registered User
    Join Date
    Jan 2005
    Location
    Italy
    Posts
    639

    Re: Power Key press when device is locked

    And about long key press, i found a thread once, maybe is what you are looking for:
    http://www.developer.nokia.com/Commu...-animation-dll
    hope it helps
    regards
    pg

  4. #4
    Regular Contributor
    Join Date
    Sep 2008
    Location
    Karachi, Pakistan
    Posts
    98

    Re: Power Key press when device is locked

    Hi,

    Thank you for response. I tried with KeyCapturer wiki example which is using RWindowGroup::CaptureKey() method. Using this I am able to receive the events (even when device is locked), but every time same TWsEvent code received, on pressing the Camera, Menu and Power buttons. The code is 0x515ca8. To check the codes of these buttons I am capturing all EKeyDevice[xx] codes from EKeyDevice1 to EKeyDevice27.

    How can I differentiate between these buttons codes?

    PS. I am using this in Qt and on C7 device.

    Regards,

    Jawad.

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

    Re: Power Key press when device is locked

    If you are checking iCode, it may be a good time to check iScanCode too.

Similar Threads

  1. Capture long key press in E75 when keypad is locked
    By pedramz in forum Symbian C++
    Replies: 2
    Last Post: 2009-11-22, 17:27
  2. long press when keypad is locked
    By a.alsayed in forum Symbian C++
    Replies: 1
    Last Post: 2009-11-22, 16:23
  3. Replies: 14
    Last Post: 2009-11-16, 13:16
  4. Can a background application detect a key press when keypad is locked??
    By rohanwaugh in forum Symbian User Interface
    Replies: 17
    Last Post: 2009-08-14, 10:20

Posting Permissions

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