Opened 11 years ago

Last modified 2 years ago

#2499 assigned bug

[Keymap] shortcuts don't work with some keymaps

Reported by: diver Owned by: nobody
Priority: normal Milestone: R1
Component: Kits/Interface Kit Version: R1/Development
Keywords: Cc: fyysik, siarzhuk
Blocked By: Blocking: #6225
Has a Patch: no Platform: All

Description (last modified by diver)

Shortcuts don't work with Russian keymap. I can't close windows (alt+w) or anything else I used to use when current keymap is Russian, and I suspect several others as well. I know that it's the same behaviour as in BeOS, but I really think it was a bug.

Change History (21)

comment:1 by jackburton, 11 years ago

Did you try to check if CTRL is selected as shortcut key in the Menu preflet ? The italian keymap has the same "issue".

comment:2 by diver, 11 years ago

Yeah, Ctrl is selected as shortcut key, I tried with Ctrl+w to close a window, but this also didn't work.

comment:3 by jackburton, 11 years ago

What happens if you open the menu preflet, choose ALT as shortcut, then choose CTRL again ?

comment:4 by stippi, 11 years ago

I was also wondering about the same thing. It looks to me like the keymaps don't define the very same combination of modifier mappings that the Menu preflet will define.

in reply to:  3 comment:5 by diver, 11 years ago

Replying to jackburton:

What happens if you open the menu preflet, choose ALT as shortcut, then choose CTRL again ?

If I select ALT, shortcuts doesn't work either.

comment:6 by aldeck, 11 years ago

There has been some changes in hrev27095, is it better?

comment:7 by diver, 11 years ago

Nope, nothing changed.

comment:8 by diver, 10 years ago

Anything else I could try?

comment:9 by diver, 10 years ago

Summary: [Keymap] Hotkeys doesn't work with Russian keymap[Keymap] hotkeys doesn't work with some keymaps

comment:10 by diver, 10 years ago

Still here in hrev35569.

comment:11 by diver, 10 years ago

Version: R1/pre-alpha1R1/Development

comment:12 by X512, 9 years ago

Blocking: 6225 added

(In #6225) To make Alt + work need press + key on numpad. Hotkeys handling implemented in libbe or app_server, not in WebPositive. Same problem with keymaps with non-english set. This problem is duplicate of #2499.

comment:13 by jscipione, 9 years ago

I tested this bug using Alt+numpad_plus_sign and the key combination does work as expected and increases the size. X512 is correct, this is a bug in app_server or libbe, not Webpositive.

comment:14 by stippi, 9 years ago

I rather think it's a problem in the keymap or the input_server. Perhaps there are certain situations in which a dead key should not be treated as a dead key.

comment:15 by X512, 9 years ago

Component: Add-Ons/Input FiltersKits/Interface Kit
Owner: changed from korli to axeld

Problem in /src/kits/interface/Menu.cpp in KeyDown function.

When use press hotkey with non-latin keymap, input char and hotkey char don't equals and nothing happens. For example if I press Alt+W hotkey with Russian keymap, menu handles this combination as Alt+Ц.

Possible solutions:
1) Use scancodes for hotkeys handling.
2) Translate key to latin keymap.
3) Localize hotkeys.

comment:16 by diver, 9 years ago

Still here in hrev38300.

comment:17 by leavengood, 7 years ago

TL;DR:

We probably need to make shortcuts translatable.

Full version:

One of my interests is the Haiku menu shortcuts and making sure they work right, and I have plans for introducing a ShortcutManager within the Interface Kit to improve the code. Of course that alone won't solve this issue, but while I was working on such a thing I could try to solve this problem.

The Alt+ combo is one of the few US or UK keymap problems which is affected by this (see #7428), but I know for other keymaps this is a much bigger issue (hence this ticket.)

Feeling this is a complex issue with other people might have solved, I did some searching and found the Qt documentation for QKeySequence:

http://doc.qt.nokia.com/4.7-snapshot/qkeysequence.html

Of particular interest to this ticket is their discussion of keyboard layout issues:

http://doc.qt.nokia.com/4.7-snapshot/qkeysequence.html#keyboard-layout-issues

So based on the above it seems that more or less the best way to handle this is to translate the shortcuts. Of course as they discuss, the translations may not always match the keyboard layout of all the speakers of a particular language, but they are probably better than no shortcuts working at all.

I also was very interested in their list of "standard shortcuts":

http://doc.qt.nokia.com/4.7-snapshot/qkeysequence.html#StandardKey-enum

While Qt's use of this is mainly because it runs on multiple OSes I have thought that defining such a list in Haiku with a preference application would allow for maximum customizing of shortcuts for all users. The above list would be a good start should we decide to do that, but this is definitely an R2 thing.

For now I think it would be nice to add preferences for some of the hard-coded shortcuts for OS-level commands (the menu key opening the Deskbar menu being the most egregious, defined within the keyboard device!!!)

But I digress: the question for this ticket is whether it would be possible to add translated shortcuts without breaking the existing API. Also the shortcut handling needs to be smarter so that it can figure out that Cmd-Shift-= is the same as Cmd-+ on the US and UK keymap, with similar smarts on other keymaps. But I think that is different than the issue in this ticket.

in reply to:  17 comment:18 by siarzhuk, 7 years ago

Replying to leavengood:

We probably need to make shortcuts translatable.

I recommend to initiate brain storm discussion in the development list. The are really lot of different opinions about the shortcuts thema and we have to hear every one.

comment:19 by diver, 5 years ago

Description: modified (diff)
Summary: [Keymap] hotkeys doesn't work with some keymaps[Keymap] shortcuts don't work with some keymaps

comment:20 by pulkomandy, 5 years ago

There may be a simpler solution at least for Russian. We could add a "command" plane to our keymaps, and have the qwerty mapping there for Russian. This way, pressing the option key would select tat plane where the keys would match the shortcuts again. We would then only need to find the matching key in this plane, and find the symbol used for it in the main plane so we can display the right thing on screen.

comment:21 by axeld, 2 years ago

Owner: changed from axeld to nobody
Status: newassigned
Note: See TracTickets for help on using tickets.