[haiku-development] Re: AltGr Key, key_map, and the US-International Keyboard

  • From: pulkomandy <pulkomandy@xxxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Mon, 2 Apr 2012 18:34:53 +0200

On Sun, Apr 01, 2012 at 05:42:50PM -0400, John Scipione wrote:
> On Sun, Apr 1, 2012 at 3:25 PM, Pete Goodeve <pete.goodeve@xxxxxxxxxxxx> 
> wrote:
> > There are no default Opt symbols!  I've grown used to having things like
> > the '£' sign available, but those vanish if I select American.
> > OTOH, with that I get two Ctrls, two Cmds, and two Opts, in places
> > that correspond to what I see on the physical K/B.
> 
> The American keymap is a US ASCII only keymap at this point. There are
> no special keys defined. I am refactoring things now to support the
> AltGr key for a while now. This brings up a good point though. If
> option is reused for system wide shortcuts like Windows then how are
> people without an AltGr key going to be able to access special keys?
> The option layer seems like the logical choice, but, then conflicts
> would happen between the option map and system shortcuts. Do we make
> an exception for US-ASCII that the special keys going in option but in
> other layouts with an AltGr key they go in AltGr?

The current "American" keyboard is the WYSIWYG one : it just matches
the key labels of US keyboards. This has some limitations, but you have
to live with them if you want to be standard.

The US-International keymap is there to solve this. It brings something
similar to an AltGr key, at the cost of not completely matching what's
on the physical keys anymore (maybe there are some us-international
keyboards manufactured somewhere, I don't know about that).

We have a similar problem with the French keyboard where it isn't
possible to use accents with uppercase letters. Each OS has a different
solution to that. Linux makes shift and caps lock have different
behaviour (so shift + é will get you 2, while é in caps lock mode will
get an uppercase e with acute accent). Windows requires you to hold the
alt key and type in some magic value (unicode codepoint maybe ? I don't
remember), so that ALT + 160 gets you an uppercase é or something like
that.
Another solution, which I find better, is to put these extra chars on
the AltGr layer, as there's quite some space.

Anyway, I gave up with that and now use a spanish keyboard most of the
time, so I can easily reach all the french characters.

A 105 key keyboard will never be enough to type in all the languages at
the same time; that's why there are keymaps, and there's also
KeymapSwitcher if you want to use multiple ones.

As for selecting your keyboard layout, this is asked for in the
ReadOnlyBootPrompt, which pops up when Haiku is booted from readonly
media (eg. an install CD). This is not done in installer because it is
also useful for the livecd mode. As it seems more people are moving to
installing from usb-drives, maybe we should change the behaviour and
make it always popup if there's no keymap in the user's homefolder ?

-- 
Adrien.

Other related posts: