[haiku-commits] Re: haiku: hrev43888 - src/preferences/keymap

  • From: "Ingo Weinhold" <ingo_weinhold@xxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 27 Mar 2012 00:00:10 +0200

John Scipione wrote:
> On Mon, Mar 26, 2012 at 4:42 PM, Ingo Weinhold <ingo_weinhold@xxxxxx> wrote:
> > Adrien Destugues wrote:
> >> Le Mon, 26 Mar 2012 21:58:16 +0200, John Scipione <jscipione@xxxxxxxxx> a
> >> écrit:
> >> A normalkeyboard is :
> >>
> >> CTRL WIN ALT SPACE ALTGR WIN MENU CTRL
> >>
> >> On Haiku we want ALT to be COMMAND (to match other languages and trigger
> >> shortcuts), but ALTGR to be OPTION (to enter some needed special chars).
> >> So, we get the left WIN to be OPTION and the right one to be META.
> >
> > What is Meta? Never seen that one in Haiku. Anyway, the IMO obvious thing 
> > to do is introduce an AltGr key role and map things naturally:
> 
> Meta is another name for the Windows key.

Then I don't get Adrien's last sentence.

> > Ctrl -> Control
> > Win -> Option
> > Alt -> Command
> > AltGr -> AltGr
> > Menu -> Menu
> 
> But what key role does AltGr get by default, there are only 3 options,
> B_CONTROL, B_OPTION, or B_COMMAND. There is no B_ALT_GR key role. The
> obvious one is B_COMMAND, but for users of the French keymap it is
> B_OPTION (and right Windows gets moved to B_COMMAND).

That's what I'm saying: The AltGr key role should be introduced. That may or 
may not be tricky with respect to binary compatibility or extending the keymap 
format, but I feel the role should be there. I rarely use the German keymap for 
any other cases than typing umlauts when I have to, but if I would really use 
it, I'd also expect the AltGr key to work exactly as it does on other OSs.

[...]
> All that being said, none of this accounts for switching between
> multiple keymaps using KeymapSwitcher. Some re-architecting of how
> Keymaps are stored and used is needed for that. This also doesn't help
> you in Pe, which, much to my chagrin, doesn't respect the keymap
> settings at all and does it's own thing.

Yeah, IMO the only good solution is a to provide coherent interfaces/APIs for 
dealing with shortcuts. That means a way for applications to register actions, 
a standard settings GUI to assign shortcuts for actions (supporting both key 
role and key bound shortcuts, maybe even variants for different keymaps), and 
of course the respective handling in the interface kit.

CU, Ingo

Other related posts: