Author Topic: VLC & play/pause Previous and Next track keypress  (Read 2806 times)

kourou

  • Jr. Member
  • **
  • Posts: 81
  • Anything that can go wrong will go wrong
    • FANNY (Discord)
VLC & play/pause Previous and Next track keypress
« on: August 16, 2018, 08:20:40 AM »
Hi,
I'm having an issue with the keypress in subject, it dosn't work when vlc is hiden in Windows taskbar. but when I perform a window funtion "set Audio Level" it works fine even if vlc is hiden.
all keypress works fine when vlc is out of the taskbar.

VA 1.7.2
Windows 10
« Last Edit: August 16, 2018, 08:31:56 AM by kourou »

kourou

  • Jr. Member
  • **
  • Posts: 81
  • Anything that can go wrong will go wrong
    • FANNY (Discord)
Re: VLC & play/pause Previous and Next track keypress
« Reply #1 on: August 16, 2018, 09:23:04 AM »
I've made some progress: I have to start vlc first as not hiden (minimized in my case) then perform a window function to hide it, the key press works fine after that. But the problem is vlc popup when am in game and the window game become minimized

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: VLC & play/pause Previous and Next track keypress
« Reply #2 on: August 16, 2018, 10:15:47 AM »
Are you using global hotkeys in VLC? If you're using normal hotkeys and sending keypresses to VLC specifically, that would make the window pop up.

If you map global hotkeys you should be able to send the key to the active window, and VLC should register it(provided the active window doesn't prevent other applications from detecting keypresses, which most don't).


when I perform a window funtion "set Audio Level" it works fine even if vlc is hiden.
"Set Audio Level" is not a window function, it works using the process instead, so it'll work even if an application doesn't spawn any windows.

kourou

  • Jr. Member
  • **
  • Posts: 81
  • Anything that can go wrong will go wrong
    • FANNY (Discord)
Re: VLC & play/pause Previous and Next track keypress
« Reply #3 on: August 18, 2018, 08:31:43 AM »
So there is no other way to send the key press "play/pause" to the process. It has to be a window.
Global hotkeys isn't what I am looking for, I work on a shared profile and I'd like to make things simple to users.
I have another way using VA as a player, but stuck with an issue about the token {STATE_AUDIOPOS:mySoundVariable} that i want to use to pause mp3  :-\ . I should probably open another issue.
Thnx for replying me  :)

Gangrel

  • Caffeine Fulled Mod
  • Global Moderator
  • Full Member
  • *****
  • Posts: 216
  • BORK FNORK BORD
Re: VLC & play/pause Previous and Next track keypress
« Reply #4 on: August 18, 2018, 01:21:26 PM »
Global hotkeys (especially the media ones) have the advantage of you just having to send the keypress to "active window" (ie, no particular target), so this means that even if the media player is minimized in the notification area, it can still accept them.

I know that Foobar works in this fashion, so I would assume that VLC would as well. On top of that, media hotkeys are generic enough that even across different languages, the Scancode (and virtual keycode as well) are the same.

(there are some differences to SC and VK depending on language)