[vlc-devel] Re: configurable hotkeys

Derk-Jan Hartman d.hartman at student.utwente.nl
Tue May 27 21:02:16 CEST 2003

On dinsdag, mei 27, 2003, at 20:28 Europe/Amsterdam, Gildas Bazin wrote:
> On Tuesday 27 May 2003 16:04, Sigmund Augdal wrote:
>> I'm trying to implement configureably hotkeys in vlc and I'm making 
>> some
>> progress. I'll tell here what I've done so far so people get a chance 
>> to
>> shout out if they think I'm doing it the wrong way.

>> I added a integer variable in p_vlc called "key-pressed". Then I 
>> created
>> an interface module called "hotkeys" that adds a callback to the
>> "key-pressed" variable, then matches the key-pressed variable with the
>> configured hotkeys, and does appropriate actions based on this. The
>> hotkeys interface is allways inserted as a backgroud interface.
> This sounds great!
> The only suggestion I might have would be not to do the hotkeys 
> processing
> in yet another interface module. IMHO this feature ought to be done in 
> the
> core.
> The way I would see it would be to split the event processing in 2 
> different
> steps. The key events can be bound to a specific video output (for 
> instance
> the fullscreen one) so it would make sense to do a first processing of 
> the
> hotkeys in the vout thread (in src/video_output/video_output.c or a new
> file).
> If we assume that hotkeys can be generated by something else than the 
> video
> outputs, then we need another point of centralisation for these 
> hotkeys.

I think it might be wise to centralize hotkeys that much. Only thing to 
remember of course is that we probably need default sets for each 
interface in that case. OSX is very strict in assigning certain keys to 
certain standard items.

> The playlist could be this other point. The events which are not 
> handled by
> the vout would then be redirected to the playlist events loop.

Also, we need to keep in mind autogenerated menu's. Already for 
instance there is the fullscreen menuitem that can be autogenerated. in 
OSX i have the default com-F ( ctrl-F in windows world) assigned to 
this command. At the moment i cannot use this autogenerated menuitem, 
simply because it would break the hotkey assignment, something which is 
totally undesirable. so there needs to be some sort of link between the 
fullscreen variable and it's hotkey assignment.


Universiteit Twente
Derk-Jan Hartman (d.hartman at student.utwente.nl)

This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html
If you are in trouble, please contact <postmaster at videolan.org>

More information about the vlc-devel mailing list