[haiku-development] Re: Key roles vs. key label in menus

  • From: "Ingo Weinhold" <ingo_weinhold@xxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Sun, 08 Apr 2012 15:43:06 +0200

Rimas Kudelis wrote:
> 2012.04.07 21:22, John Scipione rašė:
> > #2 While Strg would work for German, it is difficult to find universal 
> > translations for abbreviations of Option and Command for all languages.
> 
> That's because such keys are nonexistant on typical keyboards, and where 
> they do exist, they are marked as⌥ and ⌘ respectively. By the way, I saw 
> a macbook at a shop a few days ago, on which the ⌥ key didn't even 
> mention "Option" anymore. It had the symbol and small letters "Alt" instead.
> 
> In my opinion, showing nonexistant key labels is just as bad as showing 
> symbols ◇ , ○ and ◻ – the user will not know which symbol or keycap 
> represents the actual key either way. What Haiku does at the moment 
> (showing Alt or Ctrl, depending on my settings) is the correct way to 
> behave. Although perhaps the PC/Mac keycaps mode could be configurable.

There was a longish discussion in a Trac ticket regarding key legends vs. key 
roles (in the menus and in Keymap). I'm too lazy to look it up now, but I'm 
sure, if you're interested, it won't be too hard to find. Or maybe someone has 
a link handy. At the end of the discussion most people agreed that key roles 
are the way to go. I'll try to summarize it.

I believe the main (and only) argument for using key legends in the menus is 
that it's very nice for the user, when the shortcut in the menu exactly matches 
the legends on the keyboard, so it's absolutely clear what keys to press to 
trigger the action. The argument against that is that it is practically 
impossible for Haiku to know what is printed on the keys.

One reason for that already discussed is localization. We already have two 
possible localization dimensions in Haiku: The preferred language and the 
language generally associated with the keymap chosen. Neither of which has 
necessarily anything to do with the physical key legends. E.g. Adrien uses a 
Spanish keymap although his legends are French, I use an English locale and a 
US layout although (at least on my laptop) the legends are German.

The second reason are keyboard manufacturer variations. My Kinesis keyboard has 
a weird mix of legends for the modifier keys (probably to accommodate both 
Windows and Mac users) and I had to remap them (via a keyboard feature) to get 
pleasant mappings. Apparently Apple has renamed the key formerly known as 
Option to Alt and, if I understand you correctly, the former Apple key now 
sports the clover symbol.

The third reason is that Keymap allows to arbitrarily remap keys. E.g. people 
with an AltGr key and standard Haiku modifiers roles (i.e. Alt == Command) 
might want to use the right Windows key as right Command. People who don't make 
use of Caps Lock might reuse it for something else. In either case you have 
physically differently labeled keys performing the same role, and showing both 
in the menu doesn't really work. And what you remap in Keymap would essentially 
be key roles anyway; their names would (possibly) just match the legends of 
some keys.

I'm rather unpassionate regarding whether to use symbols or text (including 
bitmaps with text) for key roles. I wouldn't be happy with using symbols that 
so far aren't associated with the respective key roles. IMO when symbols are 
used, using the clover symbol for Command makes the most sense as it is printed 
on current (Apple) keyboards (and even had been printed on the keyboards of Mac 
clones back in the day when BeOS ran mainly on those). Using ^ for Control is 
obvious enough too. I don't find the argument that it could be confused with 
the key labeled thusly that strong. As long as a distinctive font or special 
bitmaps are used for the modifier symbols, it should be clear what is meant. I 
haven't seen the ⌥ yet, but if Apple starts to use it on their keyboards, it 
sounds good enough.

As I wrote before I'd be fine with using text for the key roles as well. Both 
as plain text or as bitmap it would have to be localizable, though. In either 
case (symbols or text) the names of the key roles (as used in tools tip and 
documentation) would be localized, too. I find the current names (Command = 
issues commands/primary shortcut key, Control = control characters/secondary 
shortcut key, Option = optional characters) fit pretty well, so unless someone 
comes up with convincingly better ones, they'd be fine by me.

CU, Ingo

Other related posts: