#7428: Alt-Plus won't work in WebPositive ----------------------------------------+---------------------------- Reporter: js | Owner: leavengood Type: bug | Status: new Priority: normal | Milestone: R1 Component: Applications/WebPositive | Version: R1/Development Resolution: | Keywords: Blocked By: | Blocking: Has a Patch: 0 | Platform: All ----------------------------------------+---------------------------- Comment (by leavengood): I think we need a way to ask the keymap what is required to get a certain character, and then the shortcut handling will take that into account. So for example in this ticket, the plus sign (+) is on the equals (=) key on US and UK keymaps. So for Cmd-+ to work on those keymaps, we really need to look for Cmd-Shift-+. The reason we would not look for Cmd-Shift-= is that the key will already have been offset (in the parlance of keymaps) to + from = in the keyboard handling, since Shift was down. The good thing about that is that Cmd-Shift-= could in theory still be a shortcut for something else, and it would still work, given there was another way to get an = while Shift was down (such as in the numpad.) Of course that isn't a smart way to set up shortcuts in an app, but it could work. Checking out the Keymap code there is not yet any facility for this, but it should be possible to build inverse maps from characters to modifiers needed to get those characters. Though I guess shift is the main one we would be concerned with for this purpose. So maybe: {{{ uinit32 BKeymap::ModifiersNeededForCharacter(unit32 c) { // Something which builds an inverse map if it doesn't yet exist, caches // it, and looks up the modifiers needed for c. Probably just the shift_map // to start. } }}} When a shortcut is set up (and when the keymap changes), the above can be called, and the modifiers returned can be added to the shortcuts modifiers list. And then it should all magically work. Of course letters would not have this done (since we want Cmd-q and Cmd-Q to work the same.) Add translatable shortcuts as I discussed in https://dev.haiku- os.org/ticket/2499#comment:17 and I think Haiku no longer has a shortcut problem. -- Ticket URL: <http://dev.haiku-os.org/ticket/7428#comment:5> Haiku <http://dev.haiku-os.org> Haiku - the operating system.