2014-10-23 17:53:38 +00:00
|
|
|
/*
|
|
|
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
|
|
|
*
|
2017-06-17 16:11:40 +00:00
|
|
|
* Copyright (C) 2007-2017 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
2019-02-19 17:51:45 +00:00
|
|
|
* Copyright (C) 1992-2019 KiCad Developers, see AUTHORS.txt for contributors.
|
2014-10-23 17:53:38 +00:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, you may find one here:
|
|
|
|
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
|
|
|
* or you may search the http://www.gnu.org website for the version 2 license,
|
|
|
|
* or you may write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
|
|
|
*/
|
|
|
|
|
2012-01-23 04:33:36 +00:00
|
|
|
#include <fctsys.h>
|
|
|
|
#include <pcbnew.h>
|
2018-01-29 20:58:58 +00:00
|
|
|
#include <pcb_edit_frame.h>
|
2019-05-28 00:00:33 +00:00
|
|
|
#include <footprint_edit_frame.h>
|
2018-01-31 12:37:36 +00:00
|
|
|
#include <footprint_viewer_frame.h>
|
2018-08-11 06:25:09 +00:00
|
|
|
#include <footprint_wizard_frame.h>
|
2014-10-15 11:40:38 +00:00
|
|
|
#include <pcbnew_id.h>
|
2012-01-23 04:33:36 +00:00
|
|
|
#include <hotkeys.h>
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2015-03-22 14:04:09 +00:00
|
|
|
// 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
|
|
|
|
|
|
|
|
|
2007-08-30 08:15:05 +00:00
|
|
|
/* How to add a new hotkey:
|
2019-04-29 10:40:44 +00:00
|
|
|
* add a new id in the enum hotkey_id_command like MY_NEW_ID_FUNCTION.
|
2011-09-29 16:49:40 +00:00
|
|
|
* add a new EDA_HOTKEY entry like:
|
2015-03-22 14:04:09 +00:00
|
|
|
* static EDA_HOTKEY HkMyNewEntry(_HKI("Command Label"), MY_NEW_ID_FUNCTION, default key value);
|
2011-09-29 16:49:40 +00:00
|
|
|
* "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.
|
|
|
|
* default key value is the default hotkey for this command. Can be overridden by the user
|
|
|
|
* hotkey list file
|
|
|
|
* add the HkMyNewEntry pointer in the s_board_edit_Hotkey_List list ( or/and the
|
|
|
|
* s_module_edit_Hotkey_List list)
|
2007-08-30 08:15:05 +00:00
|
|
|
* Add the new code in the switch in OnHotKey() function.
|
2010-08-12 19:41:13 +00:00
|
|
|
* Note: when the variable itemCurrentlyEdited is true, an item is currently edited.
|
2011-09-29 16:49:40 +00:00
|
|
|
* This can be useful if the new function cannot be executed while an item is currently
|
|
|
|
* being edited ( For example, one cannot start a new wire when a component is moving.)
|
2007-08-30 08:15:05 +00:00
|
|
|
*
|
2013-08-03 05:15:23 +00:00
|
|
|
* Note: If a hotkey is a special key, be sure the corresponding wxWidget keycode (WXK_XXXX)
|
2007-08-30 08:15:05 +00:00
|
|
|
* is handled in the hotkey_name_descr s_Hotkey_Name_List list (see hotkeys_basic.cpp)
|
|
|
|
* and see this list for some ascii keys (space ...)
|
|
|
|
*/
|
2007-08-20 10:55:09 +00:00
|
|
|
|
2014-04-03 07:40:55 +00:00
|
|
|
// Hotkey list:
|
|
|
|
|
|
|
|
// mouse click command:
|
2015-03-22 14:04:09 +00:00
|
|
|
static EDA_HOTKEY HkMouseLeftClick( _HKI( "Mouse Left Click" ),
|
2014-04-03 07:40:55 +00:00
|
|
|
HK_LEFT_CLICK, WXK_RETURN, 0 );
|
2015-03-22 14:04:09 +00:00
|
|
|
static EDA_HOTKEY HkMouseLeftDClick( _HKI( "Mouse Left Double Click" ),
|
2014-04-03 07:40:55 +00:00
|
|
|
HK_LEFT_DCLICK, WXK_END, 0 );
|
|
|
|
|
2015-03-22 14:04:09 +00:00
|
|
|
static EDA_HOTKEY HkSwitch2CopperLayer( _HKI( "Switch to Copper (B.Cu) layer" ),
|
2011-09-29 16:49:40 +00:00
|
|
|
HK_SWITCH_LAYER_TO_COPPER, WXK_PAGEDOWN );
|
2014-06-29 13:05:51 +00:00
|
|
|
|
2015-03-22 14:04:09 +00:00
|
|
|
static EDA_HOTKEY HkSwitch2ComponentLayer( _HKI( "Switch to Component (F.Cu) layer" ),
|
2011-09-29 16:49:40 +00:00
|
|
|
HK_SWITCH_LAYER_TO_COMPONENT, WXK_PAGEUP );
|
2014-06-29 13:05:51 +00:00
|
|
|
|
2015-03-22 14:04:09 +00:00
|
|
|
static EDA_HOTKEY HkSwitch2InnerLayer1( _HKI( "Switch to Inner layer 1" ),
|
2011-09-29 16:49:40 +00:00
|
|
|
HK_SWITCH_LAYER_TO_INNER1, WXK_F5 );
|
2015-03-22 14:04:09 +00:00
|
|
|
static EDA_HOTKEY HkSwitch2InnerLayer2( _HKI( "Switch to Inner layer 2" ),
|
2011-09-29 16:49:40 +00:00
|
|
|
HK_SWITCH_LAYER_TO_INNER2, WXK_F6 );
|
2015-03-22 14:04:09 +00:00
|
|
|
static EDA_HOTKEY HkSwitch2InnerLayer3( _HKI( "Switch to Inner layer 3" ),
|
2011-09-29 16:49:40 +00:00
|
|
|
HK_SWITCH_LAYER_TO_INNER3, WXK_F7 );
|
2015-03-22 14:04:09 +00:00
|
|
|
static EDA_HOTKEY HkSwitch2InnerLayer4( _HKI( "Switch to Inner layer 4" ),
|
2011-09-29 16:49:40 +00:00
|
|
|
HK_SWITCH_LAYER_TO_INNER4, WXK_F8 );
|
2015-03-22 14:04:09 +00:00
|
|
|
static EDA_HOTKEY HkSwitch2InnerLayer5( _HKI( "Switch to Inner layer 5" ),
|
2014-12-18 18:53:19 +00:00
|
|
|
HK_SWITCH_LAYER_TO_INNER5, GR_KB_SHIFT+WXK_F5 );
|
2015-03-22 14:04:09 +00:00
|
|
|
static EDA_HOTKEY HkSwitch2InnerLayer6( _HKI( "Switch to Inner layer 6" ),
|
2014-12-18 18:53:19 +00:00
|
|
|
HK_SWITCH_LAYER_TO_INNER6, GR_KB_SHIFT+WXK_F6 );
|
2011-09-29 16:49:40 +00:00
|
|
|
|
2015-03-22 14:04:09 +00:00
|
|
|
static EDA_HOTKEY HkSwitch2NextCopperLayer( _HKI( "Switch to Next Layer" ),
|
2011-09-29 16:49:40 +00:00
|
|
|
HK_SWITCH_LAYER_TO_NEXT, '+' );
|
2015-03-22 14:04:09 +00:00
|
|
|
static EDA_HOTKEY HkSwitch2PreviousCopperLayer( _HKI( "Switch to Previous Layer" ),
|
2011-09-29 16:49:40 +00:00
|
|
|
HK_SWITCH_LAYER_TO_PREVIOUS, '-' );
|
|
|
|
|
2019-05-15 22:49:48 +00:00
|
|
|
static EDA_HOTKEY HkFind( _HKI( "Find" ), HK_FIND, 'F' + GR_KB_CTRL );
|
|
|
|
static EDA_HOTKEY HkReplace( _HKI( "Find and Replace" ), HK_REPLACE, 'F' + GR_KB_CTRL + GR_KB_ALT );
|
2015-03-22 14:04:09 +00:00
|
|
|
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' );
|
2018-02-25 18:30:59 +00:00
|
|
|
|
|
|
|
static EDA_HOTKEY HkRouteDiffPair( _HKI( "Route Differential Pair (Modern Toolset only)" ),
|
|
|
|
HK_ROUTE_DIFF_PAIR, '6' );
|
|
|
|
static EDA_HOTKEY HkRouteTuneSingle( _HKI( "Tune Single Track (Modern Toolset only)" ),
|
|
|
|
HK_ROUTE_TUNE_SINGLE, '7' );
|
|
|
|
static EDA_HOTKEY HkRouteTuneDiffPair( _HKI( "Tune Differential Pair Length (Modern Toolset only)" ),
|
|
|
|
HK_ROUTE_TUNE_DIFF_PAIR, '8' );
|
|
|
|
static EDA_HOTKEY HkRouteTuneSkew( _HKI( "Tune Differential Pair Skew (Modern Toolset only)" ),
|
|
|
|
HK_ROUTE_TUNE_SKEW, '9' );
|
2018-05-20 13:08:06 +00:00
|
|
|
static EDA_HOTKEY HkRouteTuneSettings( _HKI( "Length Tuning Settings (Modern Toolset only)" ),
|
2018-05-13 20:11:11 +00:00
|
|
|
HK_ROUTE_TUNE_SETTINGS, 'L' + GR_KB_CTRL );
|
2018-02-25 18:30:59 +00:00
|
|
|
|
2018-05-14 02:31:21 +00:00
|
|
|
static EDA_HOTKEY HkRouteTuneIncreaseSpacing( _HKI( "Increase meander spacing by one step." ),
|
|
|
|
HK_ROUTE_TUNE_INCREASE_SPACING, '1' );
|
|
|
|
static EDA_HOTKEY HkRouteTuneDecreaseSpacing( _HKI( "Decrease meander spacing by one step." ),
|
|
|
|
HK_ROUTE_TUNE_DECREASE_SPACING, '2' );
|
|
|
|
static EDA_HOTKEY HkRouteTuneIncreaseAmp( _HKI( "Increase meander amplitude by one step." ),
|
|
|
|
HK_ROUTE_TUNE_INCREASE_AMP, '3' );
|
|
|
|
static EDA_HOTKEY HkRouteTuneDecreaseAmp( _HKI( "Decrease meander amplitude by one step." ),
|
|
|
|
HK_ROUTE_TUNE_DECREASE_AMP, '4' );
|
|
|
|
|
2015-03-22 14:04:09 +00:00
|
|
|
static EDA_HOTKEY HkAddThroughVia( _HKI( "Add Through Via" ), HK_ADD_THROUGH_VIA, 'V' );
|
|
|
|
static EDA_HOTKEY HkSelLayerAndAddThroughVia( _HKI( "Select Layer and Add Through Via" ),
|
2013-09-20 10:52:33 +00:00
|
|
|
HK_SEL_LAYER_AND_ADD_THROUGH_VIA, '<' );
|
2015-03-22 14:04:09 +00:00
|
|
|
static EDA_HOTKEY HkAddMicroVia( _HKI( "Add MicroVia" ), HK_ADD_MICROVIA, 'V' + GR_KB_CTRL );
|
2019-02-19 17:51:45 +00:00
|
|
|
static EDA_HOTKEY HkAddBlindBuriedVia( _HKI( "Add Blind/Buried Via" ), HK_ADD_BLIND_BURIED_VIA,
|
|
|
|
'V' + GR_KB_ALT + GR_KB_SHIFT );
|
2015-03-22 14:04:09 +00:00
|
|
|
static EDA_HOTKEY HkSelLayerAndAddBlindBuriedVia( _HKI( "Select Layer and Add Blind/Buried Via" ),
|
2019-02-19 17:51:45 +00:00
|
|
|
HK_SEL_LAYER_AND_ADD_BLIND_BURIED_VIA,
|
|
|
|
'<' + GR_KB_ALT );
|
|
|
|
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' );
|
2015-03-22 14:04:09 +00:00
|
|
|
static EDA_HOTKEY HkPlaceItem( _HKI( "Place Item" ), HK_PLACE_ITEM, 'P' );
|
|
|
|
static EDA_HOTKEY HkEditBoardItem( _HKI( "Edit Item" ), HK_EDIT_ITEM, 'E' );
|
2019-02-19 17:51:45 +00:00
|
|
|
static EDA_HOTKEY HkEditWithModedit( _HKI( "Edit with Footprint Editor" ),
|
|
|
|
HK_EDIT_MODULE_WITH_MODEDIT, 'E' + GR_KB_CTRL );
|
2015-03-22 14:04:09 +00:00
|
|
|
static EDA_HOTKEY HkFlipItem( _HKI( "Flip Item" ), HK_FLIP_ITEM, 'F' );
|
|
|
|
static EDA_HOTKEY HkRotateItem( _HKI( "Rotate Item" ), HK_ROTATE_ITEM, 'R' );
|
2018-02-25 18:30:59 +00:00
|
|
|
static EDA_HOTKEY HkRotateItemClockwise( _HKI( "Rotate Item Clockwise (Modern Toolset only)" ),
|
|
|
|
HK_ROTATE_ITEM_CLOCKWISE, GR_KB_SHIFT + 'R' );
|
2015-03-22 14:04:09 +00:00
|
|
|
static EDA_HOTKEY HkMoveItem( _HKI( "Move Item" ), HK_MOVE_ITEM, 'M' );
|
2019-02-19 17:51:45 +00:00
|
|
|
static EDA_HOTKEY HkMoveItemExact( _HKI( "Move Item Exactly" ), HK_MOVE_ITEM_EXACT,
|
|
|
|
'M' + GR_KB_CTRL );
|
|
|
|
static EDA_HOTKEY HkPositionItemRelative( _HKI( "Position Item Relative" ), HK_POSITION_RELATIVE,
|
2019-04-11 23:13:24 +00:00
|
|
|
'P' + GR_KB_SHIFT );
|
2019-04-26 18:37:47 +00:00
|
|
|
static EDA_HOTKEY HkDuplicateItem( _HKI( "Duplicate Item" ), HK_DUPLICATE, 'D' + GR_KB_CTRL );
|
2015-03-22 14:04:09 +00:00
|
|
|
static EDA_HOTKEY HkDuplicateItemAndIncrement( _HKI( "Duplicate Item and Increment" ),
|
2019-02-19 17:51:45 +00:00
|
|
|
HK_DUPLICATE_ITEM_AND_INCREMENT,
|
|
|
|
'D' + GR_KB_SHIFTCTRL );
|
2018-03-02 10:07:56 +00:00
|
|
|
static EDA_HOTKEY HkCreateArray( _HKI( "Create Array" ), HK_CREATE_ARRAY, 'T' + GR_KB_CTRL );
|
2015-03-22 14:04:09 +00:00
|
|
|
static EDA_HOTKEY HkDragFootprint( _HKI( "Drag Item" ), HK_DRAG_ITEM, 'G' );
|
2019-02-19 17:51:45 +00:00
|
|
|
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' );
|
2018-12-12 03:50:21 +00:00
|
|
|
static EDA_HOTKEY HkDelete( _HKI( "Delete Full Track" ), HK_DELETE, WXK_DELETE );
|
2015-03-22 14:04:09 +00:00
|
|
|
static EDA_HOTKEY HkResetLocalCoord( _HKI( "Reset Local Coordinates" ), HK_RESET_LOCAL_COORD, ' ' );
|
2019-02-19 17:51:45 +00:00
|
|
|
static EDA_HOTKEY HkSwitchHighContrastMode( _HKI( "Toggle High Contrast Mode" ),
|
|
|
|
HK_SWITCH_HIGHCONTRAST_MODE, 'H'+GR_KB_CTRL );
|
2015-03-22 14:04:09 +00:00
|
|
|
|
2018-05-14 03:22:11 +00:00
|
|
|
static EDA_HOTKEY HkAddLine( _HKI( "Draw Line" ), HK_ADD_LINE, 'L' + GR_KB_SHIFTCTRL );
|
2019-02-19 17:51:45 +00:00
|
|
|
static EDA_HOTKEY HkAddPolygon( _HKI( "Draw Graphic Polygon" ), HK_ADD_POLYGON,
|
|
|
|
'P' + GR_KB_SHIFTCTRL );
|
2018-05-14 03:22:11 +00:00
|
|
|
static EDA_HOTKEY HkAddCircle( _HKI( "Draw Circle" ), HK_ADD_CIRCLE, 'C' + GR_KB_SHIFTCTRL );
|
|
|
|
static EDA_HOTKEY HkAddArc( _HKI( "Draw Arc" ), HK_ADD_ARC, 'A' + GR_KB_SHIFTCTRL );
|
|
|
|
static EDA_HOTKEY HkAddText( _HKI( "Add Text" ), HK_ADD_TEXT, 'T' + GR_KB_SHIFTCTRL );
|
2019-02-19 17:51:45 +00:00
|
|
|
static EDA_HOTKEY HkAddDimension( _HKI( "Add Dimension" ), HK_ADD_DIMENSION,
|
|
|
|
'H' + GR_KB_SHIFTCTRL );
|
2019-05-14 19:21:10 +00:00
|
|
|
#ifdef __WXMAC__
|
|
|
|
static EDA_HOTKEY HkAddFilledZone( _HKI( "Add Filled Zone" ), HK_ADD_ZONE, 'Z' + GR_KB_ALT );
|
|
|
|
#else
|
2018-05-14 03:22:11 +00:00
|
|
|
static EDA_HOTKEY HkAddFilledZone( _HKI( "Add Filled Zone" ), HK_ADD_ZONE, 'Z' + GR_KB_SHIFTCTRL );
|
2019-05-14 19:21:10 +00:00
|
|
|
#endif
|
2018-05-14 03:22:11 +00:00
|
|
|
static EDA_HOTKEY HkAddFreeVia( _HKI( "Add Vias" ), HK_ADD_FREE_VIA, 'V' + GR_KB_SHIFTCTRL );
|
|
|
|
static EDA_HOTKEY HkAddKeepout( _HKI( "Add Keepout Area" ), HK_ADD_KEEPOUT, 'K' + GR_KB_SHIFTCTRL );
|
2018-08-13 07:28:48 +00:00
|
|
|
static EDA_HOTKEY HkAddZoneCutout( _HKI( "Add a Zone Cutout" ), HK_ADD_CUTOUT, 'C' + GR_KB_SHIFT );
|
2019-02-19 17:51:45 +00:00
|
|
|
static EDA_HOTKEY HkAddSimilarZone( _HKI( "Add a Similar Zone" ), HK_ADD_SIMILAR_ZONE,
|
|
|
|
'.' + GR_KB_SHIFTCTRL );
|
2018-06-14 05:52:43 +00:00
|
|
|
static EDA_HOTKEY HkAddDXF( _HKI( "Place DXF" ), HK_ADD_DXF, 'F' + GR_KB_SHIFTCTRL );
|
2019-02-19 17:51:45 +00:00
|
|
|
static EDA_HOTKEY HkAddAnchor( _HKI( "Place the Footprint Anchor" ), HK_ADD_ANCHOR,
|
|
|
|
'N' + GR_KB_SHIFTCTRL );
|
2018-05-14 03:22:11 +00:00
|
|
|
|
2019-02-19 17:51:45 +00:00
|
|
|
static EDA_HOTKEY HkIncreaseLineWidth( _HKI( "Increase Line Width" ), HK_INC_LINE_WIDTH,
|
|
|
|
'+' + GR_KB_CTRL );
|
|
|
|
static EDA_HOTKEY HkDecreaseLineWidth( _HKI( "Decrease Line Width" ), HK_DEC_LINE_WIDTH,
|
|
|
|
'-' + GR_KB_CTRL );
|
2018-05-14 03:22:11 +00:00
|
|
|
|
|
|
|
|
2015-03-22 14:04:09 +00:00
|
|
|
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' );
|
|
|
|
|
2018-02-19 19:26:02 +00:00
|
|
|
static EDA_HOTKEY HkCanvasOpenGL( _HKI( "Switch to Modern Toolset with hardware-accelerated graphics (recommended)" ),
|
2015-07-06 11:52:52 +00:00
|
|
|
HK_CANVAS_OPENGL,
|
|
|
|
#ifdef __WXMAC__
|
|
|
|
GR_KB_ALT +
|
|
|
|
#endif
|
|
|
|
WXK_F11 );
|
2018-02-19 19:26:02 +00:00
|
|
|
static EDA_HOTKEY HkCanvasCairo( _HKI( "Switch to Modern Toolset with software graphics (fall-back)" ),
|
2015-07-06 11:52:52 +00:00
|
|
|
HK_CANVAS_CAIRO,
|
|
|
|
#ifdef __WXMAC__
|
|
|
|
GR_KB_ALT +
|
|
|
|
#endif
|
|
|
|
WXK_F12 );
|
2013-07-07 00:30:28 +00:00
|
|
|
|
2015-03-22 14:04:09 +00:00
|
|
|
static EDA_HOTKEY HkZoneFillOrRefill( _HKI( "Fill or Refill All Zones" ),
|
2019-02-19 17:51:45 +00:00
|
|
|
HK_ZONE_FILL_OR_REFILL, 'B' );
|
2015-03-22 14:04:09 +00:00
|
|
|
static EDA_HOTKEY HkZoneRemoveFilled( _HKI( "Remove Filled Areas in All Zones" ),
|
2019-02-19 17:51:45 +00:00
|
|
|
HK_ZONE_REMOVE_FILLED, 'B' + GR_KB_CTRL );
|
2010-02-16 10:42:57 +00:00
|
|
|
/* Fit on Screen */
|
|
|
|
#if !defined( __WXMAC__ )
|
2015-03-22 14:04:09 +00:00
|
|
|
static EDA_HOTKEY HkZoomAuto( _HKI( "Zoom Auto" ), HK_ZOOM_AUTO, WXK_HOME );
|
2010-02-16 10:42:57 +00:00
|
|
|
#else
|
2015-03-22 14:04:09 +00:00
|
|
|
static EDA_HOTKEY HkZoomAuto( _HKI( "Zoom Auto" ), HK_ZOOM_AUTO, GR_KB_CTRL + '0' );
|
2010-02-16 10:42:57 +00:00
|
|
|
#endif
|
|
|
|
|
2015-03-22 14:04:09 +00:00
|
|
|
static EDA_HOTKEY HkZoomCenter( _HKI( "Zoom Center" ), HK_ZOOM_CENTER, WXK_F4 );
|
2010-02-16 10:42:57 +00:00
|
|
|
|
|
|
|
/* Refresh Screen */
|
|
|
|
#if !defined( __WXMAC__ )
|
2015-03-22 14:04:09 +00:00
|
|
|
static EDA_HOTKEY HkZoomRedraw( _HKI( "Zoom Redraw" ), HK_ZOOM_REDRAW, WXK_F3 );
|
2010-02-16 10:42:57 +00:00
|
|
|
#else
|
2015-03-22 14:04:09 +00:00
|
|
|
static EDA_HOTKEY HkZoomRedraw( _HKI( "Zoom Redraw" ), HK_ZOOM_REDRAW, GR_KB_CTRL + 'R' );
|
2010-02-16 10:42:57 +00:00
|
|
|
#endif
|
2010-01-19 20:43:44 +00:00
|
|
|
|
|
|
|
/* Zoom In */
|
|
|
|
#if !defined( __WXMAC__ )
|
2015-03-22 14:04:09 +00:00
|
|
|
static EDA_HOTKEY HkZoomIn( _HKI( "Zoom In" ), HK_ZOOM_IN, WXK_F1 );
|
2010-01-19 20:43:44 +00:00
|
|
|
#else
|
2015-03-22 14:04:09 +00:00
|
|
|
static EDA_HOTKEY HkZoomIn( _HKI( "Zoom In" ), HK_ZOOM_IN, GR_KB_CTRL + '+' );
|
2010-01-19 20:43:44 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Zoom Out */
|
|
|
|
#if !defined( __WXMAC__ )
|
2015-03-22 14:04:09 +00:00
|
|
|
static EDA_HOTKEY HkZoomOut( _HKI( "Zoom Out" ), HK_ZOOM_OUT, WXK_F2 );
|
2010-01-19 20:43:44 +00:00
|
|
|
#else
|
2015-03-22 14:04:09 +00:00
|
|
|
static EDA_HOTKEY HkZoomOut( _HKI( "Zoom Out" ), HK_ZOOM_OUT, GR_KB_CTRL + '-' );
|
2010-01-19 20:43:44 +00:00
|
|
|
#endif
|
|
|
|
|
2017-06-17 16:11:40 +00:00
|
|
|
static EDA_HOTKEY HkZoomSelection( _HKI( "Zoom to Selection" ), HK_ZOOM_SELECTION,
|
2018-03-25 15:02:53 +00:00
|
|
|
GR_KB_CTRL + WXK_F5, ID_ZOOM_SELECTION );
|
2017-06-17 16:11:40 +00:00
|
|
|
|
2015-03-26 19:04:52 +00:00
|
|
|
static EDA_HOTKEY Hk3DViewer( _HKI( "3D Viewer" ), HK_3D_VIEWER, GR_KB_ALT + '3' );
|
|
|
|
|
2019-01-02 05:12:52 +00:00
|
|
|
static EDA_HOTKEY HkHelp( _HKI( "List Hotkeys" ), HK_HELP, GR_KB_CTRL + WXK_F1 );
|
2010-01-19 20:43:44 +00:00
|
|
|
|
2015-03-22 14:04:09 +00:00
|
|
|
static EDA_HOTKEY HkSwitchTrackWidthToNext( _HKI( "Switch Track Width To Next" ),
|
2011-09-29 16:49:40 +00:00
|
|
|
HK_SWITCH_TRACK_WIDTH_TO_NEXT, 'W' );
|
2011-09-09 11:02:03 +00:00
|
|
|
|
2015-03-22 14:04:09 +00:00
|
|
|
static EDA_HOTKEY HkSwitchTrackWidthToPrevious( _HKI( "Switch Track Width To Previous" ),
|
2019-02-19 17:51:45 +00:00
|
|
|
HK_SWITCH_TRACK_WIDTH_TO_PREVIOUS,
|
2019-03-22 16:15:04 +00:00
|
|
|
'W' + GR_KB_SHIFT );
|
2011-09-09 11:02:03 +00:00
|
|
|
|
2015-03-22 14:04:09 +00:00
|
|
|
static EDA_HOTKEY HkSwitchGridToFastGrid1( _HKI( "Switch Grid To Fast Grid1" ),
|
2011-09-29 16:49:40 +00:00
|
|
|
HK_SWITCH_GRID_TO_FASTGRID1, GR_KB_ALT + '1' );
|
2011-09-09 11:02:03 +00:00
|
|
|
|
2015-03-22 14:04:09 +00:00
|
|
|
static EDA_HOTKEY HkSwitchGridToFastGrid2( _HKI( "Switch Grid To Fast Grid2" ),
|
2011-09-29 16:49:40 +00:00
|
|
|
HK_SWITCH_GRID_TO_FASTGRID2, GR_KB_ALT + '2' );
|
2011-09-09 11:02:03 +00:00
|
|
|
|
2015-03-22 14:04:09 +00:00
|
|
|
static EDA_HOTKEY HkSwitchGridToNext( _HKI( "Switch Grid To Next" ),
|
2015-05-01 09:31:23 +00:00
|
|
|
HK_SWITCH_GRID_TO_NEXT, 'N' );
|
2011-09-09 11:02:03 +00:00
|
|
|
|
2015-03-22 14:04:09 +00:00
|
|
|
static EDA_HOTKEY HkSwitchGridToPrevious( _HKI( "Switch Grid To Previous" ),
|
2015-05-01 09:31:23 +00:00
|
|
|
HK_SWITCH_GRID_TO_PREVIOUS, 'N' + GR_KB_SHIFT );
|
2010-01-19 20:43:44 +00:00
|
|
|
|
2015-03-22 14:04:09 +00:00
|
|
|
static EDA_HOTKEY HkSwitchUnits( _HKI( "Switch Units" ), HK_SWITCH_UNITS, 'U' + GR_KB_CTRL );
|
2017-06-17 16:11:40 +00:00
|
|
|
|
2015-03-22 14:04:09 +00:00
|
|
|
static EDA_HOTKEY HkTrackDisplayMode( _HKI( "Track Display Mode" ),
|
2011-09-29 16:49:40 +00:00
|
|
|
HK_SWITCH_TRACK_DISPLAY_MODE, 'K' );
|
2017-06-17 16:11:40 +00:00
|
|
|
|
2015-03-22 14:04:09 +00:00
|
|
|
static EDA_HOTKEY HkAddModule( _HKI( "Add Footprint" ), HK_ADD_MODULE, 'O' );
|
2011-09-09 11:02:03 +00:00
|
|
|
|
2017-06-17 16:11:40 +00:00
|
|
|
// These hotkeys work only in GAL canvas, because the legacy canvas using wxDC does not know
|
|
|
|
// the transparency (alpha channel)
|
2018-02-25 18:30:59 +00:00
|
|
|
static EDA_HOTKEY HkIncLayerAlpha( _HKI( "Increment Layer Transparency (Modern Toolset only)" ),
|
|
|
|
HK_INC_LAYER_ALPHA, '}' );
|
2017-06-17 16:11:40 +00:00
|
|
|
|
2018-02-25 18:30:59 +00:00
|
|
|
static EDA_HOTKEY HkDecLayerAlpha( _HKI( "Decrement Layer Transparency (Modern Toolset only)" ),
|
|
|
|
HK_DEC_LAYER_ALPHA, '{' );
|
|
|
|
|
|
|
|
// These two are currently unused, and are intentionally not added to a list below.
|
|
|
|
static EDA_HOTKEY HkIncHighContrast( _HKI( "Increment High Contrast" ), HK_HIGHCONTRAST_INC, '>' );
|
|
|
|
static EDA_HOTKEY HkDecHighContrast( _HKI( "Decrement High Contrast" ), HK_HIGHCONTRAST_DEC, '<' );
|
2017-06-17 16:11:40 +00:00
|
|
|
|
2019-02-19 17:51:45 +00:00
|
|
|
static EDA_HOTKEY HkSelectConnection( _HKI( "Select Single Track" ), HK_SEL_TRIVIAL_CONNECTION,
|
|
|
|
'U' );
|
2017-06-30 12:30:10 +00:00
|
|
|
|
2019-02-19 17:51:45 +00:00
|
|
|
static EDA_HOTKEY HkSelectCopper( _HKI( "Select Connected Tracks" ), HK_SEL_COPPER_CONNECTION,
|
|
|
|
'I' );
|
2017-06-30 12:30:10 +00:00
|
|
|
|
2019-02-19 17:51:45 +00:00
|
|
|
static EDA_HOTKEY HkRoutingOptions( _HKI( "Routing Options" ), HK_ROUTING_OPTIONS,
|
2019-04-01 17:18:29 +00:00
|
|
|
',' + GR_KB_CTRL + GR_KB_SHIFT );
|
2017-06-30 12:59:16 +00:00
|
|
|
|
|
|
|
static EDA_HOTKEY HkCustomTrackWidth( _HKI( "Custom Track/Via Size" ), HK_CUSTOM_TRACK_WIDTH, 'Q' );
|
|
|
|
|
2019-02-19 17:51:45 +00:00
|
|
|
static EDA_HOTKEY HkDpDimension( _HKI( "Differential Pair Dimensions" ), HK_DP_DIMENSIONS,
|
|
|
|
'R' + GR_KB_SHIFTCTRL );
|
2017-06-30 12:59:16 +00:00
|
|
|
|
|
|
|
static EDA_HOTKEY HkViaSizeInc( _HKI( "Increase Via Size" ), HK_VIA_SIZE_INC, '\'' );
|
|
|
|
|
|
|
|
static EDA_HOTKEY HkViaSizeDec( _HKI( "Decrease Via Size" ), HK_VIA_SIZE_DEC, '\\' );
|
|
|
|
|
2018-03-27 03:09:38 +00:00
|
|
|
static EDA_HOTKEY HkHighlightNetSelection( _HKI( "Toggle Highlight of Selected Net (Modern Toolset only)" ),
|
|
|
|
HK_HIGHLIGHT_NET_SELECTION, '`' );
|
|
|
|
|
2018-02-14 22:50:41 +00:00
|
|
|
// Common: hotkeys_basic.h
|
|
|
|
static EDA_HOTKEY HkNew( _HKI( "New" ), HK_NEW, GR_KB_CTRL + 'N', (int) wxID_NEW );
|
|
|
|
static EDA_HOTKEY HkOpen( _HKI( "Open" ), HK_OPEN, GR_KB_CTRL + 'O', (int) wxID_OPEN );
|
|
|
|
static EDA_HOTKEY HkSave( _HKI( "Save" ), HK_SAVE, GR_KB_CTRL + 'S', (int) wxID_SAVE );
|
2019-02-19 17:51:45 +00:00
|
|
|
static EDA_HOTKEY HkSaveAs( _HKI( "Save As" ), HK_SAVEAS, GR_KB_SHIFT + GR_KB_CTRL + 'S',
|
|
|
|
(int) wxID_SAVEAS );
|
2018-02-14 22:50:41 +00:00
|
|
|
static EDA_HOTKEY HkPrint( _HKI( "Print" ), HK_PRINT, GR_KB_CTRL + 'P', (int) wxID_PRINT );
|
2018-02-14 22:22:09 +00:00
|
|
|
|
2019-05-15 22:49:48 +00:00
|
|
|
static EDA_HOTKEY HkUndo( _HKI( "Undo" ), HK_UNDO, GR_KB_CTRL + 'Z' );
|
2018-02-14 22:22:09 +00:00
|
|
|
|
|
|
|
#if !defined( __WXMAC__ )
|
2019-05-15 22:49:48 +00:00
|
|
|
static EDA_HOTKEY HkRedo( _HKI( "Redo" ), HK_REDO, GR_KB_CTRL + 'Y' );
|
2018-02-14 22:22:09 +00:00
|
|
|
#else
|
2019-05-15 22:49:48 +00:00
|
|
|
static EDA_HOTKEY HkRedo( _HKI( "Redo" ), HK_REDO, GR_KB_SHIFT + GR_KB_CTRL + 'Z' );
|
2018-02-14 22:22:09 +00:00
|
|
|
#endif
|
|
|
|
|
2019-05-15 22:49:48 +00:00
|
|
|
static EDA_HOTKEY HkCut( _HKI( "Cut" ), HK_CUT, GR_KB_CTRL + 'X' );
|
|
|
|
static EDA_HOTKEY HkCopy( _HKI( "Copy" ), HK_COPY, GR_KB_CTRL + 'C' );
|
|
|
|
static EDA_HOTKEY HkPaste( _HKI( "Paste" ), HK_PASTE, GR_KB_CTRL + 'V' );
|
|
|
|
|
2019-04-01 17:18:29 +00:00
|
|
|
static EDA_HOTKEY HkPreferences( _HKI( "Preferences" ),
|
|
|
|
HK_PREFERENCES, GR_KB_CTRL + ',', (int) wxID_PREFERENCES );
|
2018-02-14 22:22:09 +00:00
|
|
|
|
2018-02-25 18:30:59 +00:00
|
|
|
static EDA_HOTKEY HkToggleCursor( _HKI( "Toggle Cursor Display (Modern Toolset only)" ),
|
|
|
|
HK_TOGGLE_CURSOR, 'X' + GR_KB_SHIFTCTRL );
|
|
|
|
static EDA_HOTKEY HkMeasureTool( _HKI( "Measure Distance (Modern Toolset only)" ),
|
|
|
|
HK_MEASURE_TOOL, 'M' + GR_KB_SHIFTCTRL );
|
|
|
|
|
2018-07-24 15:15:05 +00:00
|
|
|
static EDA_HOTKEY HkInsertCorner( _HKI( "Insert Corner (Modern Toolset only)" ),
|
|
|
|
HK_INSERT_CORNER, WXK_INSERT );
|
|
|
|
|
2007-09-10 04:51:01 +00:00
|
|
|
// List of common hotkey descriptors
|
2011-09-29 16:49:40 +00:00
|
|
|
EDA_HOTKEY* common_Hotkey_List[] =
|
2009-12-02 09:59:49 +00:00
|
|
|
{
|
2018-02-14 22:50:41 +00:00
|
|
|
&HkNew, &HkOpen, &HkSave, &HkSaveAs, &HkPrint,
|
2018-02-14 22:22:09 +00:00
|
|
|
&HkUndo, &HkRedo,
|
2019-05-15 22:49:48 +00:00
|
|
|
&HkCut, &HkCopy, &HkPaste,
|
|
|
|
&HkFind, &HkReplace,
|
2019-04-01 17:18:29 +00:00
|
|
|
&HkHelp, &HkPreferences,
|
|
|
|
&HkZoomIn, &HkZoomOut,
|
|
|
|
&HkZoomRedraw, &HkZoomCenter, &HkZoomAuto, &HkZoomSelection,
|
|
|
|
&Hk3DViewer,
|
2013-08-03 16:16:57 +00:00
|
|
|
&HkSwitchUnits, &HkResetLocalCoord, &HkSetGridOrigin, &HkResetGridOrigin,
|
2014-04-03 07:40:55 +00:00
|
|
|
&HkMouseLeftClick,
|
|
|
|
&HkMouseLeftDClick,
|
2018-02-25 18:30:59 +00:00
|
|
|
&HkIncLayerAlpha, &HkDecLayerAlpha,
|
|
|
|
&HkToggleCursor,
|
|
|
|
&HkMeasureTool,
|
2010-01-19 20:43:44 +00:00
|
|
|
NULL
|
2009-12-02 09:59:49 +00:00
|
|
|
};
|
2007-08-20 10:55:09 +00:00
|
|
|
|
2014-10-15 11:40:38 +00:00
|
|
|
// common hotkey descriptors only useful in footprint viewer
|
|
|
|
EDA_HOTKEY* common_basic_Hotkey_List[] =
|
|
|
|
{
|
|
|
|
&HkHelp, &HkZoomIn, &HkZoomOut,
|
2015-03-26 19:04:52 +00:00
|
|
|
&HkZoomRedraw, &HkZoomCenter, &HkZoomAuto, &Hk3DViewer,
|
2014-10-15 11:40:38 +00:00
|
|
|
&HkSwitchUnits, &HkResetLocalCoord,
|
2019-05-15 22:49:48 +00:00
|
|
|
&HkCut, &HkCopy, &HkPaste,
|
|
|
|
&HkFind, &HkReplace,
|
2014-10-15 11:40:38 +00:00
|
|
|
&HkMouseLeftClick,
|
|
|
|
&HkMouseLeftDClick,
|
|
|
|
NULL
|
|
|
|
};
|
|
|
|
|
2011-09-30 18:15:37 +00:00
|
|
|
// List of hotkey descriptors for Pcbnew
|
2011-09-29 16:49:40 +00:00
|
|
|
EDA_HOTKEY* board_edit_Hotkey_List[] =
|
2009-12-02 09:59:49 +00:00
|
|
|
{
|
2018-05-13 20:11:11 +00:00
|
|
|
// Adding Items
|
|
|
|
&HkPlaceItem,
|
|
|
|
&HkAddModule,
|
2018-05-14 03:22:11 +00:00
|
|
|
&HkAddFreeVia,
|
|
|
|
&HkAddFilledZone,
|
|
|
|
&HkAddKeepout,
|
|
|
|
&HkAddZoneCutout,
|
|
|
|
&HkAddSimilarZone,
|
|
|
|
&HkAddLine,
|
|
|
|
&HkAddCircle,
|
|
|
|
&HkAddArc,
|
|
|
|
&HkAddPolygon,
|
|
|
|
&HkAddText,
|
|
|
|
&HkAddDimension,
|
|
|
|
&HkAddDXF,
|
2018-05-13 20:11:11 +00:00
|
|
|
|
|
|
|
// Routing and options during routing
|
2018-02-25 18:30:59 +00:00
|
|
|
&HkAddNewTrack,
|
2018-05-13 20:11:11 +00:00
|
|
|
&HkSwitchTrackPosture,
|
|
|
|
&HkDragTrackKeepSlope,
|
|
|
|
&HkAddThroughVia,
|
|
|
|
&HkAddBlindBuriedVia,
|
|
|
|
&HkAddMicroVia,
|
|
|
|
|
|
|
|
// Routing
|
2018-02-25 18:30:59 +00:00
|
|
|
&HkRouteDiffPair,
|
|
|
|
&HkRouteTuneSingle,
|
|
|
|
&HkRouteTuneDiffPair,
|
|
|
|
&HkRouteTuneSkew,
|
2018-05-13 20:11:11 +00:00
|
|
|
|
|
|
|
// Routing Options
|
|
|
|
&HkRoutingOptions,
|
|
|
|
&HkRouteTuneSettings,
|
2018-05-14 02:31:21 +00:00
|
|
|
&HkRouteTuneIncreaseSpacing,
|
|
|
|
&HkRouteTuneDecreaseSpacing,
|
|
|
|
&HkRouteTuneIncreaseAmp,
|
|
|
|
&HkRouteTuneDecreaseAmp,
|
2018-05-13 20:11:11 +00:00
|
|
|
&HkDpDimension,
|
|
|
|
|
|
|
|
// Zones
|
|
|
|
&HkZoneFillOrRefill,
|
|
|
|
&HkZoneRemoveFilled,
|
|
|
|
|
2018-07-24 15:15:05 +00:00
|
|
|
// Point editor (zones and segments)
|
|
|
|
&HkInsertCorner,
|
|
|
|
|
2018-05-13 20:11:11 +00:00
|
|
|
// Highlight and display
|
|
|
|
&HkSelectConnection,
|
|
|
|
&HkSelectCopper,
|
|
|
|
&HkHighlightNetSelection,
|
|
|
|
&HkTrackDisplayMode,
|
|
|
|
|
|
|
|
// Adjust track/via sizes
|
|
|
|
&HkCustomTrackWidth,
|
|
|
|
&HkSwitchTrackWidthToNext,
|
|
|
|
&HkSwitchTrackWidthToPrevious,
|
|
|
|
&HkViaSizeInc,
|
|
|
|
&HkViaSizeDec,
|
|
|
|
|
|
|
|
// Remove items
|
|
|
|
&HkDelete,
|
|
|
|
&HkBackspace,
|
|
|
|
|
|
|
|
// Edit placement
|
|
|
|
&HkDragFootprint,
|
2014-04-03 07:40:55 +00:00
|
|
|
&HkMoveItem,
|
2018-05-13 20:11:11 +00:00
|
|
|
&HkGetAndMoveFootprint,
|
|
|
|
&HkMoveItemExact,
|
|
|
|
&HkPositionItemRelative,
|
2014-04-03 07:40:55 +00:00
|
|
|
&HkFlipItem,
|
2018-05-13 20:11:11 +00:00
|
|
|
&HkRotateItem,
|
|
|
|
&HkRotateItemClockwise,
|
|
|
|
|
|
|
|
&HkSelLayerAndAddThroughVia,
|
|
|
|
&HkSelLayerAndAddBlindBuriedVia,
|
|
|
|
|
|
|
|
&HkDuplicateItem,
|
|
|
|
&HkDuplicateItemAndIncrement,
|
|
|
|
&HkCreateArray,
|
|
|
|
&HkLock_Unlock_Footprint,
|
|
|
|
|
|
|
|
&HkEditBoardItem,
|
2015-03-14 07:43:36 +00:00
|
|
|
&HkEditWithModedit,
|
2018-05-13 20:11:11 +00:00
|
|
|
|
|
|
|
// Active Layer
|
|
|
|
&HkSwitch2ComponentLayer,
|
|
|
|
&HkSwitch2CopperLayer,
|
|
|
|
&HkSwitch2InnerLayer1,
|
|
|
|
&HkSwitch2InnerLayer2,
|
|
|
|
&HkSwitch2InnerLayer3,
|
|
|
|
&HkSwitch2InnerLayer4,
|
|
|
|
&HkSwitch2InnerLayer5,
|
|
|
|
&HkSwitch2InnerLayer6,
|
|
|
|
&HkSwitch2NextCopperLayer,
|
|
|
|
&HkSwitch2PreviousCopperLayer,
|
|
|
|
|
|
|
|
// Grids
|
|
|
|
&HkSwitchGridToFastGrid1,
|
|
|
|
&HkSwitchGridToFastGrid2,
|
|
|
|
&HkSwitchGridToNext,
|
|
|
|
&HkSwitchGridToPrevious,
|
|
|
|
|
|
|
|
// Display
|
2012-02-19 17:33:06 +00:00
|
|
|
&HkSwitchHighContrastMode,
|
2018-05-13 20:11:11 +00:00
|
|
|
&HkCanvasCairo,
|
|
|
|
&HkCanvasOpenGL,
|
2009-12-03 19:11:34 +00:00
|
|
|
NULL
|
2009-12-02 09:59:49 +00:00
|
|
|
};
|
2007-08-20 10:55:09 +00:00
|
|
|
|
2007-08-30 08:15:05 +00:00
|
|
|
// List of hotkey descriptors for the module editor
|
2011-09-29 16:49:40 +00:00
|
|
|
EDA_HOTKEY* module_edit_Hotkey_List[] = {
|
2018-05-14 03:22:11 +00:00
|
|
|
// Add Items
|
|
|
|
&HkAddLine,
|
|
|
|
&HkAddCircle,
|
|
|
|
&HkAddArc,
|
|
|
|
&HkAddPolygon,
|
|
|
|
&HkAddText,
|
|
|
|
&HkAddAnchor,
|
|
|
|
|
|
|
|
// Delete/Move
|
|
|
|
&HkDelete,
|
|
|
|
&HkMoveItem,
|
|
|
|
&HkMoveItemExact,
|
|
|
|
&HkRotateItem,
|
2018-06-19 04:13:00 +00:00
|
|
|
&HkSwitchTrackPosture,
|
2018-05-14 03:22:11 +00:00
|
|
|
|
|
|
|
// Edit/Duplicate
|
|
|
|
&HkEditBoardItem,
|
|
|
|
&HkDuplicateItem,
|
|
|
|
&HkDuplicateItemAndIncrement,
|
|
|
|
&HkCreateArray,
|
|
|
|
|
2018-08-26 17:56:29 +00:00
|
|
|
// Grids
|
|
|
|
&HkSwitchGridToFastGrid1,
|
|
|
|
&HkSwitchGridToFastGrid2,
|
|
|
|
&HkSwitchGridToNext,
|
|
|
|
&HkSwitchGridToPrevious,
|
|
|
|
|
2018-05-14 03:22:11 +00:00
|
|
|
// Display
|
|
|
|
&HkSwitchHighContrastMode,
|
|
|
|
&HkCanvasCairo,
|
|
|
|
&HkCanvasOpenGL,
|
2010-08-29 17:55:53 +00:00
|
|
|
NULL
|
|
|
|
};
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2014-10-15 11:40:38 +00:00
|
|
|
// List of hotkey descriptors for the module viewer
|
|
|
|
// Currently empty
|
|
|
|
EDA_HOTKEY* module_viewer_Hotkey_List[] = {
|
|
|
|
NULL
|
|
|
|
};
|
|
|
|
|
2015-04-16 15:26:51 +00:00
|
|
|
// Keyword Identifiers (tags) in key code configuration file (section names)
|
|
|
|
// (.m_SectionTag member of a EDA_HOTKEY_CONFIG)
|
|
|
|
static wxString boardEditorSectionTag( wxT( "[pcbnew]" ) );
|
|
|
|
static wxString moduleEditSectionTag( wxT( "[footprinteditor]" ) );
|
|
|
|
|
|
|
|
// Titles for hotkey editor and hotkey display
|
|
|
|
static wxString commonSectionTitle( _HKI( "Common" ) );
|
|
|
|
static wxString boardEditorSectionTitle( _HKI( "Board Editor" ) );
|
|
|
|
static wxString moduleEditSectionTitle( _HKI( "Footprint Editor" ) );
|
|
|
|
|
2011-09-30 18:15:37 +00:00
|
|
|
// list of sections and corresponding hotkey list for Pcbnew
|
2015-04-16 15:26:51 +00:00
|
|
|
// (used to create an hotkey config file, and edit hotkeys )
|
2018-02-14 22:07:59 +00:00
|
|
|
struct EDA_HOTKEY_CONFIG g_Pcbnew_Editor_Hotkeys_Descr[] = {
|
2015-04-16 15:26:51 +00:00
|
|
|
{ &g_CommonSectionTag, common_Hotkey_List, &commonSectionTitle },
|
|
|
|
{ &boardEditorSectionTag, board_edit_Hotkey_List, &boardEditorSectionTitle },
|
2015-11-04 08:48:34 +00:00
|
|
|
{ &moduleEditSectionTag, module_edit_Hotkey_List, &moduleEditSectionTitle },
|
2014-10-16 01:17:46 +00:00
|
|
|
{ NULL, NULL, NULL }
|
2011-09-29 16:49:40 +00:00
|
|
|
};
|
2007-09-06 11:52:26 +00:00
|
|
|
|
2010-11-24 15:10:33 +00:00
|
|
|
// list of sections and corresponding hotkey list for the board editor
|
|
|
|
// (used to list current hotkeys in the board editor)
|
2018-02-14 22:07:59 +00:00
|
|
|
struct EDA_HOTKEY_CONFIG g_Board_Editor_Hotkeys_Descr[] = {
|
2015-04-16 15:26:51 +00:00
|
|
|
{ &g_CommonSectionTag, common_Hotkey_List, &commonSectionTitle },
|
|
|
|
{ &boardEditorSectionTag, board_edit_Hotkey_List, &boardEditorSectionTitle },
|
2011-09-29 16:49:40 +00:00
|
|
|
{ NULL, NULL, NULL }
|
|
|
|
};
|
2007-09-06 11:52:26 +00:00
|
|
|
|
2010-11-24 15:10:33 +00:00
|
|
|
// list of sections and corresponding hotkey list for the footprint editor
|
|
|
|
// (used to list current hotkeys in the module editor)
|
2018-02-14 22:07:59 +00:00
|
|
|
struct EDA_HOTKEY_CONFIG g_Module_Editor_Hotkeys_Descr[] = {
|
2015-04-16 15:26:51 +00:00
|
|
|
{ &g_CommonSectionTag, common_Hotkey_List, &commonSectionTitle },
|
2015-11-04 08:48:34 +00:00
|
|
|
{ &moduleEditSectionTag, module_edit_Hotkey_List, &moduleEditSectionTitle },
|
2014-10-16 01:17:46 +00:00
|
|
|
{ NULL, NULL, NULL }
|
2011-09-29 16:49:40 +00:00
|
|
|
};
|
2012-02-09 20:33:38 +00:00
|
|
|
|
|
|
|
// list of sections and corresponding hotkey list for the footprint viewer
|
|
|
|
// (used to list current hotkeys in the module viewer)
|
2018-02-14 22:07:59 +00:00
|
|
|
struct EDA_HOTKEY_CONFIG g_Module_Viewer_Hotkeys_Descr[] = {
|
2015-04-16 15:26:51 +00:00
|
|
|
{ &g_CommonSectionTag, common_basic_Hotkey_List, &commonSectionTitle },
|
2014-10-16 01:17:46 +00:00
|
|
|
{ NULL, NULL, NULL }
|
2012-02-09 20:33:38 +00:00
|
|
|
};
|
|
|
|
|
2014-10-15 11:40:38 +00:00
|
|
|
|
2015-05-05 18:39:42 +00:00
|
|
|
EDA_HOTKEY* FOOTPRINT_VIEWER_FRAME::GetHotKeyDescription( int aCommand ) const
|
|
|
|
{
|
|
|
|
EDA_HOTKEY* HK_Descr = GetDescriptorFromCommand( aCommand, common_Hotkey_List );
|
|
|
|
|
|
|
|
if( HK_Descr == NULL )
|
|
|
|
HK_Descr = GetDescriptorFromCommand( aCommand, module_viewer_Hotkey_List );
|
|
|
|
|
|
|
|
return HK_Descr;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2019-05-28 00:00:33 +00:00
|
|
|
EDA_HOTKEY* FOOTPRINT_WIZARD_FRAME::GetHotKeyDescription( int aCommand ) const
|
2014-10-15 11:40:38 +00:00
|
|
|
{
|
2019-05-28 00:00:33 +00:00
|
|
|
EDA_HOTKEY* HK_Descr = GetDescriptorFromCommand( aCommand, common_Hotkey_List );
|
2018-08-11 06:25:09 +00:00
|
|
|
|
2019-05-28 00:00:33 +00:00
|
|
|
return HK_Descr;
|
2018-08-11 06:25:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2019-05-28 00:00:33 +00:00
|
|
|
EDA_HOTKEY* PCB_EDIT_FRAME::GetHotKeyDescription( int aCommand ) const
|
2018-08-11 06:25:09 +00:00
|
|
|
{
|
|
|
|
EDA_HOTKEY* HK_Descr = GetDescriptorFromCommand( aCommand, common_Hotkey_List );
|
|
|
|
|
2019-05-28 00:00:33 +00:00
|
|
|
if( HK_Descr == NULL )
|
|
|
|
HK_Descr = GetDescriptorFromCommand( aCommand, board_edit_Hotkey_List );
|
|
|
|
|
2018-08-11 06:25:09 +00:00
|
|
|
return HK_Descr;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2019-05-28 00:00:33 +00:00
|
|
|
EDA_HOTKEY* FOOTPRINT_EDIT_FRAME::GetHotKeyDescription( int aCommand ) const
|
2018-08-11 06:25:09 +00:00
|
|
|
{
|
2019-05-28 00:00:33 +00:00
|
|
|
EDA_HOTKEY* HK_Descr = GetDescriptorFromCommand( aCommand, common_Hotkey_List );
|
2018-08-11 06:25:09 +00:00
|
|
|
|
|
|
|
if( HK_Descr == NULL )
|
2019-05-28 00:00:33 +00:00
|
|
|
HK_Descr = GetDescriptorFromCommand( aCommand, module_edit_Hotkey_List );
|
|
|
|
|
|
|
|
return HK_Descr;
|
2014-10-15 11:40:38 +00:00
|
|
|
}
|