DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: IDEA: Global hotkeys in VLC  (Read 15,468 times)

Josh

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 3,411
    • Gathering Badge
    • Official Forum Clown
    • Coding Snacks
    • Plugin Coding Medal
    • Volunteers/Staff
    • Military Service Badge - US Army
    • Furry Fandom Badge - Furry Fandom
    • Linux User
IDEA: Global hotkeys in VLC
« on: March 14, 2008, 12:18 AM »
I know this would be quite easy in AHK, but I was wondering if a plugin solution could be devised to allow for global hotkey control in the VideoLAN Client player. Has anyone heard of something like this or seen something like this?
Strength in Knowledge

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • Coding Snacks
    • Volunteers/Staff
    • Gathering Badge
    • Participated in NANY Challenge Once
    • Linux User
Re: IDEA: Global hotkeys in VLC
« Reply #1 on: March 14, 2008, 02:59 AM »
i think something is being done about this here and here (found via Google) but the AHK way is probably faster.

Josh

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 3,411
    • Gathering Badge
    • Official Forum Clown
    • Coding Snacks
    • Plugin Coding Medal
    • Volunteers/Staff
    • Military Service Badge - US Army
    • Furry Fandom Badge - Furry Fandom
    • Linux User
Re: IDEA: Global hotkeys in VLC
« Reply #2 on: March 14, 2008, 09:29 AM »
AHK is all well and good but I do not need another application running in my system tray. Believe me, AHK is fine if you have something complex, but for something as simple as global hotkeys I would prefer it be integrated into the application in question. If anyone is willing to undertake this, I would be greatly appreciative as the author has expressed that if he were to work on this feature it wouldnt be available for at most a few months.
Strength in Knowledge

Josh

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 3,411
    • Gathering Badge
    • Official Forum Clown
    • Coding Snacks
    • Plugin Coding Medal
    • Volunteers/Staff
    • Military Service Badge - US Army
    • Furry Fandom Badge - Furry Fandom
    • Linux User
Re: IDEA: Global hotkeys in VLC
« Reply #3 on: March 14, 2008, 06:42 PM »
Would anyone be willing to undertake a plugin development for global hotkeys in vlc?
Strength in Knowledge

Josh

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 3,411
    • Gathering Badge
    • Official Forum Clown
    • Coding Snacks
    • Plugin Coding Medal
    • Volunteers/Staff
    • Military Service Badge - US Army
    • Furry Fandom Badge - Furry Fandom
    • Linux User
Re: IDEA: Global hotkeys in VLC
« Reply #4 on: March 16, 2008, 02:21 PM »
OK, would someone be willing to generate an AHK script for me that would read the vlc config file and allow me to assign global hotkeys based on it?
Strength in Knowledge

razlin

  • Participant
  • Joined in 2008
  • *
  • Posts: 2
Re: IDEA: Global hotkeys in VLC
« Reply #5 on: March 26, 2008, 02:42 PM »
Just a note.. in ahk you can use

Code
#NoTrayIcon 

and it gets rid of the tray icon.

so its easily done in ahk

skrommel

  • Fastest code in the west
  • Developer
  • Joined in 2005
  • ***
  • Posts: 933
    • Participated in NANY Challenge Twice
    • Coding Snacks
Re: IDEA: Global hotkeys in VLC
« Reply #6 on: March 26, 2008, 06:01 PM »
:tellme: Josh, please elaborate!

Quote
read the vlc config file and allow me to assign global hotkeys based on it

Do you want to read the vlcrc and if some setting has a certain value, a hotkey should be available?
Or do you want to press a hotkey and cange a value in the vlcrc?
Or, as I would have done it, have the hotkeys run menu commands?

Skrommel

Josh

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 3,411
    • Gathering Badge
    • Official Forum Clown
    • Coding Snacks
    • Plugin Coding Medal
    • Volunteers/Staff
    • Military Service Badge - US Army
    • Furry Fandom Badge - Furry Fandom
    • Linux User
Re: IDEA: Global hotkeys in VLC
« Reply #7 on: March 26, 2008, 08:59 PM »
I want hotkeys to be available based on the already user defined hotkeys in the vl config file. Basically, your first option.
Strength in Knowledge

skrommel

  • Fastest code in the west
  • Developer
  • Joined in 2005
  • ***
  • Posts: 933
    • Participated in NANY Challenge Twice
    • Coding Snacks
Re: IDEA: Global hotkeys in VLC
« Reply #8 on: March 27, 2008, 02:05 AM »
:) Here's GlobalVLC!

It makes VLC hotkeys work even when VLC is inactive.

Edit your VLC config file by removing the # in front of the hotkey you want to make global, and add an unoccupied hotkey.

Also change the script below:
vlcrc= must point to your VLC config file, and vlc= must match the title of VLC.

Skrommel


Code
;GlobalVLC.ahk
; Make VLC hotkeys work even when VLC is inactive.
; Edit your VLC config file by removing the # in front of 
;  the hotkey you want to make global, and add a unoccupied hotkey.
; Change the vlcrc= line below to match the location of your VLC config file
;  and vlc= must match the titlebar of VLC.
;Skrommel @ 2008

vlcrc=C:\Users\%A_UserName%\AppData\Roaming\vlc\vlcrc
vlc=VLC media player

#SingleInstance,Force
#NoEnv
SendMode,Input

applicationname=GlobalVLC

IfNotExist,%vlcrc%
  MsgBox,0,%applicationname%,VLC config file not found!`n`n%vlcrc%
hotkeys=
count=0
found=0
Loop,Read,%vlcrc%
{
  IfInString,A_LoopReadLine,[main]
    found=1
  If found=0
    Continue
  StringSplit,part,A_LoopReadLine,=
  StringReplace,part1,part1,%A_Space%,,All
  If (SubStr(part1,1,4)<>"key-")
    Continue
  If part2=
    Continue
  If part2=Unset
    Continue
  StringReplace,part2,part2,Right,Right
  StringReplace,part2,part2,Left,Left
  StringReplace,part2,part2,Up,Up
  StringReplace,part2,part2,Down,Down
  StringReplace,part2,part2,Enter,Enter
  StringReplace,part2,part2,Space,Space
  StringReplace,part2,part2,Tab,Tab
  StringReplace,part2,part2,BackSpace,BackSpace
  StringReplace,part2,part2,Space,Space
  StringReplace,part2,part2,F12,F12
  StringReplace,part2,part2,F11,F11
  StringReplace,part2,part2,F10,F10
  StringReplace,part2,part2,F9,F9
  StringReplace,part2,part2,F8,F8
  StringReplace,part2,part2,F7,F7
  StringReplace,part2,part2,F6,F6
  StringReplace,part2,part2,F5,F5
  StringReplace,part2,part2,F4,F4
  StringReplace,part2,part2,F3,F3
  StringReplace,part2,part2,F2,F2
  StringReplace,part2,part2,F1,F1
  StringReplace,part2,part2,Shift-,+
  StringReplace,part2,part2,Ctrl-,^
  StringReplace,part2,part2,Alt-,!
  Hotkey,%part2%,SEND
  count+=1
  hotkeys=%hotkeys%%part1%`=%part2%`n
}
If count=0
  MsgBox,0,%applicationname%,No hotkeys found!
Else
  MsgBOx,0,%applicationname%,Made the following hotkeys global:`n`n%hotkeys%
Return


SEND:
;  ToolTip,%A_ThisHotkey%
  ControlSend,,%A_ThisHotkey%,%vlc%
Return
« Last Edit: March 27, 2008, 02:08 AM by skrommel »

Josh

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 3,411
    • Gathering Badge
    • Official Forum Clown
    • Coding Snacks
    • Plugin Coding Medal
    • Volunteers/Staff
    • Military Service Badge - US Army
    • Furry Fandom Badge - Furry Fandom
    • Linux User
Re: IDEA: Global hotkeys in VLC
« Reply #9 on: March 27, 2008, 02:07 AM »
Thanks! I will be testing this upon my return home saturday. I am currently out in a school. I will post my results.
Strength in Knowledge

Original address: https://www.donationcoder.com/forum/index.php?topic=12638.0