KiCad PCB EDA Suite
pcbnew/hotkeys.cpp
Go to the documentation of this file.
1 /*
2  * This program source code file is part of KiCad, a free EDA CAD application.
3  *
4  * Copyright (C) 2007-2017 Jean-Pierre Charras, jp.charras at wanadoo.fr
5  * Copyright (C) 1992-2017 KiCad Developers, see AUTHORS.txt for contributors.
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 2
10  * of the License, or (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, you may find one here:
19  * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
20  * or you may search the http://www.gnu.org website for the version 2 license,
21  * or you may write to the Free Software Foundation, Inc.,
22  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
23  */
24 
29 #include <fctsys.h>
30 #include <pcbnew.h>
31 #include <pcb_edit_frame.h>
32 #include <footprint_viewer_frame.h>
33 #include <footprint_wizard_frame.h>
34 #include <pcbnew_id.h>
35 
36 #include <hotkeys.h>
37 
38 // Remark: the hotkey message info is used as keyword in hotkey config files and
39 // as comments in help windows, therefore translated only when displayed
40 // they are marked _HKI to be extracted by translation tools
41 // See hotkeys_basic.h for more info
42 
43 
44 /* How to add a new hotkey:
45  * add a new id in the enum hotkey_id_commnand like MY_NEW_ID_FUNCTION.
46  * add a new EDA_HOTKEY entry like:
47  * static EDA_HOTKEY HkMyNewEntry(_HKI("Command Label"), MY_NEW_ID_FUNCTION, default key value);
48  * "Command Label" is the name used in hotkey list display, and the identifier in the
49  * hotkey list file MY_NEW_ID_FUNCTION is an equivalent id function used in the switch
50  * in OnHotKey() function.
51  * default key value is the default hotkey for this command. Can be overridden by the user
52  * hotkey list file
53  * add the HkMyNewEntry pointer in the s_board_edit_Hotkey_List list ( or/and the
54  * s_module_edit_Hotkey_List list)
55  * Add the new code in the switch in OnHotKey() function.
56  * Note: when the variable itemCurrentlyEdited is true, an item is currently edited.
57  * This can be useful if the new function cannot be executed while an item is currently
58  * being edited ( For example, one cannot start a new wire when a component is moving.)
59  *
60  * Note: If a hotkey is a special key, be sure the corresponding wxWidget keycode (WXK_XXXX)
61  * is handled in the hotkey_name_descr s_Hotkey_Name_List list (see hotkeys_basic.cpp)
62  * and see this list for some ascii keys (space ...)
63  */
64 
65 // Hotkey list:
66 
67 // mouse click command:
68 static EDA_HOTKEY HkMouseLeftClick( _HKI( "Mouse Left Click" ),
69  HK_LEFT_CLICK, WXK_RETURN, 0 );
70 static EDA_HOTKEY HkMouseLeftDClick( _HKI( "Mouse Left Double Click" ),
71  HK_LEFT_DCLICK, WXK_END, 0 );
72 
73 static EDA_HOTKEY HkSwitch2CopperLayer( _HKI( "Switch to Copper (B.Cu) layer" ),
74  HK_SWITCH_LAYER_TO_COPPER, WXK_PAGEDOWN );
75 
76 static EDA_HOTKEY HkSwitch2ComponentLayer( _HKI( "Switch to Component (F.Cu) layer" ),
77  HK_SWITCH_LAYER_TO_COMPONENT, WXK_PAGEUP );
78 
79 static EDA_HOTKEY HkSwitch2InnerLayer1( _HKI( "Switch to Inner layer 1" ),
80  HK_SWITCH_LAYER_TO_INNER1, WXK_F5 );
81 static EDA_HOTKEY HkSwitch2InnerLayer2( _HKI( "Switch to Inner layer 2" ),
82  HK_SWITCH_LAYER_TO_INNER2, WXK_F6 );
83 static EDA_HOTKEY HkSwitch2InnerLayer3( _HKI( "Switch to Inner layer 3" ),
84  HK_SWITCH_LAYER_TO_INNER3, WXK_F7 );
85 static EDA_HOTKEY HkSwitch2InnerLayer4( _HKI( "Switch to Inner layer 4" ),
86  HK_SWITCH_LAYER_TO_INNER4, WXK_F8 );
87 static EDA_HOTKEY HkSwitch2InnerLayer5( _HKI( "Switch to Inner layer 5" ),
89 static EDA_HOTKEY HkSwitch2InnerLayer6( _HKI( "Switch to Inner layer 6" ),
91 
92 static EDA_HOTKEY HkSwitch2NextCopperLayer( _HKI( "Switch to Next Layer" ),
94 static EDA_HOTKEY HkSwitch2PreviousCopperLayer( _HKI( "Switch to Previous Layer" ),
96 
97 static EDA_HOTKEY HkFindItem( _HKI( "Find Item" ), HK_FIND_ITEM, 'F' + GR_KB_CTRL );
98 static EDA_HOTKEY HkBackspace( _HKI( "Delete Track Segment" ), HK_BACK_SPACE, WXK_BACK );
99 static EDA_HOTKEY HkAddNewTrack( _HKI( "Add New Track" ), HK_ADD_NEW_TRACK, 'X' );
100 
101 static EDA_HOTKEY HkRouteDiffPair( _HKI( "Route Differential Pair (Modern Toolset only)" ),
102  HK_ROUTE_DIFF_PAIR, '6' );
103 static EDA_HOTKEY HkRouteTuneSingle( _HKI( "Tune Single Track (Modern Toolset only)" ),
104  HK_ROUTE_TUNE_SINGLE, '7' );
105 static EDA_HOTKEY HkRouteTuneDiffPair( _HKI( "Tune Differential Pair Length (Modern Toolset only)" ),
107 static EDA_HOTKEY HkRouteTuneSkew( _HKI( "Tune Differential Pair Skew (Modern Toolset only)" ),
108  HK_ROUTE_TUNE_SKEW, '9' );
109 static EDA_HOTKEY HkRouteTuneSettings( _HKI( "Length Tuning Settings (Modern Toolset only)" ),
111 
112 static EDA_HOTKEY HkRouteTuneIncreaseSpacing( _HKI( "Increase meander spacing by one step." ),
114 static EDA_HOTKEY HkRouteTuneDecreaseSpacing( _HKI( "Decrease meander spacing by one step." ),
116 static EDA_HOTKEY HkRouteTuneIncreaseAmp( _HKI( "Increase meander amplitude by one step." ),
118 static EDA_HOTKEY HkRouteTuneDecreaseAmp( _HKI( "Decrease meander amplitude by one step." ),
120 
121 static EDA_HOTKEY HkAddThroughVia( _HKI( "Add Through Via" ), HK_ADD_THROUGH_VIA, 'V' );
122 static EDA_HOTKEY HkSelLayerAndAddThroughVia( _HKI( "Select Layer and Add Through Via" ),
124 static EDA_HOTKEY HkAddMicroVia( _HKI( "Add MicroVia" ), HK_ADD_MICROVIA, 'V' + GR_KB_CTRL );
125 static EDA_HOTKEY HkAddBlindBuriedVia( _HKI( "Add Blind/Buried Via" ), HK_ADD_BLIND_BURIED_VIA, 'V' + GR_KB_ALT + GR_KB_SHIFT );
126 static EDA_HOTKEY HkSelLayerAndAddBlindBuriedVia( _HKI( "Select Layer and Add Blind/Buried Via" ),
128 static EDA_HOTKEY HkSwitchTrackPosture( _HKI( "Switch Track Posture" ), HK_SWITCH_TRACK_POSTURE, '/' );
129 static EDA_HOTKEY HkDragTrackKeepSlope( _HKI( "Drag Track Keep Slope" ), HK_DRAG_TRACK_KEEP_SLOPE, 'D' );
130 static EDA_HOTKEY HkPlaceItem( _HKI( "Place Item" ), HK_PLACE_ITEM, 'P' );
131 static EDA_HOTKEY HkEditBoardItem( _HKI( "Edit Item" ), HK_EDIT_ITEM, 'E' );
132 static EDA_HOTKEY HkEditWithModedit( _HKI( "Edit with Footprint Editor" ), HK_EDIT_MODULE_WITH_MODEDIT, 'E' + GR_KB_CTRL );
133 static EDA_HOTKEY HkFlipItem( _HKI( "Flip Item" ), HK_FLIP_ITEM, 'F' );
134 static EDA_HOTKEY HkRotateItem( _HKI( "Rotate Item" ), HK_ROTATE_ITEM, 'R' );
135 static EDA_HOTKEY HkRotateItemClockwise( _HKI( "Rotate Item Clockwise (Modern Toolset only)" ),
137 static EDA_HOTKEY HkMoveItem( _HKI( "Move Item" ), HK_MOVE_ITEM, 'M' );
138 static EDA_HOTKEY HkMoveItemExact( _HKI( "Move Item Exactly" ), HK_MOVE_ITEM_EXACT, 'M' + GR_KB_CTRL );
139 static EDA_HOTKEY HkPositionItemRelative( _HKI( "Position Item Relative" ), HK_POSITION_RELATIVE, 'R' + GR_KB_CTRL );
140 static EDA_HOTKEY HkDuplicateItem( _HKI( "Duplicate Item" ), HK_DUPLICATE_ITEM, 'D' + GR_KB_CTRL );
141 static EDA_HOTKEY HkDuplicateItemAndIncrement( _HKI( "Duplicate Item and Increment" ),
143 static EDA_HOTKEY HkCreateArray( _HKI( "Create Array" ), HK_CREATE_ARRAY, 'T' + GR_KB_CTRL );
144 static EDA_HOTKEY HkCopyItem( _HKI( "Copy Item" ), HK_COPY_ITEM, 'C' );
145 static EDA_HOTKEY HkDragFootprint( _HKI( "Drag Item" ), HK_DRAG_ITEM, 'G' );
146 static EDA_HOTKEY HkGetAndMoveFootprint( _HKI( "Get and Move Footprint" ), HK_GET_AND_MOVE_FOOTPRINT, 'T' );
147 static EDA_HOTKEY HkLock_Unlock_Footprint( _HKI( "Lock/Unlock Footprint" ), HK_LOCK_UNLOCK_FOOTPRINT, 'L' );
148 static EDA_HOTKEY HkDelete( _HKI( "Delete Track or Footprint" ), HK_DELETE, WXK_DELETE );
149 static EDA_HOTKEY HkResetLocalCoord( _HKI( "Reset Local Coordinates" ), HK_RESET_LOCAL_COORD, ' ' );
150 static EDA_HOTKEY HkSwitchHighContrastMode( _HKI( "Toggle High Contrast Mode" ), HK_SWITCH_HIGHCONTRAST_MODE,'H');
151 
152 static EDA_HOTKEY HkAddLine( _HKI( "Draw Line" ), HK_ADD_LINE, 'L' + GR_KB_SHIFTCTRL );
153 static EDA_HOTKEY HkAddPolygon( _HKI( "Draw Graphic Polygon" ), HK_ADD_POLYGON, 'P' + GR_KB_SHIFTCTRL );
154 static EDA_HOTKEY HkAddCircle( _HKI( "Draw Circle" ), HK_ADD_CIRCLE, 'C' + GR_KB_SHIFTCTRL );
155 static EDA_HOTKEY HkAddArc( _HKI( "Draw Arc" ), HK_ADD_ARC, 'A' + GR_KB_SHIFTCTRL );
156 static EDA_HOTKEY HkAddText( _HKI( "Add Text" ), HK_ADD_TEXT, 'T' + GR_KB_SHIFTCTRL );
157 static EDA_HOTKEY HkAddDimension( _HKI( "Add Dimension" ), HK_ADD_DIMENSION, 'H' + GR_KB_SHIFTCTRL );
158 static EDA_HOTKEY HkAddFilledZone( _HKI( "Add Filled Zone" ), HK_ADD_ZONE, 'Z' + GR_KB_SHIFTCTRL );
159 static EDA_HOTKEY HkAddFreeVia( _HKI( "Add Vias" ), HK_ADD_FREE_VIA, 'V' + GR_KB_SHIFTCTRL );
160 static EDA_HOTKEY HkAddKeepout( _HKI( "Add Keepout Area" ), HK_ADD_KEEPOUT, 'K' + GR_KB_SHIFTCTRL );
161 static EDA_HOTKEY HkAddZoneCutout( _HKI( "Add a Zone Cutout" ), HK_ADD_CUTOUT, 'C' + GR_KB_SHIFT );
162 static EDA_HOTKEY HkAddSimilarZone( _HKI( "Add a Similar Zone" ), HK_ADD_SIMILAR_ZONE, '.' + GR_KB_SHIFTCTRL );
163 static EDA_HOTKEY HkAddDXF( _HKI( "Place DXF" ), HK_ADD_DXF, 'F' + GR_KB_SHIFTCTRL );
164 static EDA_HOTKEY HkAddAnchor( _HKI( "Place the Footprint Anchor" ), HK_ADD_ANCHOR, 'N' + GR_KB_SHIFTCTRL );
165 
166 static EDA_HOTKEY HkIncreaseLineWidth( _HKI( "Increase Line Width" ), HK_INC_LINE_WIDTH, '+' + GR_KB_CTRL );
167 static EDA_HOTKEY HkDecreaseLineWidth( _HKI( "Decrease Line Width" ), HK_DEC_LINE_WIDTH, '-' + GR_KB_CTRL );
168 
169 
170 static EDA_HOTKEY HkSetGridOrigin( _HKI( "Set Grid Origin" ), HK_SET_GRID_ORIGIN, 'S' );
171 static EDA_HOTKEY HkResetGridOrigin( _HKI( "Reset Grid Origin" ), HK_RESET_GRID_ORIGIN, 'Z' );
172 
173 static EDA_HOTKEY HkCanvasDefault( _HKI( "Switch to Legacy Toolset (not all features will be available" ),
175 #ifdef __WXMAC__
176  GR_KB_ALT +
177 #endif
178  WXK_F9 );
179 static EDA_HOTKEY HkCanvasOpenGL( _HKI( "Switch to Modern Toolset with hardware-accelerated graphics (recommended)" ),
181 #ifdef __WXMAC__
182  GR_KB_ALT +
183 #endif
184  WXK_F11 );
185 static EDA_HOTKEY HkCanvasCairo( _HKI( "Switch to Modern Toolset with software graphics (fall-back)" ),
187 #ifdef __WXMAC__
188  GR_KB_ALT +
189 #endif
190  WXK_F12 );
191 
192 static EDA_HOTKEY HkZoneFillOrRefill( _HKI( "Fill or Refill All Zones" ),
193  HK_ZONE_FILL_OR_REFILL, 'B' );
194 static EDA_HOTKEY HkZoneRemoveFilled( _HKI( "Remove Filled Areas in All Zones" ),
196 /* Fit on Screen */
197 #if !defined( __WXMAC__ )
198 static EDA_HOTKEY HkZoomAuto( _HKI( "Zoom Auto" ), HK_ZOOM_AUTO, WXK_HOME );
199 #else
200 static EDA_HOTKEY HkZoomAuto( _HKI( "Zoom Auto" ), HK_ZOOM_AUTO, GR_KB_CTRL + '0' );
201 #endif
202 
203 static EDA_HOTKEY HkZoomCenter( _HKI( "Zoom Center" ), HK_ZOOM_CENTER, WXK_F4 );
204 
205 /* Refresh Screen */
206 #if !defined( __WXMAC__ )
207 static EDA_HOTKEY HkZoomRedraw( _HKI( "Zoom Redraw" ), HK_ZOOM_REDRAW, WXK_F3 );
208 #else
209 static EDA_HOTKEY HkZoomRedraw( _HKI( "Zoom Redraw" ), HK_ZOOM_REDRAW, GR_KB_CTRL + 'R' );
210 #endif
211 
212 /* Zoom In */
213 #if !defined( __WXMAC__ )
214 static EDA_HOTKEY HkZoomIn( _HKI( "Zoom In" ), HK_ZOOM_IN, WXK_F1 );
215 #else
216 static EDA_HOTKEY HkZoomIn( _HKI( "Zoom In" ), HK_ZOOM_IN, GR_KB_CTRL + '+' );
217 #endif
218 
219 /* Zoom Out */
220 #if !defined( __WXMAC__ )
221 static EDA_HOTKEY HkZoomOut( _HKI( "Zoom Out" ), HK_ZOOM_OUT, WXK_F2 );
222 #else
223 static EDA_HOTKEY HkZoomOut( _HKI( "Zoom Out" ), HK_ZOOM_OUT, GR_KB_CTRL + '-' );
224 #endif
225 
226 static EDA_HOTKEY HkZoomSelection( _HKI( "Zoom to Selection" ), HK_ZOOM_SELECTION,
227  GR_KB_CTRL + WXK_F5, ID_ZOOM_SELECTION );
228 
229 static EDA_HOTKEY Hk3DViewer( _HKI( "3D Viewer" ), HK_3D_VIEWER, GR_KB_ALT + '3' );
230 
231 static EDA_HOTKEY HkHelp( _HKI( "Help (this window)" ), HK_HELP, GR_KB_CTRL + WXK_F1 );
232 
233 static EDA_HOTKEY HkSwitchTrackWidthToNext( _HKI( "Switch Track Width To Next" ),
235 
236 static EDA_HOTKEY HkSwitchTrackWidthToPrevious( _HKI( "Switch Track Width To Previous" ),
238  + GR_KB_CTRL );
239 
240 static EDA_HOTKEY HkSwitchGridToFastGrid1( _HKI( "Switch Grid To Fast Grid1" ),
242 
243 static EDA_HOTKEY HkSwitchGridToFastGrid2( _HKI( "Switch Grid To Fast Grid2" ),
245 
246 static EDA_HOTKEY HkSwitchGridToNext( _HKI( "Switch Grid To Next" ),
247  HK_SWITCH_GRID_TO_NEXT, 'N' );
248 
249 static EDA_HOTKEY HkSwitchGridToPrevious( _HKI( "Switch Grid To Previous" ),
251 
252 static EDA_HOTKEY HkSwitchUnits( _HKI( "Switch Units" ), HK_SWITCH_UNITS, 'U' + GR_KB_CTRL );
253 
254 static EDA_HOTKEY HkTrackDisplayMode( _HKI( "Track Display Mode" ),
256 
257 static EDA_HOTKEY HkAddModule( _HKI( "Add Footprint" ), HK_ADD_MODULE, 'O' );
258 
259 // These hotkeys work only in GAL canvas, because the legacy canvas using wxDC does not know
260 // the transparency (alpha channel)
261 static EDA_HOTKEY HkIncLayerAlpha( _HKI( "Increment Layer Transparency (Modern Toolset only)" ),
262  HK_INC_LAYER_ALPHA, '}' );
263 
264 static EDA_HOTKEY HkDecLayerAlpha( _HKI( "Decrement Layer Transparency (Modern Toolset only)" ),
265  HK_DEC_LAYER_ALPHA, '{' );
266 
267 // These two are currently unused, and are intentionally not added to a list below.
268 static EDA_HOTKEY HkIncHighContrast( _HKI( "Increment High Contrast" ), HK_HIGHCONTRAST_INC, '>' );
269 static EDA_HOTKEY HkDecHighContrast( _HKI( "Decrement High Contrast" ), HK_HIGHCONTRAST_DEC, '<' );
270 
271 static EDA_HOTKEY HkSelectConnection( _HKI( "Select Single Track" ), HK_SEL_TRIVIAL_CONNECTION, 'U' );
272 
273 static EDA_HOTKEY HkSelectCopper( _HKI( "Select Connected Tracks" ), HK_SEL_COPPER_CONNECTION, 'I' );
274 
275 static EDA_HOTKEY HkRoutingOptions( _HKI( "Routing Options" ), HK_ROUTING_OPTIONS, ',' + GR_KB_CTRL );
276 
277 static EDA_HOTKEY HkCustomTrackWidth( _HKI( "Custom Track/Via Size" ), HK_CUSTOM_TRACK_WIDTH, 'Q' );
278 
279 static EDA_HOTKEY HkDpDimension( _HKI( "Differential Pair Dimensions" ), HK_DP_DIMENSIONS, 'R' + GR_KB_SHIFTCTRL );
280 
281 static EDA_HOTKEY HkViaSizeInc( _HKI( "Increase Via Size" ), HK_VIA_SIZE_INC, '\'' );
282 
283 static EDA_HOTKEY HkViaSizeDec( _HKI( "Decrease Via Size" ), HK_VIA_SIZE_DEC, '\\' );
284 
285 static EDA_HOTKEY HkHighlightNetSelection( _HKI( "Toggle Highlight of Selected Net (Modern Toolset only)" ),
287 
288 // Common: hotkeys_basic.h
289 static EDA_HOTKEY HkNew( _HKI( "New" ), HK_NEW, GR_KB_CTRL + 'N', (int) wxID_NEW );
290 static EDA_HOTKEY HkOpen( _HKI( "Open" ), HK_OPEN, GR_KB_CTRL + 'O', (int) wxID_OPEN );
291 static EDA_HOTKEY HkSave( _HKI( "Save" ), HK_SAVE, GR_KB_CTRL + 'S', (int) wxID_SAVE );
292 static EDA_HOTKEY HkSaveAs( _HKI( "Save As" ), HK_SAVEAS, GR_KB_SHIFT + GR_KB_CTRL + 'S', (int) wxID_SAVEAS );
293 static EDA_HOTKEY HkPrint( _HKI( "Print" ), HK_PRINT, GR_KB_CTRL + 'P', (int) wxID_PRINT );
294 
295 static EDA_HOTKEY HkUndo( _HKI( "Undo" ), HK_UNDO, GR_KB_CTRL + 'Z', (int) wxID_UNDO );
296 
297 #if !defined( __WXMAC__ )
298 static EDA_HOTKEY HkRedo( _HKI( "Redo" ), HK_REDO, GR_KB_CTRL + 'Y', (int) wxID_REDO );
299 #else
300 static EDA_HOTKEY HkRedo( _HKI( "Redo" ), HK_REDO,
301  GR_KB_SHIFT + GR_KB_CTRL + 'Z',
302  (int) wxID_REDO );
303 #endif
304 
305 static EDA_HOTKEY HkEditCut( _HKI( "Cut" ), HK_EDIT_CUT, GR_KB_CTRL + 'X', (int) wxID_CUT );
306 static EDA_HOTKEY HkEditCopy( _HKI( "Copy" ), HK_EDIT_COPY, GR_KB_CTRL + 'C', (int) wxID_COPY );
307 static EDA_HOTKEY HkEditPaste( _HKI( "Paste" ), HK_EDIT_PASTE, GR_KB_CTRL + 'V', (int) wxID_PASTE );
308 
309 static EDA_HOTKEY HkToggleCursor( _HKI( "Toggle Cursor Display (Modern Toolset only)" ),
311 static EDA_HOTKEY HkMeasureTool( _HKI( "Measure Distance (Modern Toolset only)" ),
313 
314 static EDA_HOTKEY HkInsertCorner( _HKI( "Insert Corner (Modern Toolset only)" ),
315  HK_INSERT_CORNER, WXK_INSERT );
316 
317 // List of common hotkey descriptors
319 {
321  &HkUndo, &HkRedo,
330  &HkMeasureTool,
331  NULL
332 };
333 
334 // common hotkey descriptors only useful in footprint viewer
336 {
342  NULL
343 };
344 
345 // List of hotkey descriptors for Pcbnew
347 {
348  // Adding Items
349  &HkPlaceItem,
350  &HkAddModule,
351  &HkAddFreeVia,
353  &HkAddKeepout,
356  &HkAddLine,
357  &HkAddCircle,
358  &HkAddArc,
359  &HkAddPolygon,
360  &HkAddText,
362  &HkAddDXF,
363 
364  // Routing and options during routing
365  &HkAddNewTrack,
370  &HkAddMicroVia,
371 
372  // Routing
377 
378  // Routing Options
385  &HkDpDimension,
386 
387  // Zones
390 
391  // Point editor (zones and segments)
393 
394  // Highlight and display
399 
400  // Adjust track/via sizes
404  &HkViaSizeInc,
405  &HkViaSizeDec,
406 
407  // Remove items
408  &HkDelete,
409  &HkBackspace,
410 
411  // Edit placement
413  &HkCopyItem,
414  &HkMoveItem,
418  &HkFlipItem,
419  &HkRotateItem,
421 
424 
427  &HkCreateArray,
429 
430  &HkFindItem,
433 
434  // Active Layer
445 
446  // Grids
451 
452  // Display
455  &HkCanvasCairo,
457  NULL
458 };
459 
460 // List of hotkey descriptors for the module editor
462  // Add Items
463  &HkAddLine,
464  &HkAddCircle,
465  &HkAddArc,
466  &HkAddPolygon,
467  &HkAddText,
468  &HkAddAnchor,
469 
470  // Delete/Move
471  &HkDelete,
472  &HkMoveItem,
474  &HkRotateItem,
476 
477  // Edit/Duplicate
481  &HkCreateArray,
482 
483  // Grids
488 
489  // Display
492  &HkCanvasCairo,
494  NULL
495  };
496 
497 // List of hotkey descriptors for the module viewer
498 // Currently empty
500  NULL
501  };
502 
503 // Keyword Identifiers (tags) in key code configuration file (section names)
504 // (.m_SectionTag member of a EDA_HOTKEY_CONFIG)
505 static wxString boardEditorSectionTag( wxT( "[pcbnew]" ) );
506 static wxString moduleEditSectionTag( wxT( "[footprinteditor]" ) );
507 
508 // Titles for hotkey editor and hotkey display
509 static wxString commonSectionTitle( _HKI( "Common" ) );
510 static wxString boardEditorSectionTitle( _HKI( "Board Editor" ) );
511 static wxString moduleEditSectionTitle( _HKI( "Footprint Editor" ) );
512 
513 // list of sections and corresponding hotkey list for Pcbnew
514 // (used to create an hotkey config file, and edit hotkeys )
516  { &g_CommonSectionTag, common_Hotkey_List, &commonSectionTitle },
517  { &boardEditorSectionTag, board_edit_Hotkey_List, &boardEditorSectionTitle },
518  { &moduleEditSectionTag, module_edit_Hotkey_List, &moduleEditSectionTitle },
519  { NULL, NULL, NULL }
520 };
521 
522 // list of sections and corresponding hotkey list for the board editor
523 // (used to list current hotkeys in the board editor)
525  { &g_CommonSectionTag, common_Hotkey_List, &commonSectionTitle },
526  { &boardEditorSectionTag, board_edit_Hotkey_List, &boardEditorSectionTitle },
527  { NULL, NULL, NULL }
528 };
529 
530 // list of sections and corresponding hotkey list for the footprint editor
531 // (used to list current hotkeys in the module editor)
533  { &g_CommonSectionTag, common_Hotkey_List, &commonSectionTitle },
534  { &moduleEditSectionTag, module_edit_Hotkey_List, &moduleEditSectionTitle },
535  { NULL, NULL, NULL }
536 };
537 
538 // list of sections and corresponding hotkey list for the footprint viewer
539 // (used to list current hotkeys in the module viewer)
541  { &g_CommonSectionTag, common_basic_Hotkey_List, &commonSectionTitle },
542  { NULL, NULL, NULL }
543 };
544 
545 
547 {
548  EDA_HOTKEY* HK_Descr = GetDescriptorFromCommand( aCommand, common_Hotkey_List );
549 
550  if( HK_Descr == NULL )
551  HK_Descr = GetDescriptorFromCommand( aCommand, module_viewer_Hotkey_List );
552 
553  return HK_Descr;
554 }
555 
556 
557 bool FOOTPRINT_VIEWER_FRAME::OnHotKey( wxDC* aDC, int aHotKey, const wxPoint& aPosition,
558  EDA_ITEM* aItem )
559 {
560  if( aHotKey == 0 )
561  return false;
562 
563  wxCommandEvent cmd( wxEVT_COMMAND_MENU_SELECTED );
564  cmd.SetEventObject( this );
565 
566  /* Convert lower to upper case (the usual toupper function has problem with non ascii
567  * codes like function keys */
568  if( (aHotKey >= 'a') && (aHotKey <= 'z') )
569  aHotKey += 'A' - 'a';
570 
571  EDA_HOTKEY* HK_Descr = GetDescriptorFromHotkey( aHotKey, common_Hotkey_List );
572 
573  if( HK_Descr == NULL )
574  HK_Descr = GetDescriptorFromHotkey( aHotKey, module_viewer_Hotkey_List );
575 
576  if( HK_Descr == NULL )
577  return false;
578 
579  switch( HK_Descr->m_Idcommand )
580  {
581  default:
582  case HK_NOT_FOUND:
583  return false;
584 
585  case HK_HELP: // Display Current hotkey list
586  DisplayHotkeyList( this, g_Module_Viewer_Hotkeys_Descr );
587  break;
588 
589  case HK_RESET_LOCAL_COORD: // set local (relative) coordinate origin
591  break;
592 
593  case HK_LEFT_CLICK:
594  OnLeftClick( aDC, aPosition );
595  break;
596 
597  case HK_LEFT_DCLICK: // Simulate a double left click: generate 2 events
598  OnLeftClick( aDC, aPosition );
599  OnLeftDClick( aDC, aPosition );
600  break;
601 
602  case HK_SWITCH_UNITS:
603  cmd.SetId( (GetUserUnits() == INCHES) ?
605  GetEventHandler()->ProcessEvent( cmd );
606  break;
607 
608  case HK_ZOOM_IN:
609  cmd.SetId( ID_KEY_ZOOM_IN );
610  GetEventHandler()->ProcessEvent( cmd );
611  break;
612 
613  case HK_ZOOM_OUT:
614  cmd.SetId( ID_KEY_ZOOM_OUT );
615  GetEventHandler()->ProcessEvent( cmd );
616  break;
617 
618  case HK_ZOOM_REDRAW:
619  cmd.SetId( ID_ZOOM_REDRAW );
620  GetEventHandler()->ProcessEvent( cmd );
621  break;
622 
623  case HK_ZOOM_CENTER:
624  cmd.SetId( ID_POPUP_ZOOM_CENTER );
625  GetEventHandler()->ProcessEvent( cmd );
626  break;
627 
628  case HK_ZOOM_AUTO:
629  cmd.SetId( ID_ZOOM_PAGE );
630  GetEventHandler()->ProcessEvent( cmd );
631  break;
632  }
633 
634  return true;
635 }
636 
637 
638 
640 {
641  EDA_HOTKEY* HK_Descr = GetDescriptorFromCommand( aCommand, common_Hotkey_List );
642 
643  return HK_Descr;
644 }
645 
646 
647 bool FOOTPRINT_WIZARD_FRAME::OnHotKey( wxDC* aDC, int aHotKey, const wxPoint& aPosition,
648  EDA_ITEM* aItem )
649 {
650  if( aHotKey == 0 )
651  return false;
652 
653  wxCommandEvent cmd( wxEVT_COMMAND_MENU_SELECTED );
654  cmd.SetEventObject( this );
655 
656  /* Convert lower to upper case (the usual toupper function has problem with non ascii
657  * codes like function keys */
658  if( (aHotKey >= 'a') && (aHotKey <= 'z') )
659  aHotKey += 'A' - 'a';
660 
661  EDA_HOTKEY* HK_Descr = GetDescriptorFromHotkey( aHotKey, common_Hotkey_List );
662 
663  if( HK_Descr == NULL )
664  return false;
665 
666  switch( HK_Descr->m_Idcommand )
667  {
668  default:
669  case HK_NOT_FOUND:
670  return false;
671 
672  case HK_HELP: // Display Current hotkey list
673  DisplayHotkeyList( this, g_Module_Viewer_Hotkeys_Descr );
674  break;
675 
676  case HK_RESET_LOCAL_COORD: // set local (relative) coordinate origin
678  break;
679 
680  case HK_LEFT_CLICK:
681  OnLeftClick( aDC, aPosition );
682  break;
683 
684  case HK_LEFT_DCLICK: // Simulate a double left click: generate 2 events
685  OnLeftClick( aDC, aPosition );
686  OnLeftDClick( aDC, aPosition );
687  break;
688 
689  case HK_SWITCH_UNITS:
690  cmd.SetId( (GetUserUnits() == INCHES) ?
692  GetEventHandler()->ProcessEvent( cmd );
693  break;
694 
695  case HK_ZOOM_IN:
696  cmd.SetId( ID_KEY_ZOOM_IN );
697  GetEventHandler()->ProcessEvent( cmd );
698  break;
699 
700  case HK_ZOOM_OUT:
701  cmd.SetId( ID_KEY_ZOOM_OUT );
702  GetEventHandler()->ProcessEvent( cmd );
703  break;
704 
705  case HK_ZOOM_REDRAW:
706  cmd.SetId( ID_ZOOM_REDRAW );
707  GetEventHandler()->ProcessEvent( cmd );
708  break;
709 
710  case HK_ZOOM_CENTER:
711  cmd.SetId( ID_POPUP_ZOOM_CENTER );
712  GetEventHandler()->ProcessEvent( cmd );
713  break;
714 
715  case HK_ZOOM_AUTO:
716  cmd.SetId( ID_ZOOM_PAGE );
717  GetEventHandler()->ProcessEvent( cmd );
718  break;
719  }
720 
721  return true;
722 }
static EDA_HOTKEY HkDecLayerAlpha(_HKI("Decrement Layer Transparency (Modern Toolset only)"), HK_DEC_LAYER_ALPHA, '{')
#define GR_KB_ALT
static EDA_HOTKEY HkMouseLeftClick(_HKI("Mouse Left Click"), HK_LEFT_CLICK, WXK_RETURN, 0)
static EDA_HOTKEY HkViaSizeDec(_HKI("Decrease Via Size"), HK_VIA_SIZE_DEC, '\\')
static wxString boardEditorSectionTitle(_HKI("Board Editor"))
static EDA_HOTKEY HkEditCut(_HKI("Cut"), HK_EDIT_CUT, GR_KB_CTRL+ 'X',(int) wxID_CUT)
struct EDA_HOTKEY_CONFIG g_Module_Viewer_Hotkeys_Descr[]
static EDA_HOTKEY HkSwitchHighContrastMode(_HKI("Toggle High Contrast Mode"), HK_SWITCH_HIGHCONTRAST_MODE,'H')
bool OnHotKey(wxDC *aDC, int aHotKey, const wxPoint &aPosition, EDA_ITEM *aItem=NULL) override
Function OnHotKey handle hot key events.
static EDA_HOTKEY HkDecreaseLineWidth(_HKI("Decrease Line Width"), HK_DEC_LINE_WIDTH, '-'+GR_KB_CTRL)
Structure EDA_HOTKEY_CONFIG contains the information required to save hot key information to a config...
Definition: hotkeys_basic.h:94
static EDA_HOTKEY HkCanvasOpenGL(_HKI("Switch to Modern Toolset with hardware-accelerated graphics (recommended)"), HK_CANVAS_OPENGL, WXK_F11)
static EDA_HOTKEY HkRouteTuneSingle(_HKI("Tune Single Track (Modern Toolset only)"), HK_ROUTE_TUNE_SINGLE, '7')
static EDA_HOTKEY HkDragTrackKeepSlope(_HKI("Drag Track Keep Slope"), HK_DRAG_TRACK_KEEP_SLOPE, 'D')
bool OnHotKey(wxDC *aDC, int aHotKey, const wxPoint &aPosition, EDA_ITEM *aItem=NULL) override
Function OnHotKey handle hot key events.
static EDA_HOTKEY HkCopyItem(_HKI("Copy Item"), HK_COPY_ITEM, 'C')
static EDA_HOTKEY HkMeasureTool(_HKI("Measure Distance (Modern Toolset only)"), HK_MEASURE_TOOL, 'M'+GR_KB_SHIFTCTRL)
static EDA_HOTKEY HkZoomIn(_HKI("Zoom In"), HK_ZOOM_IN, WXK_F1)
static EDA_HOTKEY HkDelete(_HKI("Delete Track or Footprint"), HK_DELETE, WXK_DELETE)
static EDA_HOTKEY HkAddLine(_HKI("Draw Line"), HK_ADD_LINE, 'L'+GR_KB_SHIFTCTRL)
struct EDA_HOTKEY_CONFIG g_Module_Editor_Hotkeys_Descr[]
static EDA_HOTKEY HkSwitch2ComponentLayer(_HKI("Switch to Component (F.Cu) layer"), HK_SWITCH_LAYER_TO_COMPONENT, WXK_PAGEUP)
static EDA_HOTKEY HkAddMicroVia(_HKI("Add MicroVia"), HK_ADD_MICROVIA, 'V'+GR_KB_CTRL)
static EDA_HOTKEY HkAddFreeVia(_HKI("Add Vias"), HK_ADD_FREE_VIA, 'V'+GR_KB_SHIFTCTRL)
static EDA_HOTKEY HkGetAndMoveFootprint(_HKI("Get and Move Footprint"), HK_GET_AND_MOVE_FOOTPRINT, 'T')
static EDA_HOTKEY HkAddSimilarZone(_HKI("Add a Similar Zone"), HK_ADD_SIMILAR_ZONE, '.'+GR_KB_SHIFTCTRL)
static EDA_HOTKEY HkSwitch2PreviousCopperLayer(_HKI("Switch to Previous Layer"), HK_SWITCH_LAYER_TO_PREVIOUS, '-')
#define GR_KB_CTRL
static EDA_HOTKEY HkAddArc(_HKI("Draw Arc"), HK_ADD_ARC, 'A'+GR_KB_SHIFTCTRL)
static EDA_HOTKEY HkAddPolygon(_HKI("Draw Graphic Polygon"), HK_ADD_POLYGON, 'P'+GR_KB_SHIFTCTRL)
static EDA_HOTKEY HkDuplicateItemAndIncrement(_HKI("Duplicate Item and Increment"), HK_DUPLICATE_ITEM_AND_INCREMENT, 'D'+GR_KB_SHIFTCTRL)
static EDA_HOTKEY HkIncreaseLineWidth(_HKI("Increase Line Width"), HK_INC_LINE_WIDTH, '+'+GR_KB_CTRL)
static EDA_HOTKEY HkSwitch2InnerLayer4(_HKI("Switch to Inner layer 4"), HK_SWITCH_LAYER_TO_INNER4, WXK_F8)
static EDA_HOTKEY HkNew(_HKI("New"), HK_NEW, GR_KB_CTRL+ 'N',(int) wxID_NEW)
static EDA_HOTKEY HkSaveAs(_HKI("Save As"), HK_SAVEAS, GR_KB_SHIFT+GR_KB_CTRL+ 'S',(int) wxID_SAVEAS)
static EDA_HOTKEY HkCustomTrackWidth(_HKI("Custom Track/Via Size"), HK_CUSTOM_TRACK_WIDTH, 'Q')
static EDA_HOTKEY HkCanvasCairo(_HKI("Switch to Modern Toolset with software graphics (fall-back)"), HK_CANVAS_CAIRO, WXK_F12)
static EDA_HOTKEY HkZoomCenter(_HKI("Zoom Center"), HK_ZOOM_CENTER, WXK_F4)
struct EDA_HOTKEY_CONFIG g_Pcbnew_Editor_Hotkeys_Descr[]
static EDA_HOTKEY HkIncHighContrast(_HKI("Increment High Contrast"), HK_HIGHCONTRAST_INC, '>')
static EDA_HOTKEY HkRotateItem(_HKI("Rotate Item"), HK_ROTATE_ITEM, 'R')
static EDA_HOTKEY HkAddBlindBuriedVia(_HKI("Add Blind/Buried Via"), HK_ADD_BLIND_BURIED_VIA, 'V'+GR_KB_ALT+GR_KB_SHIFT)
static EDA_HOTKEY HkSwitchGridToNext(_HKI("Switch Grid To Next"), HK_SWITCH_GRID_TO_NEXT, 'N')
static wxString moduleEditSectionTitle(_HKI("Footprint Editor"))
wxPoint m_O_Curseur
Relative Screen cursor coordinate (on grid) in user units.
Definition: base_screen.h:185
static EDA_HOTKEY HkZoomOut(_HKI("Zoom Out"), HK_ZOOM_OUT, WXK_F2)
static EDA_HOTKEY HkPrint(_HKI("Print"), HK_PRINT, GR_KB_CTRL+ 'P',(int) wxID_PRINT)
Pcbnew hotkeys.
static EDA_HOTKEY HkDecHighContrast(_HKI("Decrement High Contrast"), HK_HIGHCONTRAST_DEC, '<')
EDA_HOTKEY * GetDescriptorFromHotkey(int aKey, EDA_HOTKEY **aList)
Function GetDescriptorFromHotkey Return a EDA_HOTKEY * pointer from a key code for OnHotKey() functio...
static EDA_HOTKEY HkFlipItem(_HKI("Flip Item"), HK_FLIP_ITEM, 'F')
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 HkSwitchGridToFastGrid2(_HKI("Switch Grid To Fast Grid2"), HK_SWITCH_GRID_TO_FASTGRID2, GR_KB_ALT+ '2')
static EDA_HOTKEY HkUndo(_HKI("Undo"), HK_UNDO, GR_KB_CTRL+ 'Z',(int) wxID_UNDO)
static EDA_HOTKEY HkAddFilledZone(_HKI("Add Filled Zone"), HK_ADD_ZONE, 'Z'+GR_KB_SHIFTCTRL)
void DisplayHotkeyList(EDA_BASE_FRAME *aFrame, struct EDA_HOTKEY_CONFIG *aDescList)
Function DisplayHotkeyList Displays the current hotkey list.
static EDA_HOTKEY HkRouteTuneDecreaseSpacing(_HKI("Decrease meander spacing by one step."), HK_ROUTE_TUNE_DECREASE_SPACING, '2')
static EDA_HOTKEY HkSwitch2InnerLayer3(_HKI("Switch to Inner layer 3"), HK_SWITCH_LAYER_TO_INNER3, WXK_F7)
static EDA_HOTKEY HkAddKeepout(_HKI("Add Keepout Area"), HK_ADD_KEEPOUT, 'K'+GR_KB_SHIFTCTRL)
static EDA_HOTKEY HkSwitchGridToPrevious(_HKI("Switch Grid To Previous"), HK_SWITCH_GRID_TO_PREVIOUS, 'N'+GR_KB_SHIFT)
static EDA_HOTKEY HkRouteTuneSkew(_HKI("Tune Differential Pair Skew (Modern Toolset only)"), HK_ROUTE_TUNE_SKEW, '9')
EDA_DRAW_FRAME::OnSelectGrid ID_TB_OPTIONS_SELECT_UNIT_INCH
static wxString commonSectionTitle(_HKI("Common"))
static EDA_HOTKEY HkSwitch2CopperLayer(_HKI("Switch to Copper (B.Cu) layer"), HK_SWITCH_LAYER_TO_COPPER, WXK_PAGEDOWN)
static EDA_HOTKEY Hk3DViewer(_HKI("3D Viewer"), HK_3D_VIEWER, GR_KB_ALT+ '3')
EDA_HOTKEY * common_basic_Hotkey_List[]
static wxString boardEditorSectionTag(wxT("[pcbnew]"))
EDA_UNITS_T GetUserUnits() const override
Return the user units currently in use.
Definition: draw_frame.h:284
Definition: common.h:160
static EDA_HOTKEY HkAddModule(_HKI("Add Footprint"), HK_ADD_MODULE, 'O')
static EDA_HOTKEY HkAddAnchor(_HKI("Place the Footprint Anchor"), HK_ADD_ANCHOR, 'N'+GR_KB_SHIFTCTRL)
static EDA_HOTKEY HkAddDimension(_HKI("Add Dimension"), HK_ADD_DIMENSION, 'H'+GR_KB_SHIFTCTRL)
static EDA_HOTKEY HkToggleCursor(_HKI("Toggle Cursor Display (Modern Toolset only)"), HK_TOGGLE_CURSOR, 'X'+GR_KB_SHIFTCTRL)
static EDA_HOTKEY HkSwitch2InnerLayer1(_HKI("Switch to Inner layer 1"), HK_SWITCH_LAYER_TO_INNER1, WXK_F5)
static EDA_HOTKEY HkRedo(_HKI("Redo"), HK_REDO, GR_KB_CTRL+ 'Y',(int) wxID_REDO)
static EDA_HOTKEY HkHighlightNetSelection(_HKI("Toggle Highlight of Selected Net (Modern Toolset only)"), HK_HIGHLIGHT_NET_SELECTION, '`')
static EDA_HOTKEY HkZoneRemoveFilled(_HKI("Remove Filled Areas in All Zones"), HK_ZONE_REMOVE_FILLED, 'B'+GR_KB_CTRL)
static EDA_HOTKEY HkCanvasDefault(_HKI("Switch to Legacy Toolset (not all features will be available"), HK_CANVAS_LEGACY, WXK_F9)
static EDA_HOTKEY HkOpen(_HKI("Open"), HK_OPEN, GR_KB_CTRL+ 'O',(int) wxID_OPEN)
static EDA_HOTKEY HkSwitchTrackWidthToNext(_HKI("Switch Track Width To Next"), HK_SWITCH_TRACK_WIDTH_TO_NEXT, 'W')
static EDA_HOTKEY HkEditWithModedit(_HKI("Edit with Footprint Editor"), HK_EDIT_MODULE_WITH_MODEDIT, 'E'+GR_KB_CTRL)
static EDA_HOTKEY HkMoveItemExact(_HKI("Move Item Exactly"), HK_MOVE_ITEM_EXACT, 'M'+GR_KB_CTRL)
static EDA_HOTKEY HkAddNewTrack(_HKI("Add New Track"), HK_ADD_NEW_TRACK, 'X')
static EDA_HOTKEY HkRouteTuneIncreaseAmp(_HKI("Increase meander amplitude by one step."), HK_ROUTE_TUNE_INCREASE_AMP, '3')
static EDA_HOTKEY HkDuplicateItem(_HKI("Duplicate Item"), HK_DUPLICATE_ITEM, 'D'+GR_KB_CTRL)
static EDA_HOTKEY HkRouteTuneSettings(_HKI("Length Tuning Settings (Modern Toolset only)"), HK_ROUTE_TUNE_SETTINGS, 'L'+GR_KB_CTRL)
static EDA_HOTKEY HkTrackDisplayMode(_HKI("Track Display Mode"), HK_SWITCH_TRACK_DISPLAY_MODE, 'K')
static EDA_HOTKEY HkZoomAuto(_HKI("Zoom Auto"), HK_ZOOM_AUTO, WXK_HOME)
void OnLeftClick(wxDC *DC, const wxPoint &MousePos) override
struct EDA_HOTKEY_CONFIG g_Board_Editor_Hotkeys_Descr[]
static EDA_HOTKEY HkSetGridOrigin(_HKI("Set Grid Origin"), HK_SET_GRID_ORIGIN, 'S')
void OnLeftDClick(wxDC *, const wxPoint &) override
static EDA_HOTKEY HkSwitch2InnerLayer5(_HKI("Switch to Inner layer 5"), HK_SWITCH_LAYER_TO_INNER5, GR_KB_SHIFT+WXK_F5)
static EDA_HOTKEY HkEditBoardItem(_HKI("Edit Item"), HK_EDIT_ITEM, 'E')
static EDA_HOTKEY HkAddCircle(_HKI("Draw Circle"), HK_ADD_CIRCLE, 'C'+GR_KB_SHIFTCTRL)
#define GR_KB_SHIFT
EDA_HOTKEY * board_edit_Hotkey_List[]
static EDA_HOTKEY HkSwitchUnits(_HKI("Switch Units"), HK_SWITCH_UNITS, 'U'+GR_KB_CTRL)
static wxString moduleEditSectionTag(wxT("[footprinteditor]"))
static EDA_HOTKEY HkEditCopy(_HKI("Copy"), HK_EDIT_COPY, GR_KB_CTRL+ 'C',(int) wxID_COPY)
static EDA_HOTKEY HkSave(_HKI("Save"), HK_SAVE, GR_KB_CTRL+ 'S',(int) wxID_SAVE)
static EDA_HOTKEY HkFindItem(_HKI("Find Item"), HK_FIND_ITEM, 'F'+GR_KB_CTRL)
static EDA_HOTKEY HkAddThroughVia(_HKI("Add Through Via"), HK_ADD_THROUGH_VIA, 'V')
EDA_HOTKEY * GetHotKeyDescription(int aCommand) const override
>
static EDA_HOTKEY HkSelectConnection(_HKI("Select Single Track"), HK_SEL_TRIVIAL_CONNECTION, 'U')
static EDA_HOTKEY HkSelectCopper(_HKI("Select Connected Tracks"), HK_SEL_COPPER_CONNECTION, 'I')
#define GR_KB_SHIFTCTRL
static EDA_HOTKEY HkAddDXF(_HKI("Place DXF"), HK_ADD_DXF, 'F'+GR_KB_SHIFTCTRL)
class EDA_HOTKEY is a class to handle hot key commands.
Definition: hotkeys_basic.h:59
static EDA_HOTKEY HkBackspace(_HKI("Delete Track Segment"), HK_BACK_SPACE, WXK_BACK)
static EDA_HOTKEY HkMouseLeftDClick(_HKI("Mouse Left Double Click"), HK_LEFT_DCLICK, WXK_END, 0)
static EDA_HOTKEY HkRouteTuneDecreaseAmp(_HKI("Decrease meander amplitude by one step."), HK_ROUTE_TUNE_DECREASE_AMP, '4')
static EDA_HOTKEY HkViaSizeInc(_HKI("Increase Via Size"), HK_VIA_SIZE_INC, '\'')
static EDA_HOTKEY HkSwitchGridToFastGrid1(_HKI("Switch Grid To Fast Grid1"), HK_SWITCH_GRID_TO_FASTGRID1, GR_KB_ALT+ '1')
static EDA_HOTKEY HkAddZoneCutout(_HKI("Add a Zone Cutout"), HK_ADD_CUTOUT, 'C'+GR_KB_SHIFT)
static EDA_HOTKEY HkSelLayerAndAddThroughVia(_HKI("Select Layer and Add Through Via"), HK_SEL_LAYER_AND_ADD_THROUGH_VIA, '<')
static EDA_HOTKEY HkZoomRedraw(_HKI("Zoom Redraw"), HK_ZOOM_REDRAW, WXK_F3)
static EDA_HOTKEY HkSwitchTrackWidthToPrevious(_HKI("Switch Track Width To Previous"), HK_SWITCH_TRACK_WIDTH_TO_PREVIOUS, 'W'+GR_KB_CTRL)
Class EDA_ITEM is a base class for most all the KiCad significant classes, used in schematics and boa...
Definition: base_struct.h:154
EDA_HOTKEY * module_edit_Hotkey_List[]
static EDA_HOTKEY HkInsertCorner(_HKI("Insert Corner (Modern Toolset only)"), HK_INSERT_CORNER, WXK_INSERT)
PCB_SCREEN * GetScreen() const override
Return a pointer to a BASE_SCREEN or one of its derivatives.
static EDA_HOTKEY HkSwitch2InnerLayer6(_HKI("Switch to Inner layer 6"), HK_SWITCH_LAYER_TO_INNER6, GR_KB_SHIFT+WXK_F6)
static EDA_HOTKEY HkDragFootprint(_HKI("Drag Item"), HK_DRAG_ITEM, 'G')
static EDA_HOTKEY HkSwitch2InnerLayer2(_HKI("Switch to Inner layer 2"), HK_SWITCH_LAYER_TO_INNER2, WXK_F6)
static EDA_HOTKEY HkResetGridOrigin(_HKI("Reset Grid Origin"), HK_RESET_GRID_ORIGIN, 'Z')
static EDA_HOTKEY HkDpDimension(_HKI("Differential Pair Dimensions"), HK_DP_DIMENSIONS, 'R'+GR_KB_SHIFTCTRL)
static EDA_HOTKEY HkRouteDiffPair(_HKI("Route Differential Pair (Modern Toolset only)"), HK_ROUTE_DIFF_PAIR, '6')
static EDA_HOTKEY HkZoomSelection(_HKI("Zoom to Selection"), HK_ZOOM_SELECTION, GR_KB_CTRL+WXK_F5, ID_ZOOM_SELECTION)
wxString g_CommonSectionTag
static EDA_HOTKEY HkRotateItemClockwise(_HKI("Rotate Item Clockwise (Modern Toolset only)"), HK_ROTATE_ITEM_CLOCKWISE, GR_KB_SHIFT+ 'R')
static EDA_HOTKEY HkSwitchTrackPosture(_HKI("Switch Track Posture"), HK_SWITCH_TRACK_POSTURE, '/')
static EDA_HOTKEY HkMoveItem(_HKI("Move Item"), HK_MOVE_ITEM, 'M')
EDA_HOTKEY * module_viewer_Hotkey_List[]
static EDA_HOTKEY HkResetLocalCoord(_HKI("Reset Local Coordinates"), HK_RESET_LOCAL_COORD, ' ')
#define _HKI(x)
EDA_HOTKEY * common_Hotkey_List[]
wxPoint GetCrossHairPosition(bool aInvertY=false) const
Return the current cross hair position in logical (drawing) coordinates.
static EDA_HOTKEY HkLock_Unlock_Footprint(_HKI("Lock/Unlock Footprint"), HK_LOCK_UNLOCK_FOOTPRINT, 'L')
EDA_HOTKEY * GetHotKeyDescription(int aCommand) const override
>
static EDA_HOTKEY HkIncLayerAlpha(_HKI("Increment Layer Transparency (Modern Toolset only)"), HK_INC_LAYER_ALPHA, '}')
static EDA_HOTKEY HkSwitch2NextCopperLayer(_HKI("Switch to Next Layer"), HK_SWITCH_LAYER_TO_NEXT, '+')
static EDA_HOTKEY HkEditPaste(_HKI("Paste"), HK_EDIT_PASTE, GR_KB_CTRL+ 'V',(int) wxID_PASTE)
static EDA_HOTKEY HkAddText(_HKI("Add Text"), HK_ADD_TEXT, 'T'+GR_KB_SHIFTCTRL)
EDA_HOTKEY * GetDescriptorFromCommand(int aCommand, EDA_HOTKEY **aList)
Function GetDescriptorFromCommand Returns a EDA_HOTKEY* pointer from a hot key identifier.
static EDA_HOTKEY HkRouteTuneIncreaseSpacing(_HKI("Increase meander spacing by one step."), HK_ROUTE_TUNE_INCREASE_SPACING, '1')
static EDA_HOTKEY HkZoneFillOrRefill(_HKI("Fill or Refill All Zones"), HK_ZONE_FILL_OR_REFILL, 'B')
static EDA_HOTKEY HkPlaceItem(_HKI("Place Item"), HK_PLACE_ITEM, 'P')
static EDA_HOTKEY HkRoutingOptions(_HKI("Routing Options"), HK_ROUTING_OPTIONS, ','+GR_KB_CTRL)
static EDA_HOTKEY HkPositionItemRelative(_HKI("Position Item Relative"), HK_POSITION_RELATIVE, 'R'+GR_KB_CTRL)
static EDA_HOTKEY HkRouteTuneDiffPair(_HKI("Tune Differential Pair Length (Modern Toolset only)"), HK_ROUTE_TUNE_DIFF_PAIR, '8')
static EDA_HOTKEY HkCreateArray(_HKI("Create Array"), HK_CREATE_ARRAY, 'T'+GR_KB_CTRL)
static EDA_HOTKEY HkHelp(_HKI("Help (this window)"), HK_HELP, GR_KB_CTRL+WXK_F1)