Issue 77556 - Tools-Customize-Keyboard - keys not shown
Summary: Tools-Customize-Keyboard - keys not shown
Status: CLOSED IRREPRODUCIBLE
Alias: None
Product: porting
Classification: Code
Component: MacOSX (show other issues)
Version: 680m211
Hardware: Mac Mac OS X, all
: P3 Trivial (vote)
Target Milestone: ---
Assignee: jennajamson
QA Contact: issues@porting
URL:
Keywords: aqua
: 79048 (view as issue list)
Depends on:
Blocks: 77608
  Show dependency tree
 
Reported: 2007-05-19 03:20 UTC by msicotte
Modified: 2007-11-28 17:42 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
like previously described, add something not null shows shortcuts (236.96 KB, image/jpeg)
2007-07-02 22:33 UTC, eric.bachard
no flags Details
incomplete GetKeyName implementation (3.47 KB, patch)
2007-07-03 14:33 UTC, philipp.lohmann
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description msicotte 2007-05-19 03:20:06 UTC
Choose Tools-Customize-Keyboard.  No shortcut keys are visible.
Comment 1 msicotte 2007-05-19 03:20:30 UTC
keyword
Comment 2 eric.bachard 2007-05-22 19:44:35 UTC
On demand, reassigning issue to jennajamson
Comment 3 jennajamson 2007-05-22 19:52:49 UTC
I will start to solve this Issue, ... ;)
Comment 4 jennajamson 2007-06-15 17:48:30 UTC
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.
Comment 5 jennajamson 2007-06-15 18:24:41 UTC
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.


Comment 6 eric.bachard 2007-07-02 16:12:13 UTC
*** Issue 79048 has been marked as a duplicate of this issue. ***
Comment 7 eric.bachard 2007-07-02 20:55:51 UTC
The modified file is : sfx2/source/dialog/acccfg.cxx
Comment 8 eric.bachard 2007-07-02 21:04:22 UTC
To reproduce the trace above :

just add the changes in the code, because sfx2 does crash when debug is enabled

-> needs investigations
Comment 9 eric.bachard 2007-07-02 22:33:33 UTC
Created attachment 46457 [details]
like previously described, add something not null shows shortcuts
Comment 10 eric.bachard 2007-07-02 22:35:54 UTC
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 


Comment 11 joerg.barfurth 2007-07-03 13:01:35 UTC
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.
Comment 12 joerg.barfurth 2007-07-03 13:01:49 UTC
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.
Comment 13 philipp.lohmann 2007-07-03 14:32:06 UTC
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 ?
Comment 14 philipp.lohmann 2007-07-03 14:33:20 UTC
Created attachment 46480 [details]
incomplete GetKeyName implementation
Comment 15 eric.bachard 2007-10-27 08:54:09 UTC
IHMO, this issue is fixed in aquavcl03 

-> Worksforme
Comment 16 philipp.lohmann 2007-11-28 17:42:04 UTC
fixed with issue 80027 in aquavcl03, closing