[haiku-development] Shortcut handling of shortcuts with shifted keys

  • From: Ryan Leavengood <leavengood@xxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Thu, 2 Aug 2012 09:55:45 -0400

The issue of Cmd-+ (as one example) not working as a shortcut in Haiku
(and probably BeOS) when using the US or UK keymap has been around a
while. There are several issus related to this, but the one were I've
put some (detailed) comments is here:

https://dev.haiku-os.org/ticket/7428

If you read the above I propose a scheme where when shortcuts are set
up, they query the keymap to see if modifiers are needed to get the
character in the shortcut. For the case of + on the US keymap, that
would be Shift. In addition because the Cmd modifier causes all key
offsetting to be skipped within BKeymap, not only do we need to add to
the modifiers, we need to change the key to = to be able to match that
shortcut.

The more I think about this, the more convoluted it seems. Is there
another solution? If we masked out Cmd in the BKeymap Offset routine,
we could at least see Cmd-Shift-+ in the shortcuts handling, which
might be better than trying to look for Cmd-Shift-= when in theory
that could be defined for another shortcut.

Of course this same problem applies to any shortcut key which requires
shift to get it in the currently used keymap. For example I know
German users generally don't have [ or ] as unshifted in their
keymaps, which is why the rotation shortcuts in ShowImage were changed
to Cmd-R and Cmd-Shift-R. But things like Cmd-+ are pretty standard
for zooming on other operating systems, and I'd personally rather not
Haiku be the only OS which cannot handled shifted shortcut keys.

-- 
Regards,
Ryan

Other related posts: