pcbnew: Configurable hotkeys for PNS
- routing options - custom track/via size - differential pair dimensions - increase/decrease via size
This commit is contained in:
parent
4e908da057
commit
805bfb048b
|
@ -241,6 +241,16 @@ static EDA_HOTKEY HkSelectConnection( _HKI( "Select Trivial Connection" ), HK_SE
|
||||||
|
|
||||||
static EDA_HOTKEY HkSelectCopper( _HKI( "Select Copper Connection" ), HK_SEL_COPPER_CONNECTION, 'I' );
|
static EDA_HOTKEY HkSelectCopper( _HKI( "Select Copper Connection" ), HK_SEL_COPPER_CONNECTION, 'I' );
|
||||||
|
|
||||||
|
static EDA_HOTKEY HkRoutingOptions( _HKI( "Routing Options" ), HK_ROUTING_OPTIONS, 'E' );
|
||||||
|
|
||||||
|
static EDA_HOTKEY HkCustomTrackWidth( _HKI( "Custom Track/Via Size" ), HK_CUSTOM_TRACK_WIDTH, 'Q' );
|
||||||
|
|
||||||
|
static EDA_HOTKEY HkDpDimension( _HKI( "Differential Pair Dimensions" ), HK_DP_DIMENSIONS, 'P' );
|
||||||
|
|
||||||
|
static EDA_HOTKEY HkViaSizeInc( _HKI( "Increase Via Size" ), HK_VIA_SIZE_INC, '\'' );
|
||||||
|
|
||||||
|
static EDA_HOTKEY HkViaSizeDec( _HKI( "Decrease Via Size" ), HK_VIA_SIZE_DEC, '\\' );
|
||||||
|
|
||||||
// List of common hotkey descriptors
|
// List of common hotkey descriptors
|
||||||
EDA_HOTKEY* common_Hotkey_List[] =
|
EDA_HOTKEY* common_Hotkey_List[] =
|
||||||
{
|
{
|
||||||
|
@ -294,6 +304,8 @@ EDA_HOTKEY* board_edit_Hotkey_List[] =
|
||||||
&HkCanvasDefault, &HkCanvasCairo, &HkCanvasOpenGL,
|
&HkCanvasDefault, &HkCanvasCairo, &HkCanvasOpenGL,
|
||||||
&HkZoneFillOrRefill, &HkZoneRemoveFilled,
|
&HkZoneFillOrRefill, &HkZoneRemoveFilled,
|
||||||
&HkSelectConnection, &HkSelectCopper,
|
&HkSelectConnection, &HkSelectCopper,
|
||||||
|
&HkRoutingOptions, &HkCustomTrackWidth, &HkDpDimension,
|
||||||
|
&HkViaSizeInc, &HkViaSizeDec,
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -105,7 +105,12 @@ enum hotkey_id_commnand {
|
||||||
HK_INC_LAYER_ALHPA,
|
HK_INC_LAYER_ALHPA,
|
||||||
HK_DEC_LAYER_ALHPA,
|
HK_DEC_LAYER_ALHPA,
|
||||||
HK_SEL_TRIVIAL_CONNECTION,
|
HK_SEL_TRIVIAL_CONNECTION,
|
||||||
HK_SEL_COPPER_CONNECTION
|
HK_SEL_COPPER_CONNECTION,
|
||||||
|
HK_ROUTING_OPTIONS,
|
||||||
|
HK_CUSTOM_TRACK_WIDTH,
|
||||||
|
HK_DP_DIMENSIONS,
|
||||||
|
HK_VIA_SIZE_INC,
|
||||||
|
HK_VIA_SIZE_DEC
|
||||||
};
|
};
|
||||||
|
|
||||||
// Full list of hotkey descriptors for board editor and footprint editor
|
// Full list of hotkey descriptors for board editor and footprint editor
|
||||||
|
|
|
@ -39,6 +39,7 @@ using namespace std::placeholders;
|
||||||
#include <dialogs/dialog_track_via_size.h>
|
#include <dialogs/dialog_track_via_size.h>
|
||||||
#include <base_units.h>
|
#include <base_units.h>
|
||||||
#include <bitmaps.h>
|
#include <bitmaps.h>
|
||||||
|
#include <hotkeys.h>
|
||||||
|
|
||||||
#include <tool/context_menu.h>
|
#include <tool/context_menu.h>
|
||||||
#include <tools/pcb_actions.h>
|
#include <tools/pcb_actions.h>
|
||||||
|
@ -61,7 +62,7 @@ using namespace KIGFX;
|
||||||
namespace PNS {
|
namespace PNS {
|
||||||
|
|
||||||
TOOL_ACTION TOOL_BASE::ACT_RouterOptions( "pcbnew.InteractiveRouter.RouterOptions",
|
TOOL_ACTION TOOL_BASE::ACT_RouterOptions( "pcbnew.InteractiveRouter.RouterOptions",
|
||||||
AS_CONTEXT, 'E',
|
AS_CONTEXT, TOOL_ACTION::LegacyHotKey( HK_ROUTING_OPTIONS ),
|
||||||
_( "Routing Options..." ),
|
_( "Routing Options..." ),
|
||||||
_( "Shows a dialog containing router options." ), tools_xpm );
|
_( "Shows a dialog containing router options." ), tools_xpm );
|
||||||
|
|
||||||
|
|
|
@ -163,7 +163,7 @@ static const TOOL_ACTION ACT_SelLayerAndPlaceBlindVia(
|
||||||
(void*) ( VIA_ACTION_FLAGS::BLIND_VIA | VIA_ACTION_FLAGS::SELECT_LAYER ) );
|
(void*) ( VIA_ACTION_FLAGS::BLIND_VIA | VIA_ACTION_FLAGS::SELECT_LAYER ) );
|
||||||
|
|
||||||
static const TOOL_ACTION ACT_CustomTrackWidth( "pcbnew.InteractiveRouter.CustomTrackViaSize",
|
static const TOOL_ACTION ACT_CustomTrackWidth( "pcbnew.InteractiveRouter.CustomTrackViaSize",
|
||||||
AS_CONTEXT, 'Q',
|
AS_CONTEXT, TOOL_ACTION::LegacyHotKey( HK_CUSTOM_TRACK_WIDTH ),
|
||||||
_( "Custom Track/Via Size" ),
|
_( "Custom Track/Via Size" ),
|
||||||
_( "Shows a dialog for changing the track width and via size." ),
|
_( "Shows a dialog for changing the track width and via size." ),
|
||||||
width_track_xpm );
|
width_track_xpm );
|
||||||
|
@ -175,7 +175,7 @@ static const TOOL_ACTION ACT_SwitchPosture( "pcbnew.InteractiveRouter.SwitchPost
|
||||||
change_entry_orient_xpm );
|
change_entry_orient_xpm );
|
||||||
|
|
||||||
static const TOOL_ACTION ACT_SetDpDimensions( "pcbnew.InteractiveRouter.SetDpDimensions",
|
static const TOOL_ACTION ACT_SetDpDimensions( "pcbnew.InteractiveRouter.SetDpDimensions",
|
||||||
AS_CONTEXT, 'P',
|
AS_CONTEXT, TOOL_ACTION::LegacyHotKey( HK_DP_DIMENSIONS ),
|
||||||
_( "Differential Pair Dimensions..." ),
|
_( "Differential Pair Dimensions..." ),
|
||||||
_( "Sets the width and gap of the currently routed differential pair." ),
|
_( "Sets the width and gap of the currently routed differential pair." ),
|
||||||
ps_diff_pair_tune_length_xpm );
|
ps_diff_pair_tune_length_xpm );
|
||||||
|
|
|
@ -70,11 +70,11 @@ TOOL_ACTION PCB_ACTIONS::trackWidthDec( "pcbnew.EditorControl.trackWidthDec",
|
||||||
"", "" );
|
"", "" );
|
||||||
|
|
||||||
TOOL_ACTION PCB_ACTIONS::viaSizeInc( "pcbnew.EditorControl.viaSizeInc",
|
TOOL_ACTION PCB_ACTIONS::viaSizeInc( "pcbnew.EditorControl.viaSizeInc",
|
||||||
AS_GLOBAL, '\'',
|
AS_GLOBAL, TOOL_ACTION::LegacyHotKey( HK_VIA_SIZE_INC ),
|
||||||
"", "" );
|
"", "" );
|
||||||
|
|
||||||
TOOL_ACTION PCB_ACTIONS::viaSizeDec( "pcbnew.EditorControl.viaSizeDec",
|
TOOL_ACTION PCB_ACTIONS::viaSizeDec( "pcbnew.EditorControl.viaSizeDec",
|
||||||
AS_GLOBAL, '\\',
|
AS_GLOBAL, TOOL_ACTION::LegacyHotKey( HK_VIA_SIZE_DEC ),
|
||||||
"", "" );
|
"", "" );
|
||||||
|
|
||||||
TOOL_ACTION PCB_ACTIONS::trackViaSizeChanged( "pcbnew.EditorControl.trackViaSizeChanged",
|
TOOL_ACTION PCB_ACTIONS::trackViaSizeChanged( "pcbnew.EditorControl.trackViaSizeChanged",
|
||||||
|
|
Loading…
Reference in New Issue