hass-agent / HASS.Agent

Unofficial development project for the HASS.Agent platform.
https://hass-agent.io
MIT License
356 stars 9 forks source link

Bug: With and RDP(Remote Desktop) application in the foreground playback controls do not work #181

Open inphinitizeit opened 1 week ago

inphinitizeit commented 1 week ago

Please make sure that the issue you're planning to report is not already registered :)


Describe the bug With an RDP (Remote Desktop) window in the foreground media playback controls do not function

To Reproduce Steps to reproduce the behavior:

  1. Play audio on the computer running hass.agent
  2. Put an RDP window in foreground
  3. Execute a play/pause command from home assistant

Expected behavior Music pauses on the computer.

Actual behavior The RDP window swallows the key presses and no pause is made on the host computer.

Screenshots If applicable, add screenshots to help explain your problem.

Misc info (please complete the following information):

Please check what's applicable (multiple answers possible):

amadeo-alex commented 1 week ago

I'm afraid that's the "current expected behaviour" - HASS.Agent sends the media keys via SendInput. If RDP is in the foreground is at the top it steals all key/keyboard events.

I'll see if we could use the media player API to do the same but we'd also need to think about players/applications that do not use windows media player api and just listen for keyboard events to support "media keys".