×

Discussion Board

Results 1 to 2 of 2
  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 tried with QApplication::symbianEventFilter(const QSymbianEvent *event) but it gives 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 ? As currently the symbianEventFilter() sends the key code when the power key is pressed but not on release.

    I am using C7 with Symbian Anna.

    Regards,

    Jawad.

  2. #2
    Regular Contributor
    Join Date
    Oct 2008
    Location
    Oslo, Norway
    Posts
    329

    Re: Power Key press when device is locked

    I don't think you can solve this with symbianEventFilter or any other Qt API. For your application to receive key events even when in background/active keylock you'll need to request key capture from window server session as discussed here. But if I remember correctly, power key might be off-limits for key capture as it's reserved for sysapp.

Similar Threads

  1. Replies: 2
    Last Post: 2009-11-22, 17:27
  2. long press when keypad is locked
    By a.alsayed in forum Symbian
    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
  5. Replies: 4
    Last Post: 2009-04-29, 11:22

Posting Permissions

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