Rockbox

This is the bug/patch tracker for Rockbox. Click here for more information.

Quick links: Bugs · Patches · Rockbox frontpage

Tasklist

FS#9252 - Common keyboard actions for Simulator

Attached to Project: Rockbox
Opened by Tomer Shalev (tomers) - Friday, 08 August 2008, 11:24 GMT+2
Last edited by Tomer Shalev (tomers) - Tuesday, 15 December 2009, 08:46 GMT+2
Task Type Patches
Category Simulator
Status Assigned
Assigned To Tomer Shalev (tomers)
Player Type All players
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Future release
Due Date Undecided
Percent Complete 0%
Private No

Details

Note: This is work in progress.
Status: Code implemented
Manual not updated
Wiki not updated (only after commit)

The idea of this patch is to have the same keyboard keys assign to the same actions in all platforms.

For example, have +/- keys (both on keyboard and on Numpad) are assigned to Volume Up and Volume Down keys of the original platform.
For platforms which do not have these keys, pressing the +/- keys in the simulator will do nothing.

This change will help developers to do manual regression testing on lots of platforms easily, as they do not have to memorize each platform's key assignment.

Future development: Display key assignment on screen, and/or on console
   new_simulator_key_layout.diff (28.3 KiB)
 uisimulator/sdl/button.c |  957 +++++++++++++++--------------------------------
 1 file changed, 320 insertions(+), 637 deletions(-)

This task depends upon

Comment by Steve Bavin (pondlife) - Friday, 08 August 2008, 13:28 GMT+2
You can already display the key assignment in the simulator if you use the --background option.

Also, the simulators should be consistent with the corresponding device only, not with each other (if that makes sense).
Comment by Thomas Martitz (kugel.) - Friday, 08 August 2008, 14:15 GMT+2
I think the simulator in particular should be consistent over all targets. As long as it has all buttons the device has, it is consistent enough with the targets, imho.
Comment by Tomer Shalev (tomers) - Sunday, 07 September 2008, 15:01 GMT+2
Synced and modify patch

Now displays keyboard assignment on console on load, and when pressing the '?' key.

Moved target specific key assignments from button.c to uisdl.h.

Tested on various targets.
   new_uisimulator_key_layout.diff (38.2 KiB)
 uisimulator/sdl/button.c |  994 +++++++++++++++++------------------------------
 uisimulator/sdl/uisdl.h  |  158 +++++++
 2 files changed, 522 insertions(+), 630 deletions(-)

Comment by Maurus Cuelenaere (mcuelenaere) - Thursday, 11 September 2008, 13:08 GMT+2
Seems like a good idea to me, but I'm not sure what this has to do:

#ifdef HAVE_TOUCHSCREEN
printf("A, End\n", UI_KEY_SPECIAL_STR);
#else
printf("A, End; Keypad 1 (END)\n", UI_KEY_SPECIAL_STR);
#endif

Shouldn't there be a %s somewhere in that printf()?
Comment by Tomer Shalev (tomers) - Thursday, 11 September 2008, 13:19 GMT+2
Thanks for this info. I've attached a fixed patch.

Note that we should also update the background images of various players, as the former key used are shown on each image.
I have no clue as to where the original images without these labels are, if there are such images at all.

Hopefully, when this patch is committed, we should also update the Twiki page, and remove the shortcut keys shown there (http://www.rockbox.org/twiki/bin/view/Main/UiSimulator).
   new_uisimulator_key_layout.diff (38.2 KiB)
 uisimulator/sdl/button.c |  994 +++++++++++++++++------------------------------
 uisimulator/sdl/uisdl.h  |  158 +++++++
 2 files changed, 522 insertions(+), 630 deletions(-)

Comment by Maurus Cuelenaere (mcuelenaere) - Thursday, 11 September 2008, 13:21 GMT+2
About the images: I'm afraid the originals aren't stored anywhere easily accessible; so you'll have to either manually edit them or find new ones..

Loading...