Apache OpenOffice (AOO) Bugzilla – Issue 42964
Localized menu has problem matching menu shortcut with input from keyboard
Last modified: 2013-08-07 15:03:05 UTC
If the menu is localized to non-latin language (in this case Thai), there will be a problem with using menu shortcut if the keyboard language is different from the menu language. 1) if the menu is in English and the keyboard layout is English - OK. For example, you can type 'Alt-F' then 'O' to open a file. 2) If the menu is in Thai and the keyboard layout is Thai - OK. For example, you can type 'Alt-ฟ' then 'ป' to open a file. 3) if the menu is in Thai but the keyboard layout is English, e.g. users is currently typing something in English - there'll be a problem. You can't type 'Alt-ฟ' and 'ป' to open a file because the keyboard layout is currently English. You can't type 'Alt-F' and 'O' either because the menu is in Thai. The user has to switch the keyboard layout to Thai before they can use the menu shortcut which is impracticle. 4) if the menu is in English but the keyboard layout is Thai, e.g. Thai users who prefer to use English UI and are typing Thai - there's a similar problem. You can't type 'Alt-F' and 'O' because the keyboard layout is currently Thai. The user has to switch the keyboard layout to English before they can use the menu shortcut which is impracticle. I think the cause of this problem is that OOo use translated keyboard character to find the menu item. The solution may be having OOo uses keyboard scan code and associates the scan codes with the menu items instead.
In my opinion, shortcut keys set should be in the same language as the language of ui (since they the shortcuts for ui!). i.e. If the menu is in English, we shouldn't allow any other language shortcut to be function. ---- I think I and Samphan agree the same in the above point. But the thing he likes to mention, get it to be fixed, is "How to trap the shortcut keys properly? No matter what the current keyboard layout is." How to trap both 1) key <Alt> + character 'F', and 2) key <Alt> + character 'ด' as the same "Alt-F"? note: (1)'s keyboard layout is typical QWERTY (English). (2)'s keyboard layout is Kedmanee (Thai). in those layouts, character 'F' and character 'ด' use the same physical key (button). If we can trap this properly, the shortcut keys for the current UI language will always works, no matter what the current keyboard layout is. Is that your idea, P'Samphan?
Yes, the code that handle menu short cut should work regardless of which keyboard layout the user use. So the code should use keyboard scan code instead.
We can distinguish two kinds of shortcut a) menu shortcuts (Alt + underlined letter from the menu); these would obviously be localized along with the menu b) other keyboard shortcuts (e.g.Ctl + S for save); I don't think you want these localized In both these cases, they should work regardless of the currently active keyboard layout, e.g. a) the current keyboard layout is English, the menus are Thai, I should be able to activate the shortcut without changing the keyboard layout to Thai and back b) the current keyboard layout is Thai, there is a shortcut using an ASCII character (e.g. Ctl + S), I should be able to activate the shortcut without changing the keyboard layout to English and back Note that Word 2003 does both a) and b). Also note that a single menu may have two shortcuts on the same key but with different shift states (e.g. Microsoft Word's File menu has a shortcut on ร and a shortcut on ณ, which are both on the same key (the same key as I)). In other words, you need to consider the modifiers as well as the keycode.
confirmed.
Test using OOo 1.9.84 on Windows and 1.9.71.1 on Linux, I found that b) works, e.g. while using Thai keyboard I can press 'Ctrl-A' to select all or 'Ctrl-S' to save.
set target to 2.0.1
FT: Spec has been added at http://specs.openoffice.org/g11n/menu_keycodes/42964_Match_localized_menu_with_input_from_keyboard.odt FT->SSA: Please start implementation. Thank you very much.
started
Fixed in CWS thaiissues. Mnemonics now always work regardless of the current keyboard configuration. On Windows it works in both ways, i.e. Thai localized menus with English keyboard and English localized menus with Thai keyboard. On UNIX only English localized menus with Thai keyboard will work. (There is no way to map a (Thai-)Unicode to the corresponding scancode, so no comparison is possible)
ssa->sba: please verify. re-open issue and reassign to sba@openoffice.org
reassign to sba@openoffice.org
reset resolution to FIXED
SBA: Verified in CWS thaiissues.
SBA: OK in OOo 2.01. Still OK in OOo 2.02. Closed.
Created attachment 73370