×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Regular Contributor
    Join Date
    Nov 2007
    Posts
    159

    Multi key capturers

    Hi,

    I've looked into this link in Wiki, which shows how to capture all keys, and I have a question about it:

    In order to allow the focused application to receive the key event, the following lines are inserted into RunL:

    Code:
    			TInt wgId = iWsSession.GetFocusWindowGroup();
    			iWsSession.SendEventToWindowGroup(wgId, e);
    Now, what happens if 2 different applications run this code? Will the focused application receive the event twice?

    Thanks,
    Nadav

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,672

    Re: Multi key capturers

    In fact you could have simply tried it. Or just read
    Quote Originally Posted by SDK Help, guess where
    Note that a window group can call this function more than once (to request capture for more than one key), and more than one window group may have requested key capture. If multiple window groups have requested to capture the same key using this function, the key is sent to the window group that most recently requested the key capture.

  3. #3
    Regular Contributor
    Join Date
    Nov 2007
    Posts
    159

    Re: Multi key capturers

    Quote Originally Posted by wizard_hu_ View Post
    In fact you could have simply tried it. Or just read
    First of all, thanks for the response.

    Second, I've indeed missed the documentation, so apologies for that.

    Third, what I really want to do is to identify user activity and inactivity. I've been using the RTimer::Inactivity trick, described in Wiki (here), but that API regards messages such as "Battery full", "Disconnected" as activity, even if user does not touch the phone at all.
    So, is it possible to always get notified when user presses any key, regardless of whether or not other applications capture keys or not?

    Thanks again,
    nadav

  4. #4
    Nokia Developer Moderator
    Join Date
    Oct 2006
    Location
    Finland
    Posts
    4,533

    Re: Multi key capturers

    I think you should look at User instead of RTimer...Maybe thats what you are looking for??

  5. #5
    Regular Contributor
    Join Date
    Nov 2007
    Posts
    159

    Re: Multi key capturers

    Quote Originally Posted by Symbian_Neil View Post
    I think you should look at User instead of RTimer...Maybe thats what you are looking for??
    Are you referring to User::InactivityTime()? If so, then the WIKI example I was referring to uses both User::InactivityTime() and RTimer::Inactivity(). Are you referring to something else?

    Thanks,
    Nadav

  6. #6
    Nokia Developer Moderator
    Join Date
    Oct 2006
    Location
    Finland
    Posts
    4,533

    Re: Multi key capturers

    Quote Originally Posted by nadav70 View Post
    Are you referring to User::InactivityTime()? If so, then the WIKI example I was referring to uses both User::InactivityTime() and RTimer::Inactivity(). Are you referring to something else?

    Thanks,
    Nadav
    I dont remember(no environment in this pc to help me either with my memory :( ), but could you check with the user and see if any methods suit you, I have this feeling that, it does have something for you.

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

    Re: Multi key capturers

    Quote Originally Posted by nadav70 View Post
    So, is it possible to always get notified when user presses any key, regardless of whether or not other applications capture keys or not?
    Unfortunately I would guess that is not possible entirelly with public API-s. For example it could easily happen that there is a simple Publish and Subscribe property for that, but I do not know.

  8. #8
    Regular Contributor
    Join Date
    Nov 2007
    Posts
    159

    Re: Multi key capturers

    Quote Originally Posted by wizard_hu_ View Post
    Unfortunately I would guess that is not possible entirelly with public API-s. For example it could easily happen that there is a simple Publish and Subscribe property for that, but I do not know.
    Ok, thanks a lot for your effort :).

    Nadav

Similar Threads

  1. Replies: 8
    Last Post: 2009-01-24, 06:00
  2. List of Codes for Buttons
    By skela in forum Symbian Tools & SDKs
    Replies: 2
    Last Post: 2008-05-20, 20:39
  3. Replies: 0
    Last Post: 2003-11-14, 07:58
  4. Key Event Issues
    By mykes in forum Symbian
    Replies: 0
    Last Post: 2003-05-01, 10:55
  5. keybindings nokia7650 and nokia6310i
    By topisystems in forum Mobile Java General
    Replies: 1
    Last Post: 2002-06-05, 14:25

Posting Permissions

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