Page 1 of 1

Editing vlcrc manually—how to type Print Screen?

Posted: 04 Apr 2014 19:26
by WandersFar
I want to assign Print Screen to take video snapshots within VLC only (not as a global hotkey). Unfortunately I can’t assign Print Screen within VLC’s dialogs since it just takes a capture of the dialog, it’s not sending the key.

So I’ve found the appropriate line in vlcrc, but I’m not sure how to write Print Screen:

# Take video snapshot (string)
key-snapshot=

I tried Print Screen, PrintScreen, PrntScrn, PrtSc… When I open up VLC and check the hotkey dialog, the new key does appear in the list, however pressing Print Screen on my keyboard does not work—it will not take a video snapshot. I tried assigning another key, like so:

# Take video snapshot (string)
key-snapshot=F1

… and it did work, F1 did take a video snapshot, so I just need to get the right word for Print Screen.

Is there a list of how to type special keys into vlcrc so that VLC recognizes them? I searched the forums and the FAQs, but I haven’t found anything.

Re: Editing vlcrc manually—how to type Print Screen?

Posted: 07 Apr 2014 14:09
by mederi
Print Screen is one of the keys that cannot be used as a hotkey.

Re: Editing vlcrc manually—how to type Print Screen?

Posted: 07 Apr 2014 19:15
by WandersFar
How did you find this out? Is there a list somewhere?

Thank you for the information.

Re: Editing vlcrc manually—how to type Print Screen?

Posted: 08 Apr 2014 13:34
by mederi
At first I tried to assign hotkeys in VLC GUI preferences. Caps Lock, Num Lock, Scroll Lock, Pause Break, Print Screen, Tab, Win, standalone Ctrl, Shift, Alt cannot be assigned as a hotkey.

Manual editing of "vlcrc" configuration file does not help, too.
From VLC source code http://git.videolan.org/?p=vlc.git;a=bl ... bf;hb=HEAD
the "Print" could be the magic word, but it does not work either.

Perhaps some VLC developer could explain something about it.

Re: Editing vlcrc manually—how to type Print Screen?

Posted: 08 Apr 2014 20:58
by Rémi Denis-Courmont
Print Screen is not recognized by the VLC core. It was deemed useless since practically all operating systems grab that key such that application cannot use it in a normal fashion.

Re: Editing vlcrc manually—how to type Print Screen?

Posted: 08 Apr 2014 22:20
by mederi
O.K.

Re: Editing vlcrc manually—how to type Print Screen?

Posted: 09 Apr 2014 00:46
by Ludrax
I want to assign Print Screen to take video snapshots within VLC only (not as a global hotkey)
legacy RegisterHotKey?

Re: Editing vlcrc manually—how to type Print Screen?

Posted: 10 Apr 2014 19:14
by mederi
Following AutoHotkey script sends Shift+s to active VLC media player window when Print Screen key is pressed:

Code: Select all

SetTitleMatchMode, 2 #IfWinActive VLC media player PrintScreen::send +s

Re: Editing vlcrc manually—how to type Print Screen?

Posted: 11 Apr 2014 09:24
by WandersFar
Yeah, I eventually wound up writing a similar script to get around the limitation; was hoping for a VLC-only solution, though.

By the way, have you had any luck getting a consistent ahk_class for VLC? Depending on the video, window spy tells me it’s “ahk_class VLC MSW randomalphanumericstring” which basically renders ahk_class useless. I resorted to doing a title match like you did which is not ideal since it’ll match anything with VLC in the title: a browser window, a document, whatever.