Make RDP ignore keyboard media keys

Does anyone know if it is possible to either make RDP ignore media keys (ie let the local system process them rather than the remote system), or capture them before RDP processes them, and send them directly to the local system?

Basically I have a setup in which I have a media player playing music on my local system, and when I RDP into various systems I want to still be able to control the media player with the media keys, rather than the remote system interpreting them.

I found one solution that utilises a small app on the remote machine that captures the media keys (well, configurable for any keystroke) and sends them back to an agent on the local system. It seems a rather convoluted way and since I RDP into VMs or KVM switches I.E. not always a Windows RDP host directly I can't run the client-side app on them.

Any suggestions would be welcomed.

TIA


Solution 1:

AFAIK this isn't possible. The Windows RDP clients do not allow this level of granularity for keyboard input.

Solution 2:

I've written an AutoHotkey script which captures the media keys locally, so they don't get sent to the remote system:
https://github.com/neon-dev/RDPHotkeyHelper
It also handles some other keys, but you can easily disable or modify them as explained in the readme file.