https://bugs.winehq.org/show_bug.cgi?id=54301
Bug ID: 54301 Summary: Global hotkey support Product: Wine Version: 7.22 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: linux@bernd-steinhauser.de Distribution: ---
My original use case is the head tracker linuxtrack that can be used to control camera movements in e.g. racing simulators or flight simulators. linuxtrack provides a wine bridge to be able to use it with games run via wine. https://github.com/uglyDwarf/linuxtrack
The wine bridge provides a controller application that is makes use of two hotkeys to pause and to recenter the tracker. These are not essential to use it (i.e. it works without), but they make the usage much more convenient. The problem is that the hotkeys only work when the controller application has the focus, which obviously is usually not the case, since you're using it just as a background application while running a game. So if I e.g. want to recenter the tracker, I have to Alt+Tab out of the application to do that. Unfortunately, some applications don't really like that and it could result in all kinds of problems, including crashes.
Since that use case is very specific and might not be easily accessible to everybody (you need hardware for it), I looked at another use case and that is foobar2000. foobar2000 is a popular media player for Windows and as a media player, it makes of course usage of hotkeys, both within the application and global ones. So I installed it into a wine prefix using the latest version, assigned a hotkey to a functionality (e.g. play/pause), made that global and tried if it works and it does not. Or, to be more specific, it works as long as the window has focus (and thus gets keyboard input). As soon as the window is in the background, it doesn't work anymore. (I'm using KDE Plasma on X11 with kwin as the compositor, in case that matters.)
Now, I spent quite some time trying to research the subject and was actually surprised by how little information I could find. Especially, I wasn't able to find anything in the wine documentation whether global hotkeys (or keyboard shortcuts) are supposed to work or not. Thus, I am actually still not sure whether this is a feature request or a bug. (I suspect it's the former, but I don't know.) I did find one tutorial that did suggest using xdotool, but this should possibly called xdodotool, since it's more or less dead. In any case, it surely wouldn't be future-proof, since everything is slowly heading towards wayland (and xdotool won't work there).
Since there are many tools out there that are used alongside games, be it scripting tools, controller tools or various mods/addons, I think that some kind of support for global hotkeys would be really good.
https://bugs.winehq.org/show_bug.cgi?id=54301
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |austinenglish@gmail.com