From: Dirk M. <dm...@tz...> - 2003-04-30 12:53:47
|
Hi, first of all: Matthieu Weber wrote: > Should we start a new thread about it? Yes. > On Wed 30.04.2003 at 11:30:38AM +0200, Dirk Meyer wrote: >> Matthieu Weber wrote: >> > I've been thinking to another solution: pressing PLAY will play the >> > first variant, pressing SELECT will go into the variant's menu and ENTER >> > will access the other options. This would break a bit the way keys are >> > used now (PLAY == SELECT), but... >> >> Sounds good to me. I will look into the code how to do that without >> braking anything. We also could do this for play lists: play will play >> them, select will show them. > > Vaguely related to that: > > I noticed that remote control events in freevo are related to the > buttons of one specific remote control, instead of being related to the > meaning/function of that event within freevo. E.g.: how can I do if I > want the "FFWD" key of my remote being used as "DOWN" (in a context > where "FFWD" means nothing, like in a menu) and another key used for > "10 min jump"? The way it is now is linking functions and keys together, > and the user cannot configure it. > > Of course changing this will break the whole Freevo (i.e. users will > have to rebuild their lircrc files for using function names instead of > the button names of Krister's remote control), but it would add greater > flexibility to the control system... > > Does pylirc really work properly if the same RC key is linked to > different events? Are all events sent to Freevo or only one of them? I don't think we should change the lirc interface. Freevo should know what to do with the current key and should transform it. OK, what are events right now? An event is something you press on your remote. This event is passed to different eventhandler who know what to do. Except for mplayer.py you can't change which key has what function. You can't use FFWD as DOWN except we code it directly into Freevo (which is bad). Events are also some status informations like identify media, usb or play ended. Thinking of the lcd plugin, maybe 'play started' is also an event. What to do with events? Right now, an event has _one_ target. If a key is pressed, Freevo will call all eventhandlers until one is found that uses the key. Most of the time this is what we want. What eventhandlers are called? An item also has an eventhandler. We could use the item eventhandler to set that PLAY should do something and SELECT something else. But the item eventhandler are only called if the key is not used in the menu itself. Maye we should call the item eventhandler first before calling the default PLAY/SELECT events. One problem here: if an item doesn't know what to do, it passes the event to it's parent. DOWN in menus go one item down, DOWN while playing is passed to the item, than to the parent and the parent may select the next item to play. That's bad! Proposal idea: we should enhance the event handling. An eventhandler not only needs the event itself, also a context (menu, playing, ..). This will prevent the directory item to play the next item when we are in menu mode. For non-key events, it may also a good idea that events have a parameter (e.g. playing could get the item which is playing as parameter, this is usefull for the lcd plugin or identify media can have the current changed disc as parameter). Besides that we have some events that needs to be passed to more than one eventhandler (e.g. the lcd plugin and mixer events). Maybe we could create create a list of spy-plugins which get all events before everyone else and it doesn't matter if they process that event or not. > I know that consumer devices should not have several functions > linked to a single button, for simplicity's sake, but my remote has > not that many buttons (I can afford either arrow keys or numeric > keys, but not both), and I would like to have some consistency > between my remote's button names and "what happens when I press that > button". So we could create a event mapper inside Freevo. If you are in the menu, Freevo will call 'event = menu_eventmapper(event)'. This mapper may transform FFWD-> DOWN or 2->UP on your remote. What do you think? Dischi -- Anything labeled "NEW" and/or "IMPROVED" isn't. The label means the price went up. The label "ALL NEW", "COMPLETELY NEW", or "GREAT NEW" means the price went way up. |