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

  • From: "Adrien Destugues" <pulkomandy@xxxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Sun, 08 Apr 2012 09:53:16 +0200

Le Sun, 08 Apr 2012 09:15:26 +0200, Rimas Kudelis <rq@xxxxxx> a écrit:

Another problem with localizing this is that there is no mapping between keyboard layout and locale.

Of course not. But there _is_ a mapping between most likely _physical keyboard_ and locale.

I use a spanish keyboard with a french system, I know a lot of our german devs use an us-qwerty layout, and so on. If you have a localized app, you'll get 'STRG', and a non-localized one will show 'CTRL'.

The key names should not be part of the layout. They should be part of the locale in question. So, if you are using French locale, the bitmaps would always reflect the French keyboard, regardless of what actual layout you are using.


How do you know this is actually the same key ? Or do we make this always use the 'main' language ? In that case, it would need special support from the locale kit, because everything was made so that each application gets only one language.

Keycaps should be part of the system L10n. Not layout or application.

There is no such thing in Haiku. The system provides everything to an application in the language this application is using. This way, each application comes with only one language. The way Windows does it is very bad, for exemple I often see an english message box with buttons labelled in French "Oui", "Non", "Annuler". This is not good. If the application is not localized, the system should give it english text, and in Haiku that's what it does.

On the other hand, the key label actually IS linked to the keyboard layout, not to the current language the application might happen to be using. I thought we all agreed on using key roles; because we came to the conclusion that it wasn't possible to match all possible combinations of keyboards and users settings anyway. I now hear that sun keyboard needs a diamond for command, and logitech keyboard a sun-like symbol for control, while mac keyboards use something else for option. So, I still think that Haiku should show CMD/OPT/CTRL/SHIFT, and I'd not even bother localizing them, because this is NOT a locale issue, it's an issue of physical labelling of keyboards being inconsistent between manufacturers, that is also related to country-dependant keyboard layouts.

Anyway, I don't want to invest more time in this discussion. We have just run a complete loop from key labels, to symbols, to roles, and back. It's not worth doing it again. I have better things to spend my time on.

--
Adrien.

Other related posts: