[Wine] Re: Functionality with SetWindowsHookEx WH_JOURNALPLAYBACK
wineforum-user at winehq.org
Wed Oct 19 22:22:27 CDT 2011
> It might be useful to post the terminal output when running our app with wine (run it from console, if you don't do already). There should be some error messages from wine, especially if it doesn't run at all.
I did fresh install from wine repositories and followed your suggestions. It worked and application is running Fine with Latest Wine. But the Key stuffing is still not working. I am creating a small application with the problematic functionality only for posting here. While posting exe and sources of that I will post console output too.
> Can you explain in simple words, why you need SetWindowsHookEx?
> I assume, you want the user to be able to control your application by pressing certain keys, even if the application doesn't have focus (could your app keep the focus?).
As explained earlier the application under consideration is a data entry centric application where many times some repeated phrases are need to be keyed in. Since work is to be finished in limited time frame data entry operators requested us to built key stuffing functionality in application when a particular shortcut key is pressed like say <ctrl><shift> B will paste "Bank Of India, Kolhapur Branch" in edit which has keyboard focus. In some cases it automates work like shift to other application copy to clipboard current selection, again shift back and paste. But this usage is very limited and users are ready to sacrifice it while shifting to wine, but not the key stuffing as explained above.
> One possible workaround for linux might be to extend your app with a socket, that accepts commands (in form of text messages like "play"). Additionally you'd need an xlib application running in the background, that captures keyboard events, like in  or . After the user pressed a key for play, the xlib application would have to connect to the port of your app, sending the command "play", then your app could do the necessary stuff. This approach comes without warranty, I'm not sure, if it would work perfectly. And it would be some work, but probably the best you can do, if you need it running in a few weeks on linux (without Windows VMs).
>  http://stackoverflow.com/questions/4037230/global-hotkey-with-x11-xlib
>  http://kaizer.se/wiki/keybinder/
Well we have thought of another alternative is generating Keyboard messages for keys to stuff since inter application functionality can be dropped. We plan see how SetWindowsHookEx can be resolved for couple of days then think of alternatives. Thanks for suggesting an option we will definitely explore it along with other options since many of our applications use this functionality since its part of our common application framework which we use for development of applications and its one of our USPs, so we are very serious on this functionality.
Thanks and warm regards
More information about the wine-users