Author Topic: How do I control a music player with hotkeys  (Read 3672 times)

Woo_doggy

  • Newbie
  • *
  • Posts: 3
How do I control a music player with hotkeys
« on: April 13, 2019, 09:55:53 PM »
I realise this gets asked all the time but I have tried countless ways of getting this to work. I would really appreciate any suggestions.

I would like to say commands like "pause" "play" "next song" "slow down song" etc. while I play Star Citizen.

You can do all of these commands in VLC media player with hotkeys. You can also set up global hotkeys which should mean you should be able to use them while playing a game.

Unfortunately Star Citizen is not cool with that idea and it makes my PC ignore the VLC global hotkeys while in fullscreen mode. This means my commands don't actually do anything.

I have tried this with foobar2000 and Windows Media Player with the same results.

I can actually get it to work if Star Citizen is in windowed mode and I set the VoiceAttack commands to target VLC. But then it tabs out of the game...

Has anyone actually ever got this to work, specifically in Star Citizen?

Thank you.

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2832
Re: How do I control a music player with hotkeys
« Reply #1 on: April 13, 2019, 11:29:00 PM »
Hi, Woo_doggy.  Just to be clear -  the media keys (global pause/play/next/etc) work for VLC outside of Star Citizen? 

The reason I ask is because VLC requires you to turn that functionality on after you install it (it's not on by default).

Woo_doggy

  • Newbie
  • *
  • Posts: 3
Re: How do I control a music player with hotkeys
« Reply #2 on: April 14, 2019, 07:51:03 AM »
Hi Gary, thanks for the reply

I am using custom global hotkeys rather than the 'media keys' which you find on some keyboards. This is my keyboard actually 8)



I don't use the media keys (grey buttons at top) because I have run out of hope at this point basically lol. It seems like nothing will work. I can't find any step-by-step guide for this.
 
This video shows exactly how I set my hotkeys up.

https://www.youtube.com/watch?v=vWnjFSeFgPk

For example, I have a global 'Pause' in VLC bound to Ctrl+4




My hope was in VoiceAttack I could always keep 'Send commands to this target' as 'Star Citizen'. It seems like that's the easiest way to prevent from VLC borrowing window focus, or tabbing out compeltely. I think other VoiceAttack users got it working like this before, but I can't work it out.

Say I have Window Focus on VoiceAttack and target as 'Active Window'. If I say "Pause track", VoiceAttack pauses the track.

However, VLC always steals window focus despite the fact that it is not the Voice Attack 'target'. I have to click mouse1 to refocus on Voice Attack. I get the same problem with Star Citizen or any other program. So I guess the VLC global hotkeys themselves make VLC steal focus.

I think I read somewhere that AutoHotkey could let me achieve my goal here. Or something called 'Telenet' in VLC. To be honest I don't want to pursue that, because a.) it might make no difference and b.) learning another program to do something as simple as controlling VLC media player is not worth my sanity lol.

There's no guides from 2019 to get it working, and I really need everything spelled out for me with this kind of thing...

I'd appreciate any help but I understand if it's a built-in Windows thing that you have no control over. I joined the discord server if you are ever available to help :)

tl;dr - It would be awesome if you could put music player/VLC integration on your list of planned features ;)

Brigetiol

  • Guest
Re: How do I control a music player with hotkeys
« Reply #3 on: April 16, 2019, 12:06:10 AM »
Hi,

I'm using VLC with VoiceAttack too.

I had the window focus issues too. I'd suggest to disable/uncheck the 'send command to this target:' option. This works for me.

Best regards!

Woo_doggy

  • Newbie
  • *
  • Posts: 3
Re: How do I control a music player with hotkeys
« Reply #4 on: April 17, 2019, 01:31:20 AM »
That didn't make any difference for me but I found this tool still works and does almost everything I want as long as VLC is minimised

https://github.com/InvalidCastEx/CommandLineMedia

Brigetiol

  • Guest
Re: How do I control a music player with hotkeys
« Reply #5 on: April 18, 2019, 03:29:22 AM »
Hi,

to be honest, it took me 2 days to make VLC work with VA the way I wanted, maybe there is a small detail I've forgotten.
The point is, it works for you now :) !