Author Topic: [v1.7.3] Using a media key breaks window switching  (Read 1664 times)

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
[v1.7.3] Using a media key breaks window switching
« on: January 22, 2019, 08:16:22 PM »
Here's a bizarre one: If a media key(Tested with Play/Pause, Stop, Next Track, and Previous Track) is pressed, switching window focus using the "Perform a Window Function" action's Display option's "Show" setting stops working(about a second later).
There is an attempt still, as the entries in the taskbar will blink, but focus will not actually change.

Switching to another profile(Or using the "Reset the Active Profile" action) makes window switching work again(but pressing a media key will make it break again, until the profile is switched).
Modifying the profile(E.G. adding/removing commands) does not allow window switching to work again.

Even weirder still: If switching has been broken, restarting VoiceAttack will make it break a second after loading the profile. Only switching to another profile and back will make it work again.

Also: While switching is broken, if focus is changed to VoiceAttack's main window, switching works once for each window, but only once(they gain focus, but if focus is switched to another window they will not be able to regain focus).



This does not affect focus switching using other means, such as Alt-Tab or clicking the windows or their taskbar entries.


I encountered the issue in a different profile, using different applications to switch between, but I tested with Notepad and Calculator using fresh profiles and can replicate it.

Profile used for testing is attached.


EDIT: After rebooting again, I notice window switching is actually broken already, without touching any media keys.
I also noticed this occurs when using the volume controls on my keyboard.

I did also try this with the keyboard manufacturer's macro software stopped.

EDIT#2: VoiceAttack sending a media keypress(to the active window, even if that's either of the target applications or VoiceAttack itself) does not trigger this issue.

EDIT#3: Also applies to v1.7.3.1

EDIT#4: Also applies to v1.7.5.32 and earlier

Doing some further testing, using the "Send command to this target" option, or running the "Perform a Window Function" action with "Set command to target this window", then sending a keypress (E.G. Left Alt) will bring up the window correctly even after pressing media keys.
After doing so, the "Perform a Window Function" will once again work correctly (in other commands, or even within the same instance), even without sending a keypress; Until a media key is pressed again.

This provides a workaround where I can perform a keypress to the first window that's focused, which will then allow all subsequent "Perform a Window Function" actions to function.
« Last Edit: June 05, 2019, 06:42:13 PM by Pfeil »

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2832
Re: [v1.7.3] Using a media key breaks window switching
« Reply #1 on: February 06, 2019, 07:44:47 PM »
Hmmm.  I'm not able to reproduce this (using your profile) - with and without a media player (like Spotify or VLC) running.  Also tried it while rapidly pressing media keys and was able to jump between apps with voice commands.  I did notice that a popup windows appears when I press my media keys in Win 10 when Spotify is open - but everything seems to run like I would expect it to.  You *did* move to Win 10, right?

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: [v1.7.3] Using a media key breaks window switching
« Reply #2 on: February 06, 2019, 08:17:20 PM »
You *did* move to Win 10, right?
Nah, why would I use something that's a thousand nine-hundred and ninety versions out of date? Windows 2000 is where it's really at!


Yes, yes I did ::)

If it's just my machine, I'll consider that a good thing.