Jump to content
Corsair Community

Shortcuts out of focus


ilucha

Recommended Posts

Hey guys!

 

I have a K95 Plat and am loving it! Problem is: Programmes which are started by hotkeys are out of focus...

 

In my case it is Teamspeak, which is started by the G2 key. Unfortunally it does start in the background and I have to manually select the windows to use it. The hotkey feature is kinda pointless then, because I could just look up the icon in the start menu.

 

How to reproduce:

For example open a browser in fullscreen. Then start up a programme (in my case it is TS3) with a hotkey which you have set in iCUE (in my case G2). Watch how the browser is still in focus and in foreground, while teamspeak is openend but is out of focus and in the background.

 

Very annoying thing and it makes me mad everytime I use the hotkeys.

 

Please add a tickbox or some kind of option to the programme hotkey setting so the user can decide if he wants to start the programme in fore/background.

Link to comment
Share on other sites

...Please add a tickbox or some kind of option to the programme hotkey setting so the user can decide if he wants to start the programme in fore/background.

 

Good suggestion. Have you tried this in icue? I have heard of this with others previously, but i tried in latest icue just now and it seems to work (mostly I got it to fail about 20% of the time and I had chrome open and bound ctrl to open canary and it would do the right thing if all i hit was ctrl, but i accidentally tried ctrl v to paste code below and it didnt stay in focus, i assume because windows or chrome stole focus back as there was additional input pending?).

 

My interim suggestion if that fails is to have Autohotkey installed and try something like this (only photoshop by way of example):

 

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input
SetWorkingDir %A_ScriptDir%
IfWinNotExist, ahk_exe Photoshop.exe
run "C:\Program Files\Adobe\Adobe Photoshop CC 2018\Photoshop.exe"
IfWinExist ahk_exe Photoshop.exe
WinActivateBottom ahk_exe Photoshop.exe
return
Exit

 

That should bring the application into focus, if it doesn't exist run it and then bring it up and as an added bonus, prevent duplicate instances. You can save the file as a .ahk, right click to compile it and link to it within CUE/iCUE, it is a bit of a pain but it will work great in CUE or even if you wanted to run it from an elgato or infinitton in the future.

 

With varying success you may be able to do this only once and use it with a parameter with the following:

 

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input
SetWorkingDir %A_ScriptDir%
;"C:\Program Files\SketchUp\SketchUp 2018\SketchUp.exe"
;c:\Users\username\Desktop\acRun.ahk "C:\Program Files\SketchUp\SketchUp 2018\SketchUp.exe"
fullPathToExecutable=%1%
SplitPath, fullPathToExecutable, OutFileName, OutDir, OutExtension, OutNameNoExt, OutDrive

IfWinNotExist, ahk_exe %OutFileName%
run %fullPathToExecutable%
;MsgBox %OutFileName%
IfWinExist ahk_exe %OutFileName%
WinActivateBottom ahk_exe %OutFileName%
return
Exit

Link to comment
Share on other sites

While I do appreciate you giving me a workaround or kind of fix, I'm still not satisfied Corsair did not "fix" this problem. I can not imagine, that I am the only one who is annoyed by this bug?

 

Worst of all is, Corsair most probably do not notice, that this bug annoys people and thus can not really do something against it... :(

 

I specifically switch from the Logitech G910 to the K95 Plat to have more freedom and more customization but unfortunaly it is not what I have expected. This bug + the epileptic rainbow flashing form the LL fans is a like a punch to the celiac plexus.

 

Btw I did find a similar thread where someone had a similar request and the answer was , that it will be looked over (or something like this). That was many months ago, still nothing changed :)

Link to comment
Share on other sites

https://blogs.msdn.microsoft.com/jfoscoding/2006/08/02/win32-activation-and-focus/

 

https://msdn.microsoft.com/en-us/library/windows/desktop/ms646311(v=vs.85).aspx

 

https://msdn.microsoft.com/en-us/library/windows/desktop/ms646312(v=vs.85).aspx

 

All seem relevant to this discussion, I assume they use this or some other Qt library spin off to shell execute or system execute like the below

 

http://www.cplusplus.com/reference/cstdlib/system/

 

and then hopefully return the task id or PID and maybe that's when it trys to take focus? hard to know on our end but I could only reproduce the problem some of the time, so that can be a tricky thing to fix if it does not happen to them. I tried it like fifteen times in a row successfully and then only sometimes it would fail.

Link to comment
Share on other sites

Thanks for investigating the problem!

Now I am a step further in knowing, that this is a problem not only iCUE has to fight with?

 

Nevertheless, how come other programmes like logitechs software does it right and iCUE don't?

And I don't see a way to communicate to Corsair directly to tell them about this issue, so it will be burried here in the forums... very unfortunate.

 

Btw, how come no one else has these problems? People not using the hotkeys ?

Link to comment
Share on other sites

Thanks for investigating the problem!

Now I am a step further in knowing, that this is a problem not only iCUE has to fight with?

 

Nevertheless, how come other programmes like logitechs software does it right and iCUE don't?

And I don't see a way to communicate to Corsair directly to tell them about this issue, so it will be burried here in the forums... very unfortunate.

 

Btw, how come no one else has these problems? People not using the hotkeys ?

 

First, just because Corsair doesn't directly respond doesn't mean that they don't see what's going on.

 

As far as this issue ... you mentioned that this happens with TeamSpeak. Do you have the same issue with other applications? I, for one, have programs set to my macro keys as well but I don't see this issue. At all. Ever. So perhaps it's a problem with TeamSpeak? Something that TeamSpeak does that's odd? Is there maybe a command line switch for TeamSpeak that would launch it in the foreground?

 

As you noted, this isn't a common complaint.

Link to comment
Share on other sites

I can now confirm the only time I am able to reproduce this is when I run a non trivial program and I am currently registering input inside the first application.

 

I am not the op, but I could not make it fail running notepad, but running Google Chrome Canary while on the forums here and while mashing keys I threw in a execution hotkey just to test and I could get it to not be in the foreground occasionally.

 

Teamspeak is certainly not trivial compared to notepad. Were you running a game or something in the foreground?

Link to comment
Share on other sites

First, just because Corsair doesn't directly respond doesn't mean that they don't see what's going on.

 

I'm not so sure about that.

 

As far as this issue ... you mentioned that this happens with TeamSpeak. Do you have the same issue with other applications?

 

Basically every programme I have on my hotkeys: TeamSpeak, Whatsapp, Calculator, Mail.

When I'm in Chrome and browsing and then suddenly want to calculate something or check my mail or whatever, they start -behind- the active Chrome window (I got 2 Chrome windows side by side). So essentially I have to use my mouse/keyboard combos to get the programme into foreground which sucks and defeats the purpose of starting a programme via hotkey.

 

Is there maybe a command line switch for TeamSpeak that would launch it in the foreground?

 

I'm not sure, because I have this background/foreground problem with all programmes as noted above.

 

As you noted, this isn't a common complaint.

 

How come it works for some apparently and for some not? It can't be the settings, because there are none. Also tried running iCUE in admin mode but the problem persists.

 

I can now confirm the only time I am able to reproduce this is when I run a non trivial program and I am currently registering input inside the first application.

 

Just tried it with Spotify in the foreground and the programmes still start in the background. Also, same problem when the active window is WhatsApp or any other programme.

 

Were you running a game or something in the foreground?

 

No, I'm simply browsing and listening to music. Basically the standard user behaviour. BTW I'm on the latest update on Windows 10 and also on iCUE.

Kind of strange error but it is driving me insane, because it is such a wonderful thing when it works.

Link to comment
Share on other sites

I'm not so sure about that.

 

I am absolutely, positively, 150% sure of that.

 

Basically every programme I have on my hotkeys: TeamSpeak, Whatsapp, Calculator, Mail.

When I'm in Chrome and browsing and then suddenly want to calculate something or check my mail or whatever, they start -behind- the active Chrome window (I got 2 Chrome windows side by side). So essentially I have to use my mouse/keyboard combos to get the programme into foreground which sucks and defeats the purpose of starting a programme via hotkey.

Does this happen when you aren't running Chrome?

By the way, can you fill out your full system specs?

 

How come it works for some apparently and for some not? It can't be the settings, because there are none. Also tried running iCUE in admin mode but the problem persists.

 

First, this is the first I've seen this issue on the forum. One other user repro'd it in a very narrow, lucky use case. So now let's see if we can figure out why it's happening to you. If this was common, I can guarantee you that people would be screaming on the forums here.

 

No, I'm simply browsing and listening to music. Basically the standard user behaviour. BTW I'm on the latest update on Windows 10 and also on iCUE.

Kind of strange error but it is driving me insane, because it is such a wonderful thing when it works.

 

I understand that it's frustrating. But getting angry with folks that are trying to help out isn't really a good strategy, IMHO. YMMV.

Link to comment
Share on other sites

UPDATE: This appears to be a Chrome issue, not necessarily an iCue issue. I was able to reproduce this but only when running Chrome.

 

It happens with other apps only when they have the input focus already, which is actually proper behavior under Windows CUI guidelines (don't steal input focus from apps that already have it).

 

From there, I can assume that Chrome is taking control of the input focus whether you actually have focused the input cursor onto Chrome or not, which is pretty rude.

Link to comment
Share on other sites

UPDATE: This appears to be a Chrome issue, not necessarily an iCue issue. I was able to reproduce this but only when running Chrome.

 

It happens with other apps only when they have the input focus already, which is actually proper behavior under Windows CUI guidelines (don't steal input focus from apps that already have it).

 

From there, I can assume that Chrome is taking control of the input focus whether you actually have focused the input cursor onto Chrome or not, which is pretty rude.

 

It makes sense honestly, what if you were putting in your bank password in one tab and just before you started typing, another tab had a security flaw that allowed remote code execution and a program or even another browser or tab opened, it could capture that input and poof your PW is not secure.

 

For what it is worth, I have another macro program that i just tested, LGS and it works the same exact way on different hardware - leading us to the conclusion DevBiker said above, that its Chrome or the application in the foreground who is 'to blame' for retaining focus.

 

If you truly want to get around it, you're better off installing autohotkey and trying my second script above, where you can pass a program as a parameter. It should bring it to the foreground and you can change the parameter in each macro inside CUE. Let me know if you have trouble with that.

Link to comment
Share on other sites

I understand that it's frustrating. But getting angry with folks that are trying to help out isn't really a good strategy, IMHO. YMMV.

 

I'm not getting angry at anyone, especially at people who try to help me but giving me these "company XYZ is 1896% reading the forums" is unnecessary.

It's the same with the LL blinking/flashing bug which was fixed after around 2 months (maybe not exactly 2 months :P) and the forum was full of threads. Apparently it was being worked on but come on...I'm not buying anything they say. having enough time to implement SW for a few new products is doable but fixing one major problem everyone has is not? I learned to only believe it when I see it,

 

UPDATE: This appears to be a Chrome issue, not necessarily an iCue issue. I was able to reproduce this but only when running Chrome.

 

It happens with other apps only when they have the input focus already, which is actually proper behavior under Windows CUI guidelines (don't steal input focus from apps that already have it).

 

From there, I can assume that Chrome is taking control of the input focus whether you actually have focused the input cursor onto Chrome or not, which is pretty rude.

 

I do understand what you are trying to say but sometimes I get the focus on the programme I launch via hotkeys and somtimes not (even if I type something into Chrome to get input focus, tried with multiple sites). It kind of is hit or miss if the launcher programme is in back/foreground. But at least I know, that iCUE is "not" the troublemaker.

 

... Let me know if you have trouble with that.

 

Thanks for the alternative! Bookmarked this thread so I can come back to it when it nags me too much :)

Link to comment
Share on other sites

  • 2 months later...
  • 11 months later...

I can confirm that the problem still persists.

Not only using chrome but with every other software in my screen, the "GKey" will open shortcuts on background.

I'm using the latest win10 version, i have trhe same problem on 3 different pc.

 

a 10 minutes search on google showed me that this is a common problem with the iCUE software.

 

This happens ONLY with iCUE: no issues with Logitech (Gaming software), Razer (Synapse) or Microsoft (intellitype) software.

 

Btw the solutions is pretty simple, just create .bat files to recall your desiderd software, then let icue launch the .bat file, for example for notepad++:

 

@ECHO Off

start "" "C:\Program Files\Notepad++\notepad++.exe"

exit

Link to comment
Share on other sites

×
×
  • Create New...