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

  • From: John Scipione <jscipione@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Mon, 26 Mar 2012 18:52:53 -0400

On Mon, Mar 26, 2012 at 6:00 PM, Ingo Weinhold <ingo_weinhold@xxxxxx> wrote:
> John Scipione wrote:
>> On Mon, Mar 26, 2012 at 4:42 PM, Ingo Weinhold <ingo_weinhold@xxxxxx> wrote:
>> 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.

You want to add an B_ALT_GR key role. Okay, I'll whip up a nice menu
bitmap for it. :) But seriously, that would work and then I could get
rid of the checkbox. But I'd have to hardcode it to 0x5f (right alt)
and you couldn't change it via keymap otherwise the keymaps would all
have to modified to include it. In the meantime the Checkbox provides
the status quo. I won't work on improving it since it will go away.

>> 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.

We need support for a layer below keymap that converts the intended
shortcuts based on the key role to the current keymap and support for
multiple keymaps and a way to switch between them. Basically the
Keymap Switcher needs to be built-in and use an API provided by the
Interface Kit.

John Scipione

Other related posts: