[mythtv] [PATCH] Add keybindings for MythMusic

Eric Thelin eric at generation-i.com
Thu Nov 20 18:26:36 EST 2003


Well since I didn't hear from anyone about what those methods do I am
going to assume that it was functionality that never worked so I don't
have to worry about it.  So my new patch is attached.  This one works
properly both with accelerator keys on or off.

Eric


On Tue, 18 Nov 2003, Eric Thelin wrote:

> Actually your question got me looking closer at my patch and it was
> wrong.  It didn't properly handle accelerated keys turned off.  I have a
> new version that I will submit shortly but first I have a question
> (probably for Isaac).  There is already code there to call
> music_tree_list->popUp() and music_tree_list->pushDown() on left and
> right when accelerated mode.  What are those methods supposed to do?
> They don't seem to do anything now but I suspect that they are meant to
> change to order of the songs in the playlist.  I will be more confident
> submitting the new patch if I know what they were supposed to do before
> I started changing things.
>
> Eric
>
> On Mon, 17 Nov 2003, Edward Wildgoose wrote:
>
> > > I have been frustrated that I couldn't navigate through songs very well
> > > from my remote so I added a few additional keybindings for keys that are
> > > likely to be already bound to buttons on most/many remotes.  Basicly
> > > these let you easily skip forward or reverse through a given song with
> > > left and right and jump forward or revers for entire tracks from the
> > > same buttons used for rewind or fast forward smoothly without stickykeys
> > > selected in MythTV.
> >
> > Oh ho!  Perfect.  I was just about to do this and then I see you beat me to it!
> >
> > However, does this work ok when you change the mode in mythmusic so that you can scroll around the interface and press buttons with the enter key?  (I don't use that mode, but didn't want to break anything for anyone...)
> >
> > _______________________________________________
> > mythtv-dev mailing list
> > mythtv-dev at mythtv.org
> > http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev
> >
>
-------------- next part --------------
Index: mythmusic/playbackbox.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythmusic/mythmusic/playbackbox.cpp,v
retrieving revision 1.65
diff -u -b -B -r1.65 playbackbox.cpp
--- mythmusic/playbackbox.cpp   5 Nov 2003 21:29:53 -0000       1.65
+++ mythmusic/playbackbox.cpp   20 Nov 2003 23:23:22 -0000
@@ -192,6 +192,7 @@
     switch (e->key())
     {
         case Key_PageDown:
+        case Key_Period:
             if (next_button)
                 next_button->push();
             else
@@ -199,6 +200,7 @@
             handled = true;
             break;
         case Key_PageUp:
+        case Key_Comma:
             if (prev_button)
                 prev_button->push();
             else
@@ -342,11 +344,17 @@
                     handled = true;
                     break;
                 case Key_Left:
-                    music_tree_list->popUp();
+                    if (rew_button)
+                        rew_button->push();
+                    else
+                        seekback();
                     handled = true;
                     break;
                 case Key_Right:
-                    music_tree_list->pushDown();
+                    if (ff_button)
+                        ff_button->push();
+                    else
+                        seekforward();
                     handled = true;
                     break;
                 case Key_0:


More information about the mythtv-dev mailing list