Rockbox

Tasklist

FS#7555 - Add Double-Click button press (currently enabled for Ipod Video only)

Attached to Project: Rockbox
Opened by John K (yegods) - Tuesday, 07 August 2007, 20:21 GMT
Last edited by Jonathan Gordon (jdgordon) - Thursday, 15 May 2008, 14:38 GMT
Task Type Patches
Category Drivers
Status Closed
Assigned To No-one
Operating System All players
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Although this patch is specifically for the Ipod Video... there isn't any reason that it won't work for other players. Changing the configure script and keymap file are about all that needs to be done to add it.

I have created a patch to the button firmware that will allow double-clicks to be caught and processed. It's a little complex, and though i have done quite a bit of testing, there are probably some small problems. it would be great if some of you could give this a whirl, and see if there are any major flaws.

i have a couple patches that i'll be adding shortly, that will make use of the patch.

if you want to enable the patch follow these steps:
1) download attached patch file (it is created for the latest revision: 14233)
2) apply patch
3) run tools/configure in your build directory
4) build

now if it builds successfully, you can start using double clicks. this will entail the following steps:

1) modify apps/keymaps/keymap_ipod.c to add the double click to any actions you want. format is as such:
this will add a double click for the select button in the wps page...
#ifdef ACCEPT_DOUBLE_CLICK
{ <action define>, BUTTON_SELECT | BUTTON_REL, BUTTON_SELECT | BUTTON_DBL }
#endif

always put the double click actions before any other actions in the section.

if you want to enable this for other players, modify the player configuration section in the configure script to have the folowing line:
extradefines="$extradefines -DACCEPT_DOUBLE_CLICK"

modify your players keymap file in the same way as described above of the Ipod Video.

rerun the build.
This task depends upon

View Dependency Graph

Closed by  Jonathan Gordon (jdgordon)
Thursday, 15 May 2008, 14:38 GMT
Reason for closing:  Rejected
Additional comments about closing:  sorry, double click just slows down an already slow UI
Comment by John K (yegods) - Friday, 10 August 2007, 00:34 GMT
posting new double_click patch which defines the ACCEPT_DOUBLE_CLICK in the ipodvideo config header, instead of the configure script. and fixes some minor issues.
Comment by John K (yegods) - Friday, 10 August 2007, 00:57 GMT
given the above patch, you no longer should modify the tools/configure script. instead, add the #define ACCEPT_DOUBLE_CLICK to your player's config-<player>.h file.
Comment by John K (yegods) - Wednesday, 22 August 2007, 23:41 GMT
here is a bugfix release of the patch. fixes problems with click-clickhold functionality.
Comment by Jack Suter (chrisjs169) - Thursday, 06 September 2007, 20:57 GMT
@yegods - You forgot to include the lang file, causing LANG_DOUBLE_CLICK_DELAY etc. to be undefined.
Comment by Jack Suter (chrisjs169) - Thursday, 06 September 2007, 21:03 GMT
Update: Also, part of  FS#7716  is in the last patch, which causes problems when compiling (for those who don't have that patch)
Comment by John K (yegods) - Thursday, 06 September 2007, 21:14 GMT
sorry, i have a lot of patches going on my system, and it becomes a little confusing when i have to create them. i'll fix those two problems and re-upload.
Comment by John K (yegods) - Thursday, 06 September 2007, 21:25 GMT
please try this new patch file. it includes the english.lang changes, and removes any changes from other of my patches.
Comment by Nick Waterton (Nick_W) - Friday, 07 September 2007, 21:52 GMT
I have some ideas in mind. I'll try it and let you know how it works.
Comment by John K (yegods) - Friday, 07 September 2007, 22:55 GMT
cool. let me know. one annoyance that i've noticed with the double-click is using the keyboard editing... the clicks to move left and right are a tad long, and can seem less responsive than without the double-click code. i have a workaround in mind which would be to make the keyboard code accept left and right key double clicks, which would move the cursor left and right twice respectively.
Comment by Nick Waterton (Nick_W) - Wednesday, 12 September 2007, 14:32 GMT
Check out patch  FS#7762  (scrub mode ff/rew for iPod).

This uses your double click feature - and it works great! I was looking for a way to activate scrub mode, but most of the easy ways are already used. Double click was just what I needed.

Let me know what you think.
Comment by John K (yegods) - Wednesday, 12 September 2007, 17:01 GMT
great! glad to hear someone else has found as use for this patch besides me.
Comment by Travis Tooke (tdtooke) - Sunday, 21 October 2007, 08:30 GMT
First off: Outstanding Patch! My only suggestion would be to disable accepting double-clicks while in a plugin.
Comment by John K (yegods) - Sunday, 21 October 2007, 17:46 GMT
great, i'm glad you like it. i've recently been using the double-click instead of the click click-hold to do "next directory", and it's so much easier that it's pretty ridiculous no one thought of it before :)

if you have a suggestion for how to disable double-clicks while in a plugin, then i'd be glad to implement it. i'm not really sure how to do that, except by maybe undefining the double click define for every plugin. seems a lot of work though.
Comment by Travis Tooke (tdtooke) - Sunday, 21 October 2007, 23:13 GMT
I can't really think of anything other than maybe adding a check for what screen you're in at button.c (that's probably pretty hackey though, you'd likely have to include some things that have absolutely no business being included in button.c). Serious downside to that , you'd have to pick and choose what screens double-click should work in. That's a pretty cool idea doing "next directory" that way, I should've thought of that.. :)
Comment by Travis Tooke (tdtooke) - Monday, 22 October 2007, 00:04 GMT
Sorry for the double-post in your thread but this just occurred to me (or rather I decided that what you said was the only way ;)). Next weekend I'll experiment with undefining that when a plugin is initialized and redefining it on exit. If it works well I'll put it in all the plugins. It's work intensive but the same sort of thing had to be done in the multifont patch.
Comment by Chris Kagan (KindOfBlues71) - Monday, 22 October 2007, 14:47 GMT
I'm not sure this is even possible as I'm not a programmer, but rather than undefining the double-click in each individual plugin, can't you just define it for each screen or function you want double-clicks enabled?

Would it be possible to have different settings like "Ignore 'The'" patch has in File Browser? For example, the user could choose the following settings:

[b]Double-clicks[/b]
Disabled
Audio playback features only
All screens
Comment by John K (yegods) - Monday, 22 October 2007, 16:58 GMT
probably a better solution would be to have two button functions, and let the calling function decide which to call. that way we could accept double-click in only select modules. i'll think about it a bit more.
Comment by John K (yegods) - Monday, 22 October 2007, 18:13 GMT
probably a better solution would be to have two button functions, and let the calling function decide which to call. that way we could accept double-click in only select modules. i'll think about it a bit more.

Loading...