Rockbox Technical Forums

Rockbox Development => Starting Development and Compiling => Topic started by: peterw on August 05, 2007, 07:34:29 PM

Title: remapping buttons for list scrolling (ipod video)?
Post by: peterw on August 05, 2007, 07:34:29 PM
I'd like to remap Hold Prev and Hold Next so they can be used to scroll through long lists, as when browsing the database. I hoped this might be as simple as the following patch, but apparently it's not. Could someone help me figure this out?

Thanks,

-Peter

--- apps/keymaps/keymap-ipod.c  (revision 14204)
+++ apps/keymaps/keymap-ipod.c  (working copy)
@@ -41,10 +41,12 @@
 static const struct button_mapping button_context_standard[]  = {
     { ACTION_STD_PREV,          BUTTON_SCROLL_BACK,                 BUTTON_NONE },
     { ACTION_STD_PREVREPEAT,    BUTTON_SCROLL_BACK|BUTTON_REPEAT,   BUTTON_NONE },
+    { ACTION_STD_PREV,          BUTTON_LEFT|BUTTON_REPEAT,          BUTTON_NONE },
     { ACTION_STD_NEXT,          BUTTON_SCROLL_FWD,                  BUTTON_NONE },
     { ACTION_STD_NEXTREPEAT,    BUTTON_SCROLL_FWD|BUTTON_REPEAT,    BUTTON_NONE },
-    { ACTION_STD_CANCEL,        BUTTON_LEFT,                        BUTTON_NONE },
-    { ACTION_STD_OK,            BUTTON_RIGHT,                       BUTTON_NONE },
+    { ACTION_STD_NEXT,          BUTTON_RIGHT|BUTTON_REPEAT,         BUTTON_NONE },
+    { ACTION_STD_CANCEL,        BUTTON_LEFT|BUTTON_REL,             BUTTON_NONE },
+    { ACTION_STD_OK,            BUTTON_RIGHT|BUTTON_REL,            BUTTON_NONE },

     { ACTION_STD_OK,            BUTTON_SELECT|BUTTON_REL,           BUTTON_SELECT },
     { ACTION_STD_MENU,          BUTTON_MENU|BUTTON_REL,             BUTTON_MENU },

Title: Re: remapping buttons for list scrolling (ipod video)?
Post by: peterw on August 05, 2007, 11:32:36 PM
OK, bad form, replying to my own post. I got it figured out, and posted a patch on Flyspray:
http://www.rockbox.org/tracker/task/7545

-Peter
Title: Re: remapping buttons for list scrolling (ipod video)?
Post by: Llorean on August 05, 2007, 11:40:05 PM
Wouldn't a better solution be improving the scroll acceleration code, so that holding left and right can be used to scroll long filenames manually as can be done on other targets?
Title: Re: remapping buttons for list scrolling (ipod video)?
Post by: tdtooke on August 06, 2007, 04:53:13 AM
There is another patch (http://www.rockbox.org/tracker/task/5594) with addresses this that you may be interested in.  You have an added scroll-acceleration setting for fast, faster, fastest which you can set to whatever suits you.
Title: Re: remapping buttons for list scrolling (ipod video)?
Post by: peterw on August 06, 2007, 06:50:53 AM
There is another patch (http://www.rockbox.org/tracker/task/5594) with addresses this that you may be interested in.  You have an added scroll-acceleration setting for fast, faster, fastest which you can set to whatever suits you.

Thank you. I think that will become abother "core patch" in my build -- that makes the wheel much more usable!

-Peter