Change default 45° hotkey to shift-space
This requires enabling the space key to be bound with shift, which was disabled based on an overbroad limit of only allowing shift to be mapped with letter keys
This commit is contained in:
parent
749d2d5987
commit
343dbf0f5b
|
@ -576,14 +576,14 @@ long WIDGET_HOTKEY_LIST::MapKeypressToKeycode( const wxKeyEvent& aEvent )
|
|||
key += 'A' - 1;
|
||||
|
||||
/* Disallow shift for keys that have two keycodes on them (e.g. number and
|
||||
* punctuation keys) leaving only the "letter keys" of A-Z.
|
||||
* punctuation keys) leaving only the "letter keys" of A-Z, tab and space
|
||||
* Then, you can have, e.g. Ctrl-5 and Ctrl-% (GB layout)
|
||||
* and Ctrl-( and Ctrl-5 (FR layout).
|
||||
* Otherwise, you'd have to have to say Ctrl-Shift-5 on a FR layout
|
||||
*/
|
||||
bool keyIsLetter = key >= 'A' && key <= 'Z';
|
||||
|
||||
if( aEvent.ShiftDown() && ( keyIsLetter || key > 256 ) )
|
||||
if( aEvent.ShiftDown() && ( keyIsLetter || key > 256 || key == 9 || key == 32 ) )
|
||||
key |= MD_SHIFT;
|
||||
|
||||
if( aEvent.ControlDown() )
|
||||
|
|
|
@ -663,7 +663,7 @@ TOOL_ACTION PCB_ACTIONS::toggleLock( "pcbnew.EditorControl.toggleLock",
|
|||
BITMAPS::lock_unlock );
|
||||
|
||||
TOOL_ACTION PCB_ACTIONS::toggle45( "pcbnew.EditorControl.toggle45",
|
||||
AS_GLOBAL, WXK_TAB, "",
|
||||
AS_GLOBAL, MD_SHIFT + ' ', "",
|
||||
_( "Toggle 45 Limit" ), _( "Limit actions to 45 degrees from the starting point" ),
|
||||
BITMAPS::INVALID_BITMAP );
|
||||
|
||||
|
|
Loading…
Reference in New Issue