Thank you Jens! Your setup did indeed work, although the player doesn't
always recognize the NEXT / PREV buttons and sometimes takes a couple of
tries. I can live with that!

JKarp.

On Fri, 2005-10-21 at 17:53, Jens Arnold wrote:
> On 21.10.2005, Jeff Karpinski wrote:
> 
> > Hello,
> 
> > I'm wanting to basically swap +/- and menu +/- functionality
> > to make volume changes safer when riding my motorcycle. Making
> > +/- handle volume was an easy enough change in wps.h:
> 
> > #define WPS_INCVOL     BUTTON_RIGHT
> > #define WPS_DECVOL     BUTTON_LEFT
> 
> > But I'm having difficulty in getting NEXT, PREV, FFWD, and REW
> > working with the chorded menu +/- keys. The following didn't
> > work:
> 
> > #define WPS_NEXT (BUTTON_MENU | BUTTON_RIGHT | BUTTON_REL)
> > #define WPS_NEXT_PRE (BUTTON_MENU | BUTTON_RIGHT) #define
> > WPS_PREV (BUTTON_MENU | BUTTON_LEFT | BUTTON_REL) #define
> > WPS_PREV_PRE (BUTTON_MENU | BUTTON_LEFT) #define WPS_FFWD
> > (BUTTON_MENU | BUTTON_RIGHT | BUTTON_REPEAT) #define WPS_REW
> > (BUTTON_MENU | BUTTON_LEFT | BUTTON_REPEAT)
> 
> > I suspect my problem lies in understanding if/how BUTTON_REL
> > works in chorded sequences and how ffwd_rew() relies on
> > WPS_NEXT/WPS_PREV to resume play and exit. If I disable the
> > ffwd_rew() call and set:
> 
> > #define WPS_NEXT       (BUTTON_MENU | BUTTON_RIGHT)
> > #define WPS_PREV       (BUTTON_MENU | BUTTON_LEFT)
> 
> > I can get NEXT/PREV working fine, but obviously no FFWD/REW.
> 
> > Can anyone shed some light on how the hardware is presenting
> > chorded key sequences?
> 
> Afaiu, this has nothing to do with the hardware, but with the
> way button releases are handled in the button driver. The button
> driver always only fires a release event for the button that was
> just released, so you should try the following:
> 
> #define WPS_NEXT       (BUTTON_RIGHT | BUTTON_REL)
> #define WPS_NEXT_PRE   (BUTTON_MENU | BUTTON_RIGHT)
> #define WPS_PREV       (BUTTON_LEFT | BUTTON_REL)
> #define WPS_PREV_PRE   (BUTTON_MENU | BUTTON_LEFT)
> #define WPS_FFWD       (BUTTON_MENU | BUTTON_RIGHT | BUTTON_REPEAT)
> #define WPS_REW        (BUTTON_MENU | BUTTON_LEFT | BUTTON_REPEAT)
> 
> This should work, although I admit I didn't try it. It's just
> derived from my understanding of the button driver, and from the
> fact that the archos recorder pitch screen uses a comparable
> button scheme.
> 
> Hth, Jens

Reply via email to