On 5 Mar, "Glen Walker" wrote in message
   
<trinity-70e1eb24-5a0e-4077-a404-0298319e014c-1425567846822@3capp-mailcom-lxa09>:

> The accelerator may be any alphanumeric character, any function key (from
> F1 to F12) or one of the special characters listed in the table below
> (again, case doesn't matter):

The handling of keyboard shortcuts in RISC OS menus is one of the massive
bodges that the OS is famed for. Back in the day when the OS used a
fixed-width font or nothing, you just included the shortcuts in the menu
text and right-aligned them by hand with spaces.

  Help...              F1
  Show Global History ^F6

or whatever.

When we got proportional fonts on the desktop, that clearly stopped working.
But to avoid breaking existing apps, Acorn defined a set of shortcut codes
and when building a menu from Wimp_CreateMenu the Wimp searches menu entries
looking for them at the end of line. If it finds one, it removes all of the
preceeding spaces and then right-aligns them automatically.

Unfortunately, as "Red", "Blue" and "Green" are names of keys in RISC OS 5,
this can have some slightly unexpected consequences for a menu item like
"See Red"...

-- 
Steve Fryatt - Leeds, England

http://www.stevefryatt.org.uk/

Reply via email to