[haiku-webkit-commits] Re: r560 - webkit/trunk/WebKit/haiku/WebPositive

  • From: "Axel Dörfler" <axeld@xxxxxxxxxxxxxxxx>
  • To: haiku-webkit-commits@xxxxxxxxxxxxx
  • Date: Fri, 31 Dec 2010 11:29:38 +0100 (MET)

Hi Rene,

> A naive approach might be that, if
> the shift key is held, but no match is found with that set of
> modifiers, look for matches without the shift modifier. Though we
> might have the same problem on layouts that require Alt Gr or other
> dead keys to produce the character the menu item wants. Axel, Stephan,
> any thoughts?

I think the problem is a bit more complex than that, as different shortcuts 
could happen to map to the same key with different layouts, although the naive 
approach might already cure most problems.

In my opinion, the only real solution to this problem is to add another 
AddShortcut() call that let's you specify (maybe there is a bit in the modifier 
mask left free) if the location of the key or the mapping is important, and 
that the actual shortcut should be registered depending on this. This mechanism 
could already make sure that no clashes happen by considering the shortcut 
specification as a constraint that might be violated.
For the time being, it might be enough to implement the above, and determine 
the "position over mapping" constraint simply via !isalnum(shortcut).

In the long run, I think it would also be helpful to have a configurable 
mapping between the shortcuts defined in the application, and the actual 
mappings. A dedicated shortcut preferences application (and/or widget) could 
then let you change them in a consistent way.

Bye,
   Axel.


Other related posts: