• Status Closed
  • Percent Complete
  • Task Type Patches
  • Category Battery/Charging
  • Assigned To No-one
  • Operating System All players
  • Severity Low
  • Priority Very Low
  • Reported Version Release 3.9
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by JeanLouisBiasini - 2011-11-25
Last edited by bluebrother - 2012-02-22

FS#12405 - Improve touchpad implementation for the fuzeplus's port

Could someone checks that I did no blasphemy and commit it?

Closed by  bluebrother
2012-02-22 22:51
Reason for closing:  Out of Date
Additional comments about closing:   Warning: Undefined array key "typography" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 371 Warning: Undefined array key "camelcase" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 407

closed on request, see comments.

I don’t understand what this patch does. The current behaviour is that Volume up/down increases/decreases the sensibility by 1. This patch adds a float which is not necessary since only integers are used and I don’t understand the purpose of sensibiblity_counter: the more you increase it, the more you add each time ? Then pressing volume down will still increase it until it finally decreases it ?

Yeah I know I alos noticed yesteday that it was useless to have a float here… So Here is a better patch. Basicly it just set a variable that get increased or decreased unstead of sensitivity.value then increase or decrease it every 15 time. This way the setting change (up or down) slowly and its more easy to set a precise value.
Anyway is there any way I could change the title of this patch? I’ve had a closer look a the code and its not as difficult as I though. So I guess I could go on and map the gesture. something like : “improving touchpad’s support for fuze+” would be convenient or should I just open a new patch?

this patch also change back and play/pause button border. The whole corner select them now.

default value where wrong on the last patch. Now it should be ok - Pamaury do you confirm that you mixed the to devices default values? should I revert them?

So moving further:
1) added missing basic mapping for keyboard and comfirm screen. Regarding keyboard it is still very simple because we don’t have enough control key for the moment:
- direction to choose a letter
- playpause to select the letter
- select (cross) to confirm text entry
- volume down to backspace
- power to abord

2) in WPS added support for Lock (back key)

I checked the OF code and no the condition is not reversed so I think I will just change the default value to 13 or so for everyone since it’s a reasonable compromise for now. Any objection ?
For the lock, I’m not sure back is a good idea and given your patch it would mean that any press on back would lock, not only holding it for 1 sec ?

I have another idea but I’m not sure everyone would like it: the touchpad has two “empty slots” at the bottom left and bottom right with no symbols. Why not have a special combination like pressing both at the same time ? Furthermore we would use those two empty slots as normal keys because two extra keys are really necessary in some screens/plugins ?

Yeah actually I’m already on some thing like that:
I’ve implemented a new two_finger_select button that could be used for the lock (i think the point about two button gesture would be to have them handle general even that we whant. I find your idea also interesting - and I know how to do it so i will make a patch with that also… I personnaly think that at this point there are just no good solution because we have to test thing to look for the more usable think… So let’s try and will see…

So new patch:
1) Change the key limits on the touchpad: they are now 9 virtuals keys on 3 x 3 grid and a tenth key has been added: simultaneous touching the touchpad with 2 fingers (see patch 3 and 4 in the file.
A consequence I noticed is an very impressive increase of the touchpad reactivity because button zone are now wider.
2) Add A LOT LOT LOT of mapped key (see first patched file):
major change are:
a) in WPS:
-bottomright and bottomleft keys are direct link to file browser and playlist. another click and you are back in the WPS! (COMMENT: IS THERE A WAY TO GO TO THE DATABASE UNSTEAD?
-long press with two fingers activate LOCK when the finger are released from touchpad (this is the only way I found to avoid to much sensibility leadind to multiple lock unlock sequence)
b) keyboard:
We now have a fully fonctionnal virtual keyboard
-directions to select a letter
-play to insert a letter
-buttomright and bottomleft to move cursor
-back as backspace
-doublefinger key to finish
-power to abord
c) menu and list:
-left and right to go to previous/new page
-doublefinger key bring you back to the main menu

d) mapping for future : basic to handle recording, time and radio

3) reset standart sensitivity value to 13 on all touchpad

- a setting menu to have sensitivity and future scrolling sensitivity (I don’t know how to do that, HELPS)
- Implement different kind of scrolling and test them
- having a menu to map button to everyone suits…

name of a button variable changed to BUTTON_TWO_FINGERS
non compiling user can find a build here…

correct a bug: lock didn’t work!

I’m rewriting the whole keymaps file:
-have cleaner file especially by using recursivity by context calling
-mapping special setting menu (graphic equalizer for example)
-improving keys map consistency/usability (any suggestion will be taken in account)

for the moment I stuck because I need extra context/action and I have to find a way to implement them

Ok so I finally did a completed remap:
1) We have now a FULL and CONSISTENT mapping:
- I find a way to have volume in list
- I removed the menu link from the simple double finger click because it was too instable
- I activated bookmarkscreen and hotkeys (you can map one key yourself from the option menu)
- All usb fonction I could map ara also available and so on…

2) I made a little hack to have a more reliable double finger long click (lock) (I’m not sure if it is really efficient actually but we’ll test that…anyway pamaury has idea about gesture too)

3) I remapped the simulator (two finger keys is 0) to have the new keys.

What I still need to know from user:
- I followed consistency and we loosed quite a lot of keys. To keep the possibility to have hotkey in list I had to use the only remaining slot which may seems unaturel: long press on back key activate hotkeys when in a list (database, tree, menu…). Is it going to be a problem for navigating (for what I briefly test it shouldn’t but tell me otherwise…). A nice alterrnative woulde be to have the hotkey on long press playpause, but this is not consistent (this is meant to be playpause) so I’ll be asking on the devlist to know how to do it the right way.
- I followed systematic consistency: we have now up and down keys as volume in wps \o/ Well this may seems a little stupid as we already have volume keys. Anyway I will ask on the mailling list if this is mandatory. If not It would be nice to know what could be mapped unstead? We already have a hotkey in WPS (bottomleft) and all possible link so I guess the best we could do would be to spread the fonctions already there to have something less compact.

- please also report any strange stuff not working.
- It was enough pain to map those keys so I not going to go all the way again to describe them. Hier is a link to the new keymaps files, which syntax is rather clear even for beginner:
( “|” means “and” button_rel means “release”)

The patch seems ok to me except one little thing: why did you set BUTTON_BOTTOMLEFT to 0×00000208 ? This means that pressing bottom left is like pressing button back (0×200) and left (0×8) at the same time ! Button defines are meant to define a bit field so each button should be exactly one bit: 1,2,4,8,16,32,64,128,256,… So it should be:
#define BUTTON_BOTTOMLEFT 0×00000400 #define BUTTON_BOTTOMRIGHT 0×00000800 #define BUTTON_TWO_FINGERS 0×00001000 Tell me if I’m missing the point of these defines otherwise. Also great job for the keymaps !

LOL :D I didn’t knew that! Why are there button like 10 = (1010)2 ?, … Actually i didn’t understood that and just set value hoping it will not mess the stuff, it didn’t mess it because we cannot press several touch on the device anyway. I mapped gesture! :D For consistency I didn’t want to have just random value which is the reason why I tooked those…

They are written in hexadecimal: 0×10=16, hexadecimal is a common way of writing things.

Slight modification to improve usuability:
- on the touchpad center touch is too sensible to have it as select key in keyboard mode → move it back to playpause, only long press as action done remains
-I find the double finger touch too difficult to do without having error, so I let it for those who like it and add single press on power as alternative lock key. (anyway i noticed something funny:
if you lock with power you have to unlock with power and the same if you lock with two finger).

Non compiling user can have a zip here. Anyway this is ready to goes in the tree now.

I’ve made a patch to improve usuability:
- I find the double finger button too unstable to be usuable so I desactivated it in the keymap
- direct link from wps to recorder is useless (it can be accessed from menu anyway) and unpractical (it can be selected by error on leaving wps and so stop music)
- upon the very same reason I also desactivated the hotkey in tree.
- I restored the cancel button on single touch in both wps and tree
This could be discussed and eventualy taken to the tree (if so I will then go further and probably reverse the whole double finger implementation

definitive version that take all the two-finger button out

I committed the last patch, thanks!

So I’ve made a new cleanup before it get in the manual

and it also correct a typo in action.h

woaw! now this should be ok and this is actualized with the manual files I have on my local.
- a few stuff corrected
- define added to match the removing of radio and recording from firmware/export that is needed for manual

- going into some correction/implementation into plugins. (text_viewer)
- correcting/implementing missing stuff (keyboard morse)

-more cleanup and simplication
-correction on the time setting

this new little patch solve the volume up acting sometime like power (especially in game)

add failback comment

aside from the last patch as I’m now on the fuze+ manual for plugins, I started to correct all plugins keymaps this patch is not finish, just to be sure I don’t lose it - or if ever someone want to helps…

Holy crap! I did it! All the game plugins are noow fully usuable!!!

we might want to close this now… Further work on gestures should go on a cleaner line and into git… The actual touchpad implementation can now be considered as stable with all keymaps having being set and tested for all fonction and plugins
the last patch was commited on 7f26a10


Available keyboard shortcuts


Task Details

Task Editing