Find the answer to your Linux question:
Results 1 to 6 of 6
hello all, In my application i grab all the keystrokes and send my keystrokes to the window. But the problem is this i cannot send my keystrokes to their respective ...
  1. #1
    Just Joined!
    Join Date
    Oct 2006
    Posts
    47

    XSendEvent to Child Windows

    hello all,

    In my application i grab all the keystrokes and send my keystrokes to the window. But the problem is this i cannot send my keystrokes to their respective child windows.

    or 1 more problem that i cannot send my keystroke to any Browser window


    please help me,

  2. #2
    Linux Engineer Javasnob's Avatar
    Join Date
    Jul 2005
    Location
    Wisconsin
    Posts
    942
    Are you really sure you want to grab all the keystrokes? That sounds like a really bad idea unless you need to grab the keyboard...

    If you're just trying to get keyboard input for a window (any window, child or no), just use XSelectInput with the appropriate mask.
    Flies of a particular kind, i.e. time-flies, are fond of an arrow.

    Registered Linux User #408794

  3. #3
    Just Joined!
    Join Date
    Oct 2006
    Posts
    47
    thanks javasnob,

    but you dont understand my question,

    i have to grab keys, that is for sure
    there is nothing related to XSelectinput,
    lEventmask = KeyPressMask|
    XSelectInput(gp_display,root_win_app,lEventmask);

    i send proper keystrokes to every window except the Browser window, i dont know why
    but i think there is something related to Child Window problem.

    thanks for taking interest
    if you know please help me

  4. #4
    Linux Engineer Javasnob's Avatar
    Join Date
    Jul 2005
    Location
    Wisconsin
    Posts
    942
    Alright. Could you just give me a quick overview of exactly what you're trying to do? It'd really help me help you!
    Flies of a particular kind, i.e. time-flies, are fond of an arrow.

    Registered Linux User #408794

  5. #5
    Just Joined!
    Join Date
    Oct 2006
    Posts
    47
    iam a final year student of B.E , we are doing our project , In this we replace all keys of English keyboard to our local language , for this I hack all the keys using XGrabKey()
    then i select the events through XSelectInput() and i.e KeyPressMask, then I Grab the rootwindow and give my processed Key events to that window that is having current focus.
    For appliying my local fonts on that place , iam able to type in my local language.

    my project is working fine , the only problem is that i can't able yo send my keyevents to any browser window.

    if you know what is the reason behind this, please reply me

  6. #6
    Linux Engineer Javasnob's Avatar
    Join Date
    Jul 2005
    Location
    Wisconsin
    Posts
    942
    Are you required to use XGrabKeys? I'm sure there are way simplier ways to do what you want...
    Flies of a particular kind, i.e. time-flies, are fond of an arrow.

    Registered Linux User #408794

Posting Permissions

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