Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: Re: Archos Player button mappings

Re: Archos Player button mappings

From: Jens Arnold <arnold-j_at_t-online.de>
Date: 2005-10-22

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
Received on Sat Oct 22 01:54:24 2005


Page was last modified "Jan 10 2012" The Rockbox Crew
aaa