Keyboard shortcut doesn't work when the app is in background

Questions about Wine on Linux
Locked
InfinitelyCrazy
Newbie
Newbie
Posts: 3
Joined: Sun Nov 05, 2017 5:59 am

Keyboard shortcut doesn't work when the app is in background

Post by InfinitelyCrazy »

I have installed a windows application called "Zello" in Wine. I want to use it to chat with my friends while gaming. So I assigned a keyboard shortcut in Zello to activate the push-to-talk function. (key - "F"). Everything is working fine when the Zello window is open and focused. But the keyboard shortcut doesn't activate the push-to-talk function when the Zello window is minimized or unfocused. That means I cannot use the Zello app to talk to my friends while I'm playing a game. :(
I can't use a different voice chat application at the moment because all of my friends are using Zello.

I would appreciate if someone could help me fix this issue. Thanks in advance.

I am using Kubuntu 17.10, Wine 2.0.2, and Zello 1.81

(I also tried Zello on a Windows machine with the same keyboard shortcut for push-to-talk function, and the same game. It works fine in Windows)
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: Keyboard shortcut doesn't work when the app is in backgr

Post by Bob Wya »

@InfinitelyCrazy

It's a known issue with wineserver - that it doesn't pass device input (keyboard presses, mouse clicks, etc.) to minimised Windows.
You best bet is to capture your global hotkey (F) with a Windows scripting utility, like AutoIt or AutoHotKey, and pass it on to the handle of the unfocused Zello Window.

I've had some experience with using AutoIt - if you get stuck... 8)

Bob
InfinitelyCrazy
Newbie
Newbie
Posts: 3
Joined: Sun Nov 05, 2017 5:59 am

Re: Keyboard shortcut doesn't work when the app is in backgr

Post by InfinitelyCrazy »

Bob Wya wrote:@InfinitelyCrazy


You best bet is to capture your global hotkey (F) with a Windows scripting utility, like AutoIt or AutoHotKey, and pass it on to the handle of the unfocused Zello Window.

Bob

I tried AutoHotkey. The problem is, AutoHotkey also doesn't recognize the keys. Maybe because the script runs minimized in the system tray. :?
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: Keyboard shortcut doesn't work when the app is in backgr

Post by Bob Wya »

InfinitelyCrazy wrote:...
I tried AutoHotkey. The problem is, AutoHotkey also doesn't recognize the keys. Maybe because the script runs minimized in the system tray. :?
Hmmm... I feared that might be the case... :cry: :?

Then it would probably have to be a hybrid solution using:
  • xdotool to capture global keypress
  • AutoIt or AutoHotKey executable/script to handle the Wine keyboard management
Since the xdotool X11 automation tool - doesn't really play nice with applications running under Wine...

Bob
InfinitelyCrazy
Newbie
Newbie
Posts: 3
Joined: Sun Nov 05, 2017 5:59 am

Re: Keyboard shortcut doesn't work when the app is in backgr

Post by InfinitelyCrazy »

Thanks for helping me Bob. I use Mumble for gaming now. It's way better than Zello and it supports all the popular operating systems. So no need to configure Zello anymore. :D Yay.
Anyways, I hope Wine will have some solution to this problem in a future version.
Locked