← Back to team overview

kicad-developers team mailing list archive

Place menu accelerators - episode 2

 

Hello,
how to we like this setup for the accelerators of the Place menu (see
attachment)? In linux seems ok.

In order to keep the accelerators list derived to the hotkeys list, I
thought of achieving this with:


wxString AddHotkeyName( const wxString& aText, Ki_HotkeyInfo** aList,
                        int aCommandId, bool aIsShortCut )
{
    wxString msg = aText;
    wxString keyname;

    if( aList )
        keyname = ReturnKeyNameFromCommandId( aList, aCommandId );

    if( !keyname.IsEmpty() )
    {
        if( aIsShortCut )
            msg << wxT( "\t" ) << keyname;
        else
            if  (keyname.IsSameAs(wxT( "P" ))|keyname.IsSameAs(wxT( "/" )) )
                msg << wxT( "\t" ) << MODIFIER_ALT <<  keyname;
            else
                msg << wxT( "\t" ) << MODIFIER_SHIFT <<  keyname;
    }

    return msg;



How do we like it?

Regards
Fabrizio

Attachment: Screenshot.png
Description: PNG image