topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Sunday December 15, 2024, 4:21 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: IDEA: Global hotkeys in VLC  (Read 13231 times)

Josh

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Points: 45
  • Posts: 3,411
    • View Profile
    • Donate to Member
IDEA: Global hotkeys in VLC
« on: March 13, 2008, 07:18 PM »
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?

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • View Profile
    • Donate to Member
Re: IDEA: Global hotkeys in VLC
« Reply #1 on: March 13, 2008, 09:59 PM »
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
  • ***
  • Points: 45
  • Posts: 3,411
    • View Profile
    • Donate to Member
Re: IDEA: Global hotkeys in VLC
« Reply #2 on: March 14, 2008, 04: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.

Josh

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Points: 45
  • Posts: 3,411
    • View Profile
    • Donate to Member
Re: IDEA: Global hotkeys in VLC
« Reply #3 on: March 14, 2008, 01:42 PM »
Would anyone be willing to undertake a plugin development for global hotkeys in vlc?

Josh

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Points: 45
  • Posts: 3,411
    • View Profile
    • Donate to Member
Re: IDEA: Global hotkeys in VLC
« Reply #4 on: March 16, 2008, 09:21 AM »
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?

razlin

  • Participant
  • Joined in 2008
  • *
  • default avatar
  • Posts: 2
    • View Profile
    • Donate to Member
Re: IDEA: Global hotkeys in VLC
« Reply #5 on: March 26, 2008, 09:42 AM »
Just a note.. in ahk you can use

#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
    • View Profile
    • 1 Hour Software by skrommel
    • Donate to Member
Re: IDEA: Global hotkeys in VLC
« Reply #6 on: March 26, 2008, 01:01 PM »
 :tellme: Josh, please elaborate!

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
  • ***
  • Points: 45
  • Posts: 3,411
    • View Profile
    • Donate to Member
Re: IDEA: Global hotkeys in VLC
« Reply #7 on: March 26, 2008, 03:59 PM »
I want hotkeys to be available based on the already user defined hotkeys in the vl config file. Basically, your first option.

skrommel

  • Fastest code in the west
  • Developer
  • Joined in 2005
  • ***
  • Posts: 933
    • View Profile
    • 1 Hour Software by skrommel
    • Donate to Member
Re: IDEA: Global hotkeys in VLC
« Reply #8 on: March 26, 2008, 09:05 PM »
 :) 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


;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 26, 2008, 09:08 PM by skrommel »

Josh

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Points: 45
  • Posts: 3,411
    • View Profile
    • Donate to Member
Re: IDEA: Global hotkeys in VLC
« Reply #9 on: March 26, 2008, 09:07 PM »
Thanks! I will be testing this upon my return home saturday. I am currently out in a school. I will post my results.