Make hotkey string info translatable in dialogs. These strings are now prefixed by _HKI , which can be used by translation tools to extract them.

This commit is contained in:
jean-pierre charras 2015-03-22 15:04:09 +01:00
parent 0350290499
commit 0e03fbff07
7 changed files with 220 additions and 192 deletions

View File

@ -129,7 +129,7 @@ wxString HOTKEY_LIST_CTRL::OnGetItemText( long aRow, long aColumn ) const
if( aColumn == 0 )
{
return hotkey_descr->m_InfoMsg;
return wxGetTranslation( hotkey_descr->m_InfoMsg );
}
else
{
@ -370,10 +370,11 @@ bool HOTKEYS_EDITOR_DIALOG::CanSetKey( long aKey, const wxString* sectionTag )
if( conflictingKey != NULL )
{
wxString info = wxGetTranslation( conflictingKey->m_InfoMsg );
wxString msg = wxString::Format(
_( "<%s> is already assigned to \"%s\" in section \"%s\". Are you sure you want "
"to change its assignment?" ),
KeyNameFromKeyCode( aKey ), conflictingKey->m_InfoMsg,
KeyNameFromKeyCode( aKey ), GetChars( info ),
*(conflictingSection->GetHotkeySection()->m_Title) );
wxMessageDialog dlg( this, msg, _( "Confirm change" ), wxYES_NO | wxNO_DEFAULT );

View File

@ -424,6 +424,7 @@ int KeyCodeFromKeyName( const wxString& keyname )
void DisplayHotkeyList( EDA_BASE_FRAME* aFrame, struct EDA_HOTKEY_CONFIG* aDescList )
{
wxString keyname;
wxString keymessage;
EDA_HOTKEY** list;
wxString msg = wxT( "<html><body bgcolor=\"#E2E2E2\">" );
@ -443,12 +444,13 @@ void DisplayHotkeyList( EDA_BASE_FRAME* aFrame, struct EDA_HOTKEY_CONFIG* aDescL
if( !hk_decr->m_InfoMsg.Contains( wxT( "Macros" ) ) )
{
keyname = KeyNameFromKeyCode( hk_decr->m_KeyCode );
keymessage = wxGetTranslation( hk_decr->m_InfoMsg );
// Some chars should be modified, using html encoding, to be
// Some chars are modified, using html encoding, to be
// displayed by DisplayHtmlInfoMessage()
keyname.Replace( wxT( "<" ), wxT( "&lt;" ) );
keyname.Replace( wxT( ">" ), wxT( "&gt;" ) );
msg += wxT( "<tr><td>" ) + hk_decr->m_InfoMsg + wxT( "</td>" );
msg += wxT( "<tr><td>" ) + keymessage + wxT( "</td>" );
msg += wxT( "<td><b>&nbsp;&nbsp;" ) + keyname + wxT( "</b></td></tr>" );
}
}

View File

@ -44,14 +44,19 @@
#include <dialogs/dialog_schematic_find.h>
// Remark: the hotkey message info is used as keyword in hotkey config files and
// as comments in help windows, therefore translated only when displayed
// they are marked _HKI to be extracted by translation tools
// See hotkeys_basic.h for more info
/* How to add a new hotkey:
* add a new id in the enum hotkey_id_command like MY_NEW_ID_FUNCTION (see
* hotkeys.h).
* add a new EDA_HOTKEY entry like:
* static EDA_HOTKEY HkMyNewEntry(wxT("Command Label"), MY_NEW_ID_FUNCTION,
* static EDA_HOTKEY HkMyNewEntry(_HKI("Command Label"), MY_NEW_ID_FUNCTION,
* default key value);
* wxT("Command Label") is the name used in hotkey list display, and the
* _HKI("Command Label") is the name used in hotkey list display, and the
* identifier in the hotkey list file
* MY_NEW_ID_FUNCTION is an equivalent id function used in the switch in
* OnHotKey() function.
@ -75,146 +80,141 @@
*/
// local variables
// Hotkey list:
/**
* Common commands
*/
// Common commands
// Fit on Screen
#if !defined( __WXMAC__ )
static EDA_HOTKEY HkZoomAuto( wxT( "Fit on Screen" ), HK_ZOOM_AUTO, WXK_HOME, ID_ZOOM_PAGE );
static EDA_HOTKEY HkZoomAuto( _HKI( "Fit on Screen" ), HK_ZOOM_AUTO, WXK_HOME, ID_ZOOM_PAGE );
#else
static EDA_HOTKEY HkZoomAuto( wxT( "Zoom Auto" ), HK_ZOOM_AUTO, GR_KB_CTRL + '0',
static EDA_HOTKEY HkZoomAuto( _HKI( "Zoom Auto" ), HK_ZOOM_AUTO, GR_KB_CTRL + '0',
ID_ZOOM_PAGE );
#endif
static EDA_HOTKEY HkZoomCenter( wxT( "Zoom Center" ), HK_ZOOM_CENTER, WXK_F4,
static EDA_HOTKEY HkZoomCenter( _HKI( "Zoom Center" ), HK_ZOOM_CENTER, WXK_F4,
ID_POPUP_ZOOM_CENTER );
// Refresh Screen
#if !defined( __WXMAC__ )
static EDA_HOTKEY HkZoomRedraw( wxT( "Zoom Redraw" ), HK_ZOOM_REDRAW, WXK_F3, ID_ZOOM_REDRAW );
static EDA_HOTKEY HkZoomRedraw( _HKI( "Zoom Redraw" ), HK_ZOOM_REDRAW, WXK_F3, ID_ZOOM_REDRAW );
#else
static EDA_HOTKEY HkZoomRedraw( wxT( "Zoom Redraw" ), HK_ZOOM_REDRAW, GR_KB_CTRL + 'R',
static EDA_HOTKEY HkZoomRedraw( _HKI( "Zoom Redraw" ), HK_ZOOM_REDRAW, GR_KB_CTRL + 'R',
ID_ZOOM_REDRAW );
#endif
// Zoom In
#if !defined( __WXMAC__ )
static EDA_HOTKEY HkZoomIn( wxT( "Zoom In" ), HK_ZOOM_IN, WXK_F1, ID_POPUP_ZOOM_IN );
static EDA_HOTKEY HkZoomIn( _HKI( "Zoom In" ), HK_ZOOM_IN, WXK_F1, ID_POPUP_ZOOM_IN );
#else
static EDA_HOTKEY HkZoomIn( wxT( "Zoom In" ), HK_ZOOM_IN, GR_KB_CTRL + '+', ID_POPUP_ZOOM_IN );
static EDA_HOTKEY HkZoomIn( _HKI( "Zoom In" ), HK_ZOOM_IN, GR_KB_CTRL + '+', ID_POPUP_ZOOM_IN );
#endif
// Zoom Out
#if !defined( __WXMAC__ )
static EDA_HOTKEY HkZoomOut( wxT( "Zoom Out" ), HK_ZOOM_OUT, WXK_F2, ID_POPUP_ZOOM_OUT );
static EDA_HOTKEY HkZoomOut( _HKI( "Zoom Out" ), HK_ZOOM_OUT, WXK_F2, ID_POPUP_ZOOM_OUT );
#else
static EDA_HOTKEY HkZoomOut( wxT( "Zoom Out" ), HK_ZOOM_OUT, GR_KB_CTRL + '-', ID_POPUP_ZOOM_OUT );
static EDA_HOTKEY HkZoomOut( _HKI( "Zoom Out" ), HK_ZOOM_OUT, GR_KB_CTRL + '-', ID_POPUP_ZOOM_OUT );
#endif
static EDA_HOTKEY HkHelp( wxT( "Help (this window)" ), HK_HELP, '?' );
static EDA_HOTKEY HkResetLocalCoord( wxT( "Reset Local Coordinates" ), HK_RESET_LOCAL_COORD, ' ' );
static EDA_HOTKEY HkHelp( _HKI( "Help (this window)" ), HK_HELP, '?' );
static EDA_HOTKEY HkResetLocalCoord( _HKI( "Reset Local Coordinates" ), HK_RESET_LOCAL_COORD, ' ' );
// Undo
static EDA_HOTKEY HkUndo( wxT( "Undo" ), HK_UNDO, GR_KB_CTRL + 'Z', (int) wxID_UNDO );
static EDA_HOTKEY HkUndo( _HKI( "Undo" ), HK_UNDO, GR_KB_CTRL + 'Z', (int) wxID_UNDO );
// Redo
#if !defined( __WXMAC__ )
static EDA_HOTKEY HkRedo( wxT( "Redo" ), HK_REDO, GR_KB_CTRL + 'Y', (int) wxID_REDO );
static EDA_HOTKEY HkRedo( _HKI( "Redo" ), HK_REDO, GR_KB_CTRL + 'Y', (int) wxID_REDO );
#else
static EDA_HOTKEY HkRedo( wxT( "Redo" ), HK_REDO, GR_KB_SHIFT + GR_KB_CTRL + 'Z',
static EDA_HOTKEY HkRedo( _HKI( "Redo" ), HK_REDO, GR_KB_SHIFT + GR_KB_CTRL + 'Z',
(int) wxID_REDO );
#endif
// mouse click command:
static EDA_HOTKEY HkMouseLeftClick( wxT( "Mouse Left Click" ), HK_LEFT_CLICK, WXK_RETURN, 0 );
static EDA_HOTKEY HkMouseLeftDClick( wxT( "Mouse Left Double Click" ), HK_LEFT_DCLICK, WXK_END, 0 );
static EDA_HOTKEY HkMouseLeftClick( _HKI( "Mouse Left Click" ), HK_LEFT_CLICK, WXK_RETURN, 0 );
static EDA_HOTKEY HkMouseLeftDClick( _HKI( "Mouse Left Double Click" ), HK_LEFT_DCLICK, WXK_END, 0 );
// Schematic editor
static EDA_HOTKEY HkBeginWire( wxT( "Begin Wire" ), HK_BEGIN_WIRE, 'W', ID_WIRE_BUTT );
static EDA_HOTKEY HkBeginBus( wxT( "Begin Bus" ), HK_BEGIN_BUS, 'B', ID_BUS_BUTT );
static EDA_HOTKEY HkEndLineWireBus( wxT( "End Line Wire Bus" ), HK_END_CURR_LINEWIREBUS, 'K',
static EDA_HOTKEY HkBeginWire( _HKI( "Begin Wire" ), HK_BEGIN_WIRE, 'W', ID_WIRE_BUTT );
static EDA_HOTKEY HkBeginBus( _HKI( "Begin Bus" ), HK_BEGIN_BUS, 'B', ID_BUS_BUTT );
static EDA_HOTKEY HkEndLineWireBus( _HKI( "End Line Wire Bus" ), HK_END_CURR_LINEWIREBUS, 'K',
ID_POPUP_END_LINE );
static EDA_HOTKEY HkAddLabel( wxT( "Add Label" ), HK_ADD_LABEL, 'L', ID_LABEL_BUTT );
static EDA_HOTKEY HkAddHierarchicalLabel( wxT( "Add Hierarchical Label" ), HK_ADD_HLABEL, 'H',
static EDA_HOTKEY HkAddLabel( _HKI( "Add Label" ), HK_ADD_LABEL, 'L', ID_LABEL_BUTT );
static EDA_HOTKEY HkAddHierarchicalLabel( _HKI( "Add Hierarchical Label" ), HK_ADD_HLABEL, 'H',
ID_HIERLABEL_BUTT );
static EDA_HOTKEY HkAddGlobalLabel( wxT( "Add Global Label" ), HK_ADD_GLABEL, GR_KB_CTRL + 'L',
static EDA_HOTKEY HkAddGlobalLabel( _HKI( "Add Global Label" ), HK_ADD_GLABEL, GR_KB_CTRL + 'L',
ID_GLABEL_BUTT );
static EDA_HOTKEY HkAddJunction( wxT( "Add Junction" ), HK_ADD_JUNCTION, 'J', ID_JUNCTION_BUTT );
static EDA_HOTKEY HkAddComponent( wxT( "Add Component" ), HK_ADD_NEW_COMPONENT, 'A',
static EDA_HOTKEY HkAddJunction( _HKI( "Add Junction" ), HK_ADD_JUNCTION, 'J', ID_JUNCTION_BUTT );
static EDA_HOTKEY HkAddComponent( _HKI( "Add Component" ), HK_ADD_NEW_COMPONENT, 'A',
ID_SCH_PLACE_COMPONENT );
static EDA_HOTKEY HkAddPower( wxT( "Add Power" ), HK_ADD_NEW_POWER, 'P',
static EDA_HOTKEY HkAddPower( _HKI( "Add Power" ), HK_ADD_NEW_POWER, 'P',
ID_PLACE_POWER_BUTT );
static EDA_HOTKEY HkAddNoConn( wxT( "Add No Connect Flag" ), HK_ADD_NOCONN_FLAG, 'Q',
static EDA_HOTKEY HkAddNoConn( _HKI( "Add No Connect Flag" ), HK_ADD_NOCONN_FLAG, 'Q',
ID_NOCONN_BUTT );
static EDA_HOTKEY HkAddHierSheet( wxT( "Add Sheet" ), HK_ADD_HIER_SHEET, 'S',
static EDA_HOTKEY HkAddHierSheet( _HKI( "Add Sheet" ), HK_ADD_HIER_SHEET, 'S',
ID_SHEET_SYMBOL_BUTT );
static EDA_HOTKEY HkAddBusEntry( wxT( "Add Bus Entry" ), HK_ADD_BUS_ENTRY, '/',
static EDA_HOTKEY HkAddBusEntry( _HKI( "Add Bus Entry" ), HK_ADD_BUS_ENTRY, '/',
ID_BUSTOBUS_ENTRY_BUTT );
static EDA_HOTKEY HkAddWireEntry( wxT( "Add Wire Entry" ), HK_ADD_WIRE_ENTRY, 'Z',
static EDA_HOTKEY HkAddWireEntry( _HKI( "Add Wire Entry" ), HK_ADD_WIRE_ENTRY, 'Z',
ID_WIRETOBUS_ENTRY_BUTT );
static EDA_HOTKEY HkAddGraphicPolyLine( wxT( "Add Graphic PolyLine" ), HK_ADD_GRAPHIC_POLYLINE,
static EDA_HOTKEY HkAddGraphicPolyLine( _HKI( "Add Graphic PolyLine" ), HK_ADD_GRAPHIC_POLYLINE,
'I', ID_LINE_COMMENT_BUTT );
static EDA_HOTKEY HkAddGraphicText( wxT( "Add Graphic Text" ), HK_ADD_GRAPHIC_TEXT, 'T',
static EDA_HOTKEY HkAddGraphicText( _HKI( "Add Graphic Text" ), HK_ADD_GRAPHIC_TEXT, 'T',
ID_TEXT_COMMENT_BUTT );
static EDA_HOTKEY HkMirrorY( wxT( "Mirror Y Component" ), HK_MIRROR_Y_COMPONENT, 'Y',
static EDA_HOTKEY HkMirrorY( _HKI( "Mirror Y Component" ), HK_MIRROR_Y_COMPONENT, 'Y',
ID_SCH_MIRROR_Y );
static EDA_HOTKEY HkMirrorX( wxT( "Mirror X Component" ), HK_MIRROR_X_COMPONENT, 'X',
static EDA_HOTKEY HkMirrorX( _HKI( "Mirror X Component" ), HK_MIRROR_X_COMPONENT, 'X',
ID_SCH_MIRROR_X );
static EDA_HOTKEY HkOrientNormalComponent( wxT( "Orient Normal Component" ),
static EDA_HOTKEY HkOrientNormalComponent( _HKI( "Orient Normal Component" ),
HK_ORIENT_NORMAL_COMPONENT, 'N', ID_SCH_ORIENT_NORMAL );
static EDA_HOTKEY HkRotate( wxT( "Rotate Item" ), HK_ROTATE, 'R', ID_SCH_ROTATE_CLOCKWISE );
static EDA_HOTKEY HkEdit( wxT( "Edit Item" ), HK_EDIT, 'E', ID_SCH_EDIT_ITEM );
static EDA_HOTKEY HkEditComponentValue( wxT( "Edit Component Value" ),
static EDA_HOTKEY HkRotate( _HKI( "Rotate Item" ), HK_ROTATE, 'R', ID_SCH_ROTATE_CLOCKWISE );
static EDA_HOTKEY HkEdit( _HKI( "Edit Item" ), HK_EDIT, 'E', ID_SCH_EDIT_ITEM );
static EDA_HOTKEY HkEditComponentValue( _HKI( "Edit Component Value" ),
HK_EDIT_COMPONENT_VALUE, 'V',
ID_SCH_EDIT_COMPONENT_VALUE );
static EDA_HOTKEY HkEditComponentReference( wxT( "Edit Component Reference" ),
static EDA_HOTKEY HkEditComponentReference( _HKI( "Edit Component Reference" ),
HK_EDIT_COMPONENT_REFERENCE, 'U',
ID_SCH_EDIT_COMPONENT_REFERENCE );
static EDA_HOTKEY HkEditComponentFootprint( wxT( "Edit Component Footprint" ),
static EDA_HOTKEY HkEditComponentFootprint( _HKI( "Edit Component Footprint" ),
HK_EDIT_COMPONENT_FOOTPRINT, 'F',
ID_SCH_EDIT_COMPONENT_FOOTPRINT );
static EDA_HOTKEY HkEditComponentWithLibedit( wxT( "Edit with Component Editor" ),
static EDA_HOTKEY HkEditComponentWithLibedit( _HKI( "Edit with Component Editor" ),
HK_EDIT_COMPONENT_WITH_LIBEDIT,
'E' + GR_KB_CTRL,
ID_POPUP_SCH_CALL_LIBEDIT_AND_LOAD_CMP );
static EDA_HOTKEY HkMove( wxT( "Move Schematic Item" ),
static EDA_HOTKEY HkMove( _HKI( "Move Schematic Item" ),
HK_MOVE_COMPONENT_OR_ITEM, 'M',
ID_SCH_MOVE_ITEM );
static EDA_HOTKEY HkCopyComponentOrText( wxT( "Copy Component or Label" ),
static EDA_HOTKEY HkCopyComponentOrText( _HKI( "Copy Component or Label" ),
HK_COPY_COMPONENT_OR_LABEL, 'C',
ID_POPUP_SCH_COPY_ITEM );
static EDA_HOTKEY HkDrag( wxT( "Drag Item" ), HK_DRAG, 'G', ID_SCH_DRAG_ITEM );
static EDA_HOTKEY HkSaveBlock( wxT( "Save Block" ), HK_SAVE_BLOCK, 'C' + GR_KB_CTRL, wxID_COPY );
static EDA_HOTKEY HkMove2Drag( wxT( "Move Block -> Drag Block" ),
static EDA_HOTKEY HkDrag( _HKI( "Drag Item" ), HK_DRAG, 'G', ID_SCH_DRAG_ITEM );
static EDA_HOTKEY HkSaveBlock( _HKI( "Save Block" ), HK_SAVE_BLOCK, 'C' + GR_KB_CTRL, wxID_COPY );
static EDA_HOTKEY HkMove2Drag( _HKI( "Move Block -> Drag Block" ),
HK_MOVEBLOCK_TO_DRAGBLOCK, '\t', ID_POPUP_DRAG_BLOCK );
static EDA_HOTKEY HkInsert( wxT( "Repeat Last Item" ), HK_REPEAT_LAST, WXK_INSERT );
static EDA_HOTKEY HkDelete( wxT( "Delete Item" ), HK_DELETE, WXK_DELETE );
static EDA_HOTKEY HkInsert( _HKI( "Repeat Last Item" ), HK_REPEAT_LAST, WXK_INSERT );
static EDA_HOTKEY HkDelete( _HKI( "Delete Item" ), HK_DELETE, WXK_DELETE );
static EDA_HOTKEY HkFindItem( wxT( "Find Item" ), HK_FIND_ITEM, 'F' + GR_KB_CTRL, ID_FIND_ITEMS );
static EDA_HOTKEY HkFindNextItem( wxT( "Find Next Item" ), HK_FIND_NEXT_ITEM, WXK_F5,
static EDA_HOTKEY HkFindItem( _HKI( "Find Item" ), HK_FIND_ITEM, 'F' + GR_KB_CTRL, ID_FIND_ITEMS );
static EDA_HOTKEY HkFindNextItem( _HKI( "Find Next Item" ), HK_FIND_NEXT_ITEM, WXK_F5,
wxEVT_COMMAND_FIND );
static EDA_HOTKEY HkFindReplace( wxT( "Find and Replace" ), HK_FIND_REPLACE,
static EDA_HOTKEY HkFindReplace( _HKI( "Find and Replace" ), HK_FIND_REPLACE,
'F' + GR_KB_CTRL + GR_KB_ALT, wxID_REPLACE );
static EDA_HOTKEY HkFindNextDrcMarker( wxT( "Find Next DRC Marker" ), HK_FIND_NEXT_DRC_MARKER,
static EDA_HOTKEY HkFindNextDrcMarker( _HKI( "Find Next DRC Marker" ), HK_FIND_NEXT_DRC_MARKER,
WXK_F5 + GR_KB_SHIFT, EVT_COMMAND_FIND_DRC_MARKER );
// Special keys for library editor:
static EDA_HOTKEY HkCreatePin( wxT( "Create Pin" ), HK_LIBEDIT_CREATE_PIN, 'P' );
static EDA_HOTKEY HkInsertPin( wxT( "Repeat Pin" ), HK_REPEAT_LAST, WXK_INSERT );
static EDA_HOTKEY HkMoveLibItem( wxT( "Move Library Item" ), HK_LIBEDIT_MOVE_GRAPHIC_ITEM, 'M' );
static EDA_HOTKEY HkCreatePin( _HKI( "Create Pin" ), HK_LIBEDIT_CREATE_PIN, 'P' );
static EDA_HOTKEY HkInsertPin( _HKI( "Repeat Pin" ), HK_REPEAT_LAST, WXK_INSERT );
static EDA_HOTKEY HkMoveLibItem( _HKI( "Move Library Item" ), HK_LIBEDIT_MOVE_GRAPHIC_ITEM, 'M' );
// Load/save files
static EDA_HOTKEY HkSaveLib( wxT( "Save Library" ), HK_SAVE_LIB, 'S' + GR_KB_CTRL );
static EDA_HOTKEY HkSaveSchematic( wxT( "Save Schematic" ), HK_SAVE_SCH, 'S' + GR_KB_CTRL );
static EDA_HOTKEY HkLoadSchematic( wxT( "Load Schematic" ), HK_LOAD_SCH, 'L' + GR_KB_CTRL );
static EDA_HOTKEY HkSaveLib( _HKI( "Save Library" ), HK_SAVE_LIB, 'S' + GR_KB_CTRL );
static EDA_HOTKEY HkSaveSchematic( _HKI( "Save Schematic" ), HK_SAVE_SCH, 'S' + GR_KB_CTRL );
static EDA_HOTKEY HkLoadSchematic( _HKI( "Load Schematic" ), HK_LOAD_SCH, 'L' + GR_KB_CTRL );
// List of common hotkey descriptors
static EDA_HOTKEY* common_Hotkey_List[] =

View File

@ -31,6 +31,13 @@
#define DEFAULT_HOTKEY_FILENAME_EXT wxT( "hotkeys" )
// A define to allow translation of Hot Key message Info in hotkey help menu
// We do not want to use the _( x ) usual macro from wxWidgets, which calls wxGetTranslation(),
// because the English string is used in key file configuration
// The translated string is used only when displaying the help window.
// Therefore translation tools have to use the "_" and the "_HKI" prefix to extract
// strings to translate
#define _HKI( x ) wxT( x )
class EDA_BASE_FRAME;

View File

@ -129,22 +129,28 @@ enum hotkey_id_commnand
};
///////////// Hotkeys management ///////////////////////////////////////
// Remark: the hotkey message info is used as keyword in hotkey config files and
// as comments in help windows, therefore translated only when displayed
// they are marked _HKI to be extracted by translation tools
// See hotkeys_basic.h for more info
// hotkeys command:
static EDA_HOTKEY HkHelp( wxT( "Help (this window)" ), HK_HELP, '?' );
static EDA_HOTKEY HkLoadPrj( wxT( "Load project" ), HK_LOAD_PROJECT, 'O' + GR_KB_CTRL );
static EDA_HOTKEY HkSavePrj( wxT( "Save project" ), HK_SAVE_PROJECT, 'S' + GR_KB_CTRL );
static EDA_HOTKEY HkNewProject( wxT( "New Project" ), HK_NEW_PRJ, 'N' + GR_KB_CTRL );
static EDA_HOTKEY HkNewPrjFromTemplate( wxT( "New Prj From Template" ),
static EDA_HOTKEY HkHelp( _HKI( "Help (this window)" ), HK_HELP, '?' );
static EDA_HOTKEY HkLoadPrj( _HKI( "Load project" ), HK_LOAD_PROJECT, 'O' + GR_KB_CTRL );
static EDA_HOTKEY HkSavePrj( _HKI( "Save project" ), HK_SAVE_PROJECT, 'S' + GR_KB_CTRL );
static EDA_HOTKEY HkNewProject( _HKI( "New Project" ), HK_NEW_PRJ, 'N' + GR_KB_CTRL );
static EDA_HOTKEY HkNewPrjFromTemplate( _HKI( "New Prj From Template" ),
HK_NEW_PRJ_TEMPLATE, 'T' + GR_KB_CTRL );
static EDA_HOTKEY HkRunEeschema( wxT( "Run Eeschema" ), HK_RUN_EESCHEMA, 'E', 0 );
static EDA_HOTKEY HkRunLibedit( wxT( "Run LibEdit" ), HK_RUN_LIBEDIT, 'L', 0 );
static EDA_HOTKEY HkRunPcbnew( wxT( "Run Pcbnew" ), HK_RUN_PCBNEW, 'P', 0 );
static EDA_HOTKEY HkRunModedit( wxT( "Run FpEditor" ), HK_RUN_FPEDITOR, 'F', 0 );
static EDA_HOTKEY HkRunGerbview( wxT( "Run Gerbview" ), HK_RUN_GERBVIEW, 'G', 0 );
static EDA_HOTKEY HkRunBm2Cmp( wxT( "Run Bitmap2Component" ), HK_RUN_BM2COMPONENT, 'B', 0 );
static EDA_HOTKEY HkRunPcbCalc( wxT( "Run PcbCalculator" ), HK_RUN_PCBCALCULATOR, 'C', 0 );
static EDA_HOTKEY HkRunPleditor( wxT( "Run PlEditor" ), HK_RUN_PLEDITOR, 'Y', 0 );
static EDA_HOTKEY HkRunEeschema( _HKI( "Run Eeschema" ), HK_RUN_EESCHEMA, 'E', 0 );
static EDA_HOTKEY HkRunLibedit( _HKI( "Run LibEdit" ), HK_RUN_LIBEDIT, 'L', 0 );
static EDA_HOTKEY HkRunPcbnew( _HKI( "Run Pcbnew" ), HK_RUN_PCBNEW, 'P', 0 );
static EDA_HOTKEY HkRunModedit( _HKI( "Run FpEditor" ), HK_RUN_FPEDITOR, 'F', 0 );
static EDA_HOTKEY HkRunGerbview( _HKI( "Run Gerbview" ), HK_RUN_GERBVIEW, 'G', 0 );
static EDA_HOTKEY HkRunBm2Cmp( _HKI( "Run Bitmap2Component" ), HK_RUN_BM2COMPONENT, 'B', 0 );
static EDA_HOTKEY HkRunPcbCalc( _HKI( "Run PcbCalculator" ), HK_RUN_PCBCALCULATOR, 'C', 0 );
static EDA_HOTKEY HkRunPleditor( _HKI( "Run PlEditor" ), HK_RUN_PLEDITOR, 'Y', 0 );
// List of hotkey descriptors
EDA_HOTKEY* common_Hotkey_List[] =

View File

@ -38,10 +38,16 @@
#include <pl_editor_id.h>
// Remark: the hotkey message info is used as keyword in hotkey config files and
// as comments in help windows, therefore translated only when displayed
// they are marked _HKI to be extracted by translation tools
// See hotkeys_basic.h for more info
/* How to add a new hotkey:
* add a new id in the enum hotkey_id_commnand like MY_NEW_ID_FUNCTION.
* add a new EDA_HOTKEY entry like:
* static EDA_HOTKEY HkMyNewEntry(wxT("Command Label"), MY_NEW_ID_FUNCTION, default key value);
* static EDA_HOTKEY HkMyNewEntry(_HKI("Command Label"), MY_NEW_ID_FUNCTION, default key value);
* 'Command Label' is the name used in hotkey list display, and the identifier in the
* hotkey list file
* 'MY_NEW_ID_FUNCTION' is the id event function used in the switch in OnHotKey() function.
@ -58,30 +64,30 @@
// Hotkey list:
// mouse click command:
static EDA_HOTKEY HkMouseLeftClick( wxT( "Mouse Left Click" ), HK_LEFT_CLICK, WXK_RETURN, 0 );
static EDA_HOTKEY HkMouseLeftDClick( wxT( "Mouse Left Double Click" ), HK_LEFT_DCLICK, WXK_END, 0 );
static EDA_HOTKEY HkMouseLeftClick( _HKI( "Mouse Left Click" ), HK_LEFT_CLICK, WXK_RETURN, 0 );
static EDA_HOTKEY HkMouseLeftDClick( _HKI( "Mouse Left Double Click" ), HK_LEFT_DCLICK, WXK_END, 0 );
static EDA_HOTKEY HkResetLocalCoord( wxT( "Reset Local Coordinates" ),
static EDA_HOTKEY HkResetLocalCoord( _HKI( "Reset Local Coordinates" ),
HK_RESET_LOCAL_COORD, ' ' );
static EDA_HOTKEY HkZoomAuto( wxT( "Zoom Auto" ), HK_ZOOM_AUTO, WXK_HOME, ID_ZOOM_PAGE );
static EDA_HOTKEY HkZoomCenter( wxT( "Zoom Center" ), HK_ZOOM_CENTER, WXK_F4,
static EDA_HOTKEY HkZoomAuto( _HKI( "Zoom Auto" ), HK_ZOOM_AUTO, WXK_HOME, ID_ZOOM_PAGE );
static EDA_HOTKEY HkZoomCenter( _HKI( "Zoom Center" ), HK_ZOOM_CENTER, WXK_F4,
ID_POPUP_ZOOM_CENTER );
static EDA_HOTKEY HkZoomRedraw( wxT( "Zoom Redraw" ), HK_ZOOM_REDRAW, WXK_F3, ID_ZOOM_REDRAW );
static EDA_HOTKEY HkZoomOut( wxT( "Zoom Out" ), HK_ZOOM_OUT, WXK_F2, ID_POPUP_ZOOM_OUT );
static EDA_HOTKEY HkZoomIn( wxT( "Zoom In" ), HK_ZOOM_IN, WXK_F1, ID_POPUP_ZOOM_IN );
static EDA_HOTKEY HkHelp( wxT( "Help (this window)" ), HK_HELP, '?' );
static EDA_HOTKEY HkMoveItem( wxT( "Move Item" ), HK_MOVE_ITEM, 'M', ID_POPUP_ITEM_MOVE );
static EDA_HOTKEY HkPlaceItem( wxT( "Place Item" ), HK_PLACE_ITEM, 'P', ID_POPUP_ITEM_PLACE );
static EDA_HOTKEY HkMoveStartPoint( wxT( "Move Start Point" ), HK_MOVE_START_POINT, 'S',
static EDA_HOTKEY HkZoomRedraw( _HKI( "Zoom Redraw" ), HK_ZOOM_REDRAW, WXK_F3, ID_ZOOM_REDRAW );
static EDA_HOTKEY HkZoomOut( _HKI( "Zoom Out" ), HK_ZOOM_OUT, WXK_F2, ID_POPUP_ZOOM_OUT );
static EDA_HOTKEY HkZoomIn( _HKI( "Zoom In" ), HK_ZOOM_IN, WXK_F1, ID_POPUP_ZOOM_IN );
static EDA_HOTKEY HkHelp( _HKI( "Help (this window)" ), HK_HELP, '?' );
static EDA_HOTKEY HkMoveItem( _HKI( "Move Item" ), HK_MOVE_ITEM, 'M', ID_POPUP_ITEM_MOVE );
static EDA_HOTKEY HkPlaceItem( _HKI( "Place Item" ), HK_PLACE_ITEM, 'P', ID_POPUP_ITEM_PLACE );
static EDA_HOTKEY HkMoveStartPoint( _HKI( "Move Start Point" ), HK_MOVE_START_POINT, 'S',
ID_POPUP_ITEM_MOVE_START_POINT );
static EDA_HOTKEY HkMoveEndPoint( wxT( "Move End Point" ), HK_MOVE_END_POINT, 'E',
static EDA_HOTKEY HkMoveEndPoint( _HKI( "Move End Point" ), HK_MOVE_END_POINT, 'E',
ID_POPUP_ITEM_MOVE_END_POINT );
static EDA_HOTKEY HkDeleteItem( wxT( "Delete Item" ), HK_DELETE_ITEM, WXK_DELETE,
static EDA_HOTKEY HkDeleteItem( _HKI( "Delete Item" ), HK_DELETE_ITEM, WXK_DELETE,
ID_POPUP_ITEM_DELETE );
// Undo Redo
static EDA_HOTKEY HkUndo( wxT( "Undo" ), HK_UNDO, GR_KB_CTRL + 'Z', (int) wxID_UNDO );
static EDA_HOTKEY HkRedo( wxT( "Redo" ), HK_REDO, GR_KB_CTRL + 'Y', (int) wxID_REDO );
static EDA_HOTKEY HkUndo( _HKI( "Undo" ), HK_UNDO, GR_KB_CTRL + 'Z', (int) wxID_UNDO );
static EDA_HOTKEY HkRedo( _HKI( "Redo" ), HK_REDO, GR_KB_CTRL + 'Y', (int) wxID_REDO );
// List of common hotkey descriptors
EDA_HOTKEY* s_Common_Hotkey_List[] =

View File

@ -34,10 +34,16 @@
#include <hotkeys.h>
// Remark: the hotkey message info is used as keyword in hotkey config files and
// as comments in help windows, therefore translated only when displayed
// they are marked _HKI to be extracted by translation tools
// See hotkeys_basic.h for more info
/* How to add a new hotkey:
* add a new id in the enum hotkey_id_commnand like MY_NEW_ID_FUNCTION.
* add a new EDA_HOTKEY entry like:
* static EDA_HOTKEY HkMyNewEntry(wxT("Command Label"), MY_NEW_ID_FUNCTION, default key value);
* static EDA_HOTKEY HkMyNewEntry(_HKI("Command Label"), MY_NEW_ID_FUNCTION, default key value);
* "Command Label" is the name used in hotkey list display, and the identifier in the
* hotkey list file MY_NEW_ID_FUNCTION is an equivalent id function used in the switch
* in OnHotKey() function.
@ -58,193 +64,193 @@
// Hotkey list:
// mouse click command:
static EDA_HOTKEY HkMouseLeftClick( wxT( "Mouse Left Click" ),
static EDA_HOTKEY HkMouseLeftClick( _HKI( "Mouse Left Click" ),
HK_LEFT_CLICK, WXK_RETURN, 0 );
static EDA_HOTKEY HkMouseLeftDClick( wxT( "Mouse Left Double Click" ),
static EDA_HOTKEY HkMouseLeftDClick( _HKI( "Mouse Left Double Click" ),
HK_LEFT_DCLICK, WXK_END, 0 );
static EDA_HOTKEY HkSwitch2CopperLayer( wxT( "Switch to Copper (B.Cu) layer" ),
static EDA_HOTKEY HkSwitch2CopperLayer( _HKI( "Switch to Copper (B.Cu) layer" ),
HK_SWITCH_LAYER_TO_COPPER, WXK_PAGEDOWN );
static EDA_HOTKEY HkSwitch2ComponentLayer( wxT( "Switch to Component (F.Cu) layer" ),
static EDA_HOTKEY HkSwitch2ComponentLayer( _HKI( "Switch to Component (F.Cu) layer" ),
HK_SWITCH_LAYER_TO_COMPONENT, WXK_PAGEUP );
static EDA_HOTKEY HkSwitch2InnerLayer1( wxT( "Switch to Inner layer 1" ),
static EDA_HOTKEY HkSwitch2InnerLayer1( _HKI( "Switch to Inner layer 1" ),
HK_SWITCH_LAYER_TO_INNER1, WXK_F5 );
static EDA_HOTKEY HkSwitch2InnerLayer2( wxT( "Switch to Inner layer 2" ),
static EDA_HOTKEY HkSwitch2InnerLayer2( _HKI( "Switch to Inner layer 2" ),
HK_SWITCH_LAYER_TO_INNER2, WXK_F6 );
static EDA_HOTKEY HkSwitch2InnerLayer3( wxT( "Switch to Inner layer 3" ),
static EDA_HOTKEY HkSwitch2InnerLayer3( _HKI( "Switch to Inner layer 3" ),
HK_SWITCH_LAYER_TO_INNER3, WXK_F7 );
static EDA_HOTKEY HkSwitch2InnerLayer4( wxT( "Switch to Inner layer 4" ),
static EDA_HOTKEY HkSwitch2InnerLayer4( _HKI( "Switch to Inner layer 4" ),
HK_SWITCH_LAYER_TO_INNER4, WXK_F8 );
static EDA_HOTKEY HkSwitch2InnerLayer5( wxT( "Switch to Inner layer 5" ),
static EDA_HOTKEY HkSwitch2InnerLayer5( _HKI( "Switch to Inner layer 5" ),
HK_SWITCH_LAYER_TO_INNER5, GR_KB_SHIFT+WXK_F5 );
static EDA_HOTKEY HkSwitch2InnerLayer6( wxT( "Switch to Inner layer 6" ),
static EDA_HOTKEY HkSwitch2InnerLayer6( _HKI( "Switch to Inner layer 6" ),
HK_SWITCH_LAYER_TO_INNER6, GR_KB_SHIFT+WXK_F6 );
static EDA_HOTKEY HkSwitch2NextCopperLayer( wxT( "Switch to Next Layer" ),
static EDA_HOTKEY HkSwitch2NextCopperLayer( _HKI( "Switch to Next Layer" ),
HK_SWITCH_LAYER_TO_NEXT, '+' );
static EDA_HOTKEY HkSwitch2PreviousCopperLayer( wxT( "Switch to Previous Layer" ),
static EDA_HOTKEY HkSwitch2PreviousCopperLayer( _HKI( "Switch to Previous Layer" ),
HK_SWITCH_LAYER_TO_PREVIOUS, '-' );
static EDA_HOTKEY HkSaveModule( wxT( "Save Module" ), HK_SAVE_MODULE, 'S' + GR_KB_CTRL );
static EDA_HOTKEY HkSavefile( wxT( "Save Board" ), HK_SAVE_BOARD, 'S' + GR_KB_CTRL );
static EDA_HOTKEY HkSavefileAs( wxT( "Save Board As" ), HK_SAVE_BOARD_AS, 'S' + GR_KB_CTRL + GR_KB_SHIFT );
static EDA_HOTKEY HkLoadfile( wxT( "Load Board" ), HK_LOAD_BOARD, 'L' + GR_KB_CTRL );
static EDA_HOTKEY HkFindItem( wxT( "Find Item" ), HK_FIND_ITEM, 'F' + GR_KB_CTRL );
static EDA_HOTKEY HkBackspace( wxT( "Delete Track Segment" ), HK_BACK_SPACE, WXK_BACK );
static EDA_HOTKEY HkAddNewTrack( wxT( "Add New Track" ), HK_ADD_NEW_TRACK, 'X' );
static EDA_HOTKEY HkAddThroughVia( wxT( "Add Through Via" ), HK_ADD_THROUGH_VIA, 'V' );
static EDA_HOTKEY HkSelLayerAndAddThroughVia( wxT( "Select Layer and Add Through Via" ),
static EDA_HOTKEY HkSaveModule( _HKI( "Save Module" ), HK_SAVE_MODULE, 'S' + GR_KB_CTRL );
static EDA_HOTKEY HkSavefile( _HKI( "Save Board" ), HK_SAVE_BOARD, 'S' + GR_KB_CTRL );
static EDA_HOTKEY HkSavefileAs( _HKI( "Save Board As" ), HK_SAVE_BOARD_AS, 'S' + GR_KB_CTRL + GR_KB_SHIFT );
static EDA_HOTKEY HkLoadfile( _HKI( "Load Board" ), HK_LOAD_BOARD, 'L' + GR_KB_CTRL );
static EDA_HOTKEY HkFindItem( _HKI( "Find Item" ), HK_FIND_ITEM, 'F' + GR_KB_CTRL );
static EDA_HOTKEY HkBackspace( _HKI( "Delete Track Segment" ), HK_BACK_SPACE, WXK_BACK );
static EDA_HOTKEY HkAddNewTrack( _HKI( "Add New Track" ), HK_ADD_NEW_TRACK, 'X' );
static EDA_HOTKEY HkAddThroughVia( _HKI( "Add Through Via" ), HK_ADD_THROUGH_VIA, 'V' );
static EDA_HOTKEY HkSelLayerAndAddThroughVia( _HKI( "Select Layer and Add Through Via" ),
HK_SEL_LAYER_AND_ADD_THROUGH_VIA, '<' );
static EDA_HOTKEY HkAddMicroVia( wxT( "Add MicroVia" ), HK_ADD_MICROVIA, 'V' + GR_KB_CTRL );
static EDA_HOTKEY HkAddBlindBuriedVia( wxT( "Add Blind/Buried Via" ), HK_ADD_BLIND_BURIED_VIA, 'V' + GR_KB_ALT );
static EDA_HOTKEY HkSelLayerAndAddBlindBuriedVia( wxT( "Select Layer and Add Blind/Buried Via" ),
static EDA_HOTKEY HkAddMicroVia( _HKI( "Add MicroVia" ), HK_ADD_MICROVIA, 'V' + GR_KB_CTRL );
static EDA_HOTKEY HkAddBlindBuriedVia( _HKI( "Add Blind/Buried Via" ), HK_ADD_BLIND_BURIED_VIA, 'V' + GR_KB_ALT );
static EDA_HOTKEY HkSelLayerAndAddBlindBuriedVia( _HKI( "Select Layer and Add Blind/Buried Via" ),
HK_SEL_LAYER_AND_ADD_BLIND_BURIED_VIA, '<' + GR_KB_ALT );
static EDA_HOTKEY HkSwitchTrackPosture( wxT( "Switch Track Posture" ), HK_SWITCH_TRACK_POSTURE, '/' );
static EDA_HOTKEY HkDragTrackKeepSlope( wxT( "Drag Track Keep Slope" ), HK_DRAG_TRACK_KEEP_SLOPE, 'D' );
static EDA_HOTKEY HkPlaceItem( wxT( "Place Item" ), HK_PLACE_ITEM, 'P' );
static EDA_HOTKEY HkEditBoardItem( wxT( "Edit Item" ), HK_EDIT_ITEM, 'E' );
static EDA_HOTKEY HkEditWithModedit( wxT( "Edit with Footprint Editor" ), HK_EDIT_MODULE_WITH_MODEDIT, 'E' + GR_KB_CTRL );
static EDA_HOTKEY HkFlipItem( wxT( "Flip Item" ), HK_FLIP_ITEM, 'F' );
static EDA_HOTKEY HkRotateItem( wxT( "Rotate Item" ), HK_ROTATE_ITEM, 'R' );
static EDA_HOTKEY HkMoveItem( wxT( "Move Item" ), HK_MOVE_ITEM, 'M' );
static EDA_HOTKEY HkMoveItemExact( wxT( "Move Item Exactly" ), HK_MOVE_ITEM_EXACT, 'M' + GR_KB_CTRL );
static EDA_HOTKEY HkDuplicateItem( wxT( "Duplicate Item" ), HK_DUPLICATE_ITEM, 'D' + GR_KB_CTRL );
static EDA_HOTKEY HkDuplicateItemAndIncrement( wxT( "Duplicate Item and Increment" ),
static EDA_HOTKEY HkSwitchTrackPosture( _HKI( "Switch Track Posture" ), HK_SWITCH_TRACK_POSTURE, '/' );
static EDA_HOTKEY HkDragTrackKeepSlope( _HKI( "Drag Track Keep Slope" ), HK_DRAG_TRACK_KEEP_SLOPE, 'D' );
static EDA_HOTKEY HkPlaceItem( _HKI( "Place Item" ), HK_PLACE_ITEM, 'P' );
static EDA_HOTKEY HkEditBoardItem( _HKI( "Edit Item" ), HK_EDIT_ITEM, 'E' );
static EDA_HOTKEY HkEditWithModedit( _HKI( "Edit with Footprint Editor" ), HK_EDIT_MODULE_WITH_MODEDIT, 'E' + GR_KB_CTRL );
static EDA_HOTKEY HkFlipItem( _HKI( "Flip Item" ), HK_FLIP_ITEM, 'F' );
static EDA_HOTKEY HkRotateItem( _HKI( "Rotate Item" ), HK_ROTATE_ITEM, 'R' );
static EDA_HOTKEY HkMoveItem( _HKI( "Move Item" ), HK_MOVE_ITEM, 'M' );
static EDA_HOTKEY HkMoveItemExact( _HKI( "Move Item Exactly" ), HK_MOVE_ITEM_EXACT, 'M' + GR_KB_CTRL );
static EDA_HOTKEY HkDuplicateItem( _HKI( "Duplicate Item" ), HK_DUPLICATE_ITEM, 'D' + GR_KB_CTRL );
static EDA_HOTKEY HkDuplicateItemAndIncrement( _HKI( "Duplicate Item and Increment" ),
HK_DUPLICATE_ITEM_AND_INCREMENT, 'D' + GR_KB_SHIFTCTRL );
static EDA_HOTKEY HkCreateArray( wxT( "Create Array" ), HK_CREATE_ARRAY, 'N' + GR_KB_CTRL );
static EDA_HOTKEY HkCopyItem( wxT( "Copy Item" ), HK_COPY_ITEM, 'C' );
static EDA_HOTKEY HkDragFootprint( wxT( "Drag Item" ), HK_DRAG_ITEM, 'G' );
static EDA_HOTKEY HkGetAndMoveFootprint( wxT( "Get and Move Footprint" ), HK_GET_AND_MOVE_FOOTPRINT, 'T' );
static EDA_HOTKEY HkLock_Unlock_Footprint( wxT( "Lock/Unlock Footprint" ), HK_LOCK_UNLOCK_FOOTPRINT, 'L' );
static EDA_HOTKEY HkDelete( wxT( "Delete Track or Footprint" ), HK_DELETE, WXK_DELETE );
static EDA_HOTKEY HkResetLocalCoord( wxT( "Reset Local Coordinates" ), HK_RESET_LOCAL_COORD, ' ' );
static EDA_HOTKEY HkSwitchHighContrastMode( wxT( "Toggle High Contrast Mode" ), HK_SWITCH_HIGHCONTRAST_MODE,'H');
static EDA_HOTKEY HkCreateArray( _HKI( "Create Array" ), HK_CREATE_ARRAY, 'N' + GR_KB_CTRL );
static EDA_HOTKEY HkCopyItem( _HKI( "Copy Item" ), HK_COPY_ITEM, 'C' );
static EDA_HOTKEY HkDragFootprint( _HKI( "Drag Item" ), HK_DRAG_ITEM, 'G' );
static EDA_HOTKEY HkGetAndMoveFootprint( _HKI( "Get and Move Footprint" ), HK_GET_AND_MOVE_FOOTPRINT, 'T' );
static EDA_HOTKEY HkLock_Unlock_Footprint( _HKI( "Lock/Unlock Footprint" ), HK_LOCK_UNLOCK_FOOTPRINT, 'L' );
static EDA_HOTKEY HkDelete( _HKI( "Delete Track or Footprint" ), HK_DELETE, WXK_DELETE );
static EDA_HOTKEY HkResetLocalCoord( _HKI( "Reset Local Coordinates" ), HK_RESET_LOCAL_COORD, ' ' );
static EDA_HOTKEY HkSwitchHighContrastMode( _HKI( "Toggle High Contrast Mode" ), HK_SWITCH_HIGHCONTRAST_MODE,'H');
static EDA_HOTKEY HkSetGridOrigin( wxT( "Set Grid Origin" ), HK_SET_GRID_ORIGIN, 'S' );
static EDA_HOTKEY HkResetGridOrigin( wxT( "Reset Grid Origin" ), HK_RESET_GRID_ORIGIN, 'Z' );
static EDA_HOTKEY HkSetGridOrigin( _HKI( "Set Grid Origin" ), HK_SET_GRID_ORIGIN, 'S' );
static EDA_HOTKEY HkResetGridOrigin( _HKI( "Reset Grid Origin" ), HK_RESET_GRID_ORIGIN, 'Z' );
static EDA_HOTKEY HkCanvasDefault( wxT( "Switch to Default Canvas" ),
static EDA_HOTKEY HkCanvasDefault( _HKI( "Switch to Default Canvas" ),
HK_CANVAS_DEFAULT, WXK_F9 );
static EDA_HOTKEY HkCanvasOpenGL( wxT( "Switch to OpenGL Canvas" ),
static EDA_HOTKEY HkCanvasOpenGL( _HKI( "Switch to OpenGL Canvas" ),
HK_CANVAS_OPENGL, WXK_F11 );
static EDA_HOTKEY HkCanvasCairo( wxT( "Switch to Cairo Canvas" ),
static EDA_HOTKEY HkCanvasCairo( _HKI( "Switch to Cairo Canvas" ),
HK_CANVAS_CAIRO, WXK_F12 );
static EDA_HOTKEY HkZoneFillOrRefill( wxT( "Fill or Refill All Zones" ),
static EDA_HOTKEY HkZoneFillOrRefill( _HKI( "Fill or Refill All Zones" ),
HK_ZONE_FILL_OR_REFILL, 'B' );
static EDA_HOTKEY HkZoneRemoveFilled( wxT( "Remove Filled Areas in All Zones" ),
static EDA_HOTKEY HkZoneRemoveFilled( _HKI( "Remove Filled Areas in All Zones" ),
HK_ZONE_REMOVE_FILLED, 'N' );
/* Fit on Screen */
#if !defined( __WXMAC__ )
static EDA_HOTKEY HkZoomAuto( wxT( "Zoom Auto" ), HK_ZOOM_AUTO, WXK_HOME );
static EDA_HOTKEY HkZoomAuto( _HKI( "Zoom Auto" ), HK_ZOOM_AUTO, WXK_HOME );
#else
static EDA_HOTKEY HkZoomAuto( wxT( "Zoom Auto" ), HK_ZOOM_AUTO, GR_KB_CTRL + '0' );
static EDA_HOTKEY HkZoomAuto( _HKI( "Zoom Auto" ), HK_ZOOM_AUTO, GR_KB_CTRL + '0' );
#endif
static EDA_HOTKEY HkZoomCenter( wxT( "Zoom Center" ), HK_ZOOM_CENTER, WXK_F4 );
static EDA_HOTKEY HkZoomCenter( _HKI( "Zoom Center" ), HK_ZOOM_CENTER, WXK_F4 );
/* Refresh Screen */
#if !defined( __WXMAC__ )
static EDA_HOTKEY HkZoomRedraw( wxT( "Zoom Redraw" ), HK_ZOOM_REDRAW, WXK_F3 );
static EDA_HOTKEY HkZoomRedraw( _HKI( "Zoom Redraw" ), HK_ZOOM_REDRAW, WXK_F3 );
#else
static EDA_HOTKEY HkZoomRedraw( wxT( "Zoom Redraw" ), HK_ZOOM_REDRAW, GR_KB_CTRL + 'R' );
static EDA_HOTKEY HkZoomRedraw( _HKI( "Zoom Redraw" ), HK_ZOOM_REDRAW, GR_KB_CTRL + 'R' );
#endif
/* Zoom In */
#if !defined( __WXMAC__ )
static EDA_HOTKEY HkZoomIn( wxT( "Zoom In" ), HK_ZOOM_IN, WXK_F1 );
static EDA_HOTKEY HkZoomIn( _HKI( "Zoom In" ), HK_ZOOM_IN, WXK_F1 );
#else
static EDA_HOTKEY HkZoomIn( wxT( "Zoom In" ), HK_ZOOM_IN, GR_KB_CTRL + '+' );
static EDA_HOTKEY HkZoomIn( _HKI( "Zoom In" ), HK_ZOOM_IN, GR_KB_CTRL + '+' );
#endif
/* Zoom Out */
#if !defined( __WXMAC__ )
static EDA_HOTKEY HkZoomOut( wxT( "Zoom Out" ), HK_ZOOM_OUT, WXK_F2 );
static EDA_HOTKEY HkZoomOut( _HKI( "Zoom Out" ), HK_ZOOM_OUT, WXK_F2 );
#else
static EDA_HOTKEY HkZoomOut( wxT( "Zoom Out" ), HK_ZOOM_OUT, GR_KB_CTRL + '-' );
static EDA_HOTKEY HkZoomOut( _HKI( "Zoom Out" ), HK_ZOOM_OUT, GR_KB_CTRL + '-' );
#endif
static EDA_HOTKEY HkHelp( wxT( "Help (this window)" ), HK_HELP, '?' );
static EDA_HOTKEY HkHelp( _HKI( "Help (this window)" ), HK_HELP, '?' );
/* Undo */
static EDA_HOTKEY HkUndo( wxT( "Undo" ), HK_UNDO, GR_KB_CTRL + 'Z', (int) wxID_UNDO );
static EDA_HOTKEY HkUndo( _HKI( "Undo" ), HK_UNDO, GR_KB_CTRL + 'Z', (int) wxID_UNDO );
/* Redo */
#if !defined( __WXMAC__ )
static EDA_HOTKEY HkRedo( wxT( "Redo" ), HK_REDO, GR_KB_CTRL + 'Y', (int) wxID_REDO );
static EDA_HOTKEY HkRedo( _HKI( "Redo" ), HK_REDO, GR_KB_CTRL + 'Y', (int) wxID_REDO );
#else
static EDA_HOTKEY HkRedo( wxT( "Redo" ), HK_REDO,
static EDA_HOTKEY HkRedo( _HKI( "Redo" ), HK_REDO,
GR_KB_SHIFT + GR_KB_CTRL + 'Z',
(int) wxID_REDO );
#endif
static EDA_HOTKEY HkSwitchTrackWidthToNext( wxT( "Switch Track Width To Next" ),
static EDA_HOTKEY HkSwitchTrackWidthToNext( _HKI( "Switch Track Width To Next" ),
HK_SWITCH_TRACK_WIDTH_TO_NEXT, 'W' );
static EDA_HOTKEY HkSwitchTrackWidthToPrevious( wxT( "Switch Track Width To Previous" ),
static EDA_HOTKEY HkSwitchTrackWidthToPrevious( _HKI( "Switch Track Width To Previous" ),
HK_SWITCH_TRACK_WIDTH_TO_PREVIOUS, 'W'
+ GR_KB_CTRL );
static EDA_HOTKEY HkSwitchGridToFastGrid1( wxT( "Switch Grid To Fast Grid1" ),
static EDA_HOTKEY HkSwitchGridToFastGrid1( _HKI( "Switch Grid To Fast Grid1" ),
HK_SWITCH_GRID_TO_FASTGRID1, GR_KB_ALT + '1' );
static EDA_HOTKEY HkSwitchGridToFastGrid2( wxT( "Switch Grid To Fast Grid2" ),
static EDA_HOTKEY HkSwitchGridToFastGrid2( _HKI( "Switch Grid To Fast Grid2" ),
HK_SWITCH_GRID_TO_FASTGRID2, GR_KB_ALT + '2' );
static EDA_HOTKEY HkSwitchGridToNext( wxT( "Switch Grid To Next" ),
static EDA_HOTKEY HkSwitchGridToNext( _HKI( "Switch Grid To Next" ),
HK_SWITCH_GRID_TO_NEXT, '`' );
static EDA_HOTKEY HkSwitchGridToPrevious( wxT( "Switch Grid To Previous" ),
static EDA_HOTKEY HkSwitchGridToPrevious( _HKI( "Switch Grid To Previous" ),
HK_SWITCH_GRID_TO_PREVIOUS, '`' + GR_KB_CTRL );
static EDA_HOTKEY HkSwitchUnits( wxT( "Switch Units" ), HK_SWITCH_UNITS, 'U' + GR_KB_CTRL );
static EDA_HOTKEY HkTrackDisplayMode( wxT( "Track Display Mode" ),
static EDA_HOTKEY HkSwitchUnits( _HKI( "Switch Units" ), HK_SWITCH_UNITS, 'U' + GR_KB_CTRL );
static EDA_HOTKEY HkTrackDisplayMode( _HKI( "Track Display Mode" ),
HK_SWITCH_TRACK_DISPLAY_MODE, 'K' );
static EDA_HOTKEY HkAddModule( wxT( "Add Module" ), HK_ADD_MODULE, 'O' );
static EDA_HOTKEY HkAddModule( _HKI( "Add Footprint" ), HK_ADD_MODULE, 'O' );
/* Record and play macros */
static EDA_HOTKEY HkRecordMacros0( wxT( "Record Macro 0" ), HK_RECORD_MACROS_0, GR_KB_CTRL+'0' );
static EDA_HOTKEY HkRecordMacros0( _HKI( "Record Macro 0" ), HK_RECORD_MACROS_0, GR_KB_CTRL+'0' );
static EDA_HOTKEY HkCallMacros0( wxT( "Call Macro 0" ), HK_CALL_MACROS_0, '0' );
static EDA_HOTKEY HkCallMacros0( _HKI( "Call Macro 0" ), HK_CALL_MACROS_0, '0' );
static EDA_HOTKEY HkRecordMacros1( wxT( "Record Macro 1" ), HK_RECORD_MACROS_1, GR_KB_CTRL+'1' );
static EDA_HOTKEY HkRecordMacros1( _HKI( "Record Macro 1" ), HK_RECORD_MACROS_1, GR_KB_CTRL+'1' );
static EDA_HOTKEY HkCallMacros1( wxT( "Call Macro 1" ), HK_CALL_MACROS_1, '1' );
static EDA_HOTKEY HkCallMacros1( _HKI( "Call Macro 1" ), HK_CALL_MACROS_1, '1' );
static EDA_HOTKEY HkRecordMacros2( wxT( "Record Macro 2" ), HK_RECORD_MACROS_2, GR_KB_CTRL+'2' );
static EDA_HOTKEY HkRecordMacros2( _HKI( "Record Macro 2" ), HK_RECORD_MACROS_2, GR_KB_CTRL+'2' );
static EDA_HOTKEY HkCallMacros2( wxT( "Call Macro 2" ), HK_CALL_MACROS_2, '2' );
static EDA_HOTKEY HkCallMacros2( _HKI( "Call Macro 2" ), HK_CALL_MACROS_2, '2' );
static EDA_HOTKEY HkRecordMacros3( wxT( "Record Macro 3" ), HK_RECORD_MACROS_3, GR_KB_CTRL+'3' );
static EDA_HOTKEY HkRecordMacros3( _HKI( "Record Macro 3" ), HK_RECORD_MACROS_3, GR_KB_CTRL+'3' );
static EDA_HOTKEY HkCallMacros3( wxT( "Call Macro 3" ), HK_CALL_MACROS_3, '3' );
static EDA_HOTKEY HkCallMacros3( _HKI( "Call Macro 3" ), HK_CALL_MACROS_3, '3' );
static EDA_HOTKEY HkRecordMacros4( wxT( "Record Macro 4" ), HK_RECORD_MACROS_4, GR_KB_CTRL+'4' );
static EDA_HOTKEY HkRecordMacros4( _HKI( "Record Macro 4" ), HK_RECORD_MACROS_4, GR_KB_CTRL+'4' );
static EDA_HOTKEY HkCallMacros4( wxT( "Call Macro 4" ), HK_CALL_MACROS_4, '4' );
static EDA_HOTKEY HkCallMacros4( _HKI( "Call Macro 4" ), HK_CALL_MACROS_4, '4' );
static EDA_HOTKEY HkRecordMacros5( wxT( "Record Macro 5" ), HK_RECORD_MACROS_5, GR_KB_CTRL+'5' );
static EDA_HOTKEY HkRecordMacros5( _HKI( "Record Macro 5" ), HK_RECORD_MACROS_5, GR_KB_CTRL+'5' );
static EDA_HOTKEY HkCallMacros5( wxT( "Call Macro 5" ), HK_CALL_MACROS_5, '5' );
static EDA_HOTKEY HkCallMacros5( _HKI( "Call Macro 5" ), HK_CALL_MACROS_5, '5' );
static EDA_HOTKEY HkRecordMacros6( wxT( "Record Macro 6" ), HK_RECORD_MACROS_6, GR_KB_CTRL+'6' );
static EDA_HOTKEY HkRecordMacros6( _HKI( "Record Macro 6" ), HK_RECORD_MACROS_6, GR_KB_CTRL+'6' );
static EDA_HOTKEY HkCallMacros6( wxT( "Call Macro 6" ), HK_CALL_MACROS_6, '6' );
static EDA_HOTKEY HkCallMacros6( _HKI( "Call Macro 6" ), HK_CALL_MACROS_6, '6' );
static EDA_HOTKEY HkRecordMacros7( wxT( "Record Macro 7" ), HK_RECORD_MACROS_7, GR_KB_CTRL+'7' );
static EDA_HOTKEY HkRecordMacros7( _HKI( "Record Macro 7" ), HK_RECORD_MACROS_7, GR_KB_CTRL+'7' );
static EDA_HOTKEY HkCallMacros7( wxT( "Call Macro 7" ), HK_CALL_MACROS_7, '7' );
static EDA_HOTKEY HkCallMacros7( _HKI( "Call Macro 7" ), HK_CALL_MACROS_7, '7' );
static EDA_HOTKEY HkRecordMacros8( wxT( "Record Macro 8" ), HK_RECORD_MACROS_8, GR_KB_CTRL+'8' );
static EDA_HOTKEY HkRecordMacros8( _HKI( "Record Macro 8" ), HK_RECORD_MACROS_8, GR_KB_CTRL+'8' );
static EDA_HOTKEY HkCallMacros8( wxT( "Call Macro 8" ), HK_CALL_MACROS_8, '8' );
static EDA_HOTKEY HkCallMacros8( _HKI( "Call Macro 8" ), HK_CALL_MACROS_8, '8' );
static EDA_HOTKEY HkRecordMacros9( wxT( "Record Macro 9" ), HK_RECORD_MACROS_9, GR_KB_CTRL+'9' );
static EDA_HOTKEY HkRecordMacros9( _HKI( "Record Macro 9" ), HK_RECORD_MACROS_9, GR_KB_CTRL+'9' );
static EDA_HOTKEY HkCallMacros9( wxT( "Call Macro 9" ), HK_CALL_MACROS_9, '9' );
static EDA_HOTKEY HkCallMacros9( _HKI( "Call Macro 9" ), HK_CALL_MACROS_9, '9' );
// List of common hotkey descriptors