• Status Closed
  • Percent Complete
  • Task Type Patches
  • Category User Interface
  • Assigned To No-one
  • Operating System All players
  • Severity Low
  • Priority Very Low
  • Reported Version Daily build (which?)
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by TheMarkster - 2008-05-19
Last edited by Llorean - 2009-01-20

FS#9013 - adds shut down and show clock to main menu, wps shortcut to view clock

This patch does 5 things:

1) adds shutdown option in main menu

2) adds show clock option in main menu

3) adds hotkey shortcut to clock in wps

4) speeds up loading of clock by disabling

 the logo screen and status messages on
 loading/saving settings on start/exit

5) adds pressing play button as means of

 exiting the clock plugin

Usage: From the while playing screen (wps) press and hold the play button to switch to the clock display. Press play again to exit the clock and go back to the wps. Currently, the hotkey shortcut (long play) to show the clock from the while playing screen is only implemented for the e200. It would be a very simple matter to add to other targets just by editing the keymap file for that target.

I realize it is bad form to add multiple features into a single patch, but only the shut down option is unrelated to the others.


1) Voice doesn’t work for the new main menu options

2) Add keymaps for hotkey shortcuts for more targets

Closed by  Llorean
2009-01-20 12:01
Reason for closing:  Rejected
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

Not working toward inclusion, redundant or previously rejected features included in the patch.

If I can figure out how to attach the file…

So if you realized it was bad form, why’d you go ahead and do it anyway? I don’t really understand the statement “but only the shut down option is unrelated.” It’s still unrelated right?

Also, why exactly would you want to load the clock plugin from the WPS? Not to mention many players do not have a button free in the WPS anyway. For a spoken clock, simply use the one in the Rockbox Info screen.

Thank you for your critique. Yes, you are correct. I have been rightfully and suitably chastised.

Why load the clock plugin from the WPS? I find it is convenient to be able to just press the play button to load the digital clock rather than have to navigate through the System → Rockbox Info screens. Plus, the clock plugin is larger and easier to read from a distance, for example, from my hip. To clarify, it is the Show Clock and Shut Down main menu options that voice isn’t working on, not for the clock plugin itself. As far as I know, the clock plugin was never designed to speak the current time, but I could be wrong on that score. In any case, a visually impaired person might not be able to read the Show Clock menu item (or the clock in the system info screen), but perhaps still be able to read the larger font used by the digital clock. Having the clock plugin read out the current time is not a bad idea, though…

For those players lacking a free button in the WPS, the patch will still function without the hotkey, via the main menu. The only Rockbox’d player I own is the e200, which is also the only keymap I edited to include this hotkey. On the e200 the long play/pause was free and available, so that’s the one I chose for it. It’s also why I modified the clock plugin to use the play button as an exit key for it. I can press and hold play/pause on my e200 to see the current time, and then press play again to quickly jump right back to the WPS screen.

You can add a large RTC looking however you’d like TO your WPS. Perhaps to be shown when the hold switch is on, or when you pause playback, or just always visible in some free space.

Thank you again, Paul. There is more than one way to skin a cat as the old saying goes. I like your idea of customizing the WPS to show a large digital clock while in pause mode. I confess to not realizing multiple font sizes could be used on the same WPS or that a different screen entirely could be displayed while in pause mode. I will look into customizing my WPS.

ill try this for the h10 can anyone tell me how to change keymap?, also could you include restart also in the main menu, im already using this patch it has restart & shutdown in last menu entry,  FS#6733 , thanks.

Hi Mark,

If you want this considered for SVN, it needs to be split into individual patches for the various features. Perhspa the best way would be to update #6733 with tehe shutdown/restart functionality and leave only the clock changes here. I’d also suggest that the hotkey from WPS to clock be scrapped.


Look at the .diff file where you see this line added to the /apps/keymaps/keymap-e200.c:


You would need to add a similar line to the WPS section of the /apps/keymaps/keymap-h10.c file, but replacing BUTTON_UP with the hotkey button you’d like to assign for he shortcut. If you want to use a long play (holding play down for about a second or so) you would use BUTTON_PLAY in place of BUTTON_UP. So, your line to add would look like:


Just put it in the section where you see all the other ACTION_WPS_xxx stuff.


One more thing. Be sure to look at the other combinations already defined for your player so as not to conflict with something else the combination might already be used for. I don’t see any BUTTON_PLAY|BUTTON_REPEAT, BUTTON_NONE sequences, so there shouldn’t be any conflicts if you decide to use BUTTON_PLAY. There is a potential conflict with the action for STOP, though. You’ll have to experiment with it to see if it interferes or not.

Also, for clarification, this patch does not include the option to restart. That’s another patch altogether by different folks. I didn’t see much of a need for a restart option since you can just hit power again to turn it back on.


Thanks for the feedback. I am personally using this patch on my e200 series player daily. Based on that experience, the hotkey is an integral part of the patch. If I have to take the player off my belt clip and navigate the menus I almost might as well just use the clock in system → rockbox info.

OK, I’m not stopping you doing what you want, but I doubt it’ll be accepted into SVN with the hotkey. Personally, I have the time on my WPS and use a large font, but each to their own.

In this revision I fixed the patch not working. I think it had to do with some changes that were made to the english.lang file. That would have been clock2.diff, but I went ahead and made a couple more changes, and hence we now have clock3.diff instead of clock2.diff.

The changes made were: I added a shortcut to the wps (long power – press and hold power) to power off the player from the wps screen. My player (e200) already shuts down when holding power from the wps screen, but the behavior I have found to be erratic. My method here works faster and (hopefully) more consistent.

Note: to stop the current file from playing do a quick tap of menu/power
Note: to power off the player from wps, press and hold menu/power

Usage: Here’s how I apply the patch. Copy the clock3.diff file into the rockbox folder (apps will be a subdirectory of rockbox).

From a terminal shell, enter:

patch -p0 <clock3.diff

I created the clock3.diff file by:

svn diff apps >clock3.diff

Here is the latest patch file, clock5.diff. I seem to have forgotten to attach clock4.diff. Sorry about that.

Usage: Open a terminal and switch to your rockbox source directory (apps should be a subdirectory). Then enter: patch -p0 <clock5.diff

If at first you don’t succeed…

Clock6.diff makes another change: the clock is flipped upside down when displayed. Essentially, just prior to loading the clock plugin, the LCD is temporarily flipped, and then after the clock plugin exits, the LCD is set back to its default settings. If you already have your LCD flipped, then this code won’t have any real effect.

I carry my player on a belt clip and when I want to see the time I press and hold Play/Pause to bring up the clock. With the display now inverted while the clock is being shown, it’s a bit easier to see what time it is.


Available keyboard shortcuts


Task Details

Task Editing