Apache OpenOffice (AOO) Bugzilla – Issue 77556
Tools-Customize-Keyboard - keys not shown
Last modified: 2007-11-28 17:42:04 UTC
Choose Tools-Customize-Keyboard. No shortcut keys are visible.
keyword
On demand, reassigning issue to jennajamson
I will start to solve this Issue, ... ;)
To Information. I searched for the function which displays this Dialog to analyze the hole procedure. // Insert all editable accelerators into list box. It is possible // that some accelerators are not mapped on the current system/keyboard // but we don't want to lose these mappings. USHORT c1 = KEYCODE_ARRAY_SIZE; USHORT i1 = 0; USHORT nListPos = 0; /*Cere*/ cout << "Number of Keycode-Elements: " << c1 << endl; for (i1=0; i1<c1; ++i1) { KeyCode aKey = KEYCODE_ARRAY[i1]; String sKey = aKey.GetName(); /*Cere*/ cout << sKey.Len() << endl; /*Cere*/ sKey.Append('H'); if (!sKey.Len()) continue; TAccInfo* pEntry = new TAccInfo(i1, nListPos, aKey); SvLBoxEntry* pLBEntry = aEntriesBox.InsertEntryToColumn(sKey, 0L, LIST_APPEND, 0xFFFF); pLBEntry->SetUserData(pEntry); } In this part i found the starting thing. It fills the ListBox, which does not show anything. The Lines starting with /*cere*/ are added by me. When running the Application with this Code it shows items in the ListBox with every 'h' append to the KEYCODe_ARRAY-Object-Name and other information. So then, it works well. The KEYCODE_ARRAY Elements seems to have an issue , one more, i think the KEYCODES with this Application.
I followed it back to the Key.hdl in namespace com { namespace sun { namespace star { namespace awt { namespace Key I don't know how this file is created etc., so i have to analyze this, better.
*** Issue 79048 has been marked as a duplicate of this issue. ***
The modified file is : sfx2/source/dialog/acccfg.cxx
To reproduce the trace above : just add the changes in the code, because sfx2 does crash when debug is enabled -> needs investigations
Created attachment 46457 [details] like previously described, add something not null shows shortcuts
Comments on the screenshot above : On left "0" value is returned for all shortcuts, and use whatever makes the string appear. Resource file not found, or unreadable ? On right, you can see the shortcut names (french sorry). They only appear when entry is != NULL
The problem is that AquaSalFram::GetKeyName is implemented as a dummy that returns empty strings for key names. That triggers the if (aKey.getName().getLen() == 0) continue; shortcut when filling the list box. The code appears to interpret an empty key name as: platform does not know this key code, so we should not list it. Getting empty all the time also might cause more serious problems later, if the code assumes the list is not empty.
attaching a rudimentary implementation for AquaSalFrame::GetKeyName that tries to solve the problem. However there are known big problems: - the used KeyTranslate function is deprecated - KeyTranslate does not return any useful string for e.g. function keys - I have found no way yet to get the label for the shift, control and alt keys. Perhaps someone who knows the Mac APIs better than I can make this work ?
Created attachment 46480 [details] incomplete GetKeyName implementation
IHMO, this issue is fixed in aquavcl03 -> Worksforme
fixed with issue 80027 in aquavcl03, closing