diff --git a/pcbnew/hotkeys.cpp b/pcbnew/hotkeys.cpp index e503ef6f7e..0ee3290907 100644 --- a/pcbnew/hotkeys.cpp +++ b/pcbnew/hotkeys.cpp @@ -78,7 +78,8 @@ static EDA_HOTKEY HkLock_Unlock_Footprint( wxT( "Lock/Unlock Footprint" ), 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("Switch Highcontrast mode"), + HK_SWITCH_HIGHCONTRAST_MODE,'H'); /* Fit on Screen */ #if !defined( __WXMAC__ ) static EDA_HOTKEY HkZoomAuto( wxT( "Zoom Auto" ), HK_ZOOM_AUTO, WXK_HOME ); @@ -224,6 +225,7 @@ EDA_HOTKEY* board_edit_Hotkey_List[] = &HkRecordMacros4, &HkCallMacros4, &HkRecordMacros5, &HkCallMacros5, &HkRecordMacros6, &HkCallMacros6, &HkRecordMacros7, &HkCallMacros7, &HkRecordMacros8, &HkCallMacros8, &HkRecordMacros9, &HkCallMacros9, + &HkSwitchHighContrastMode, NULL }; diff --git a/pcbnew/hotkeys.h b/pcbnew/hotkeys.h index c315f119ff..262b4997e7 100644 --- a/pcbnew/hotkeys.h +++ b/pcbnew/hotkeys.h @@ -76,7 +76,8 @@ enum hotkey_id_commnand { HK_RECORD_MACROS_8, HK_CALL_MACROS_8, HK_RECORD_MACROS_9, - HK_CALL_MACROS_9 + HK_CALL_MACROS_9, + HK_SWITCH_HIGHCONTRAST_MODE, }; // Full list of hotkey descriptors for board editor and footprint editor diff --git a/pcbnew/hotkeys_board_editor.cpp b/pcbnew/hotkeys_board_editor.cpp index ae82aac6c5..1ce0b89136 100644 --- a/pcbnew/hotkeys_board_editor.cpp +++ b/pcbnew/hotkeys_board_editor.cpp @@ -625,6 +625,10 @@ void PCB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosit case HK_FLIP_FOOTPRINT: // move to other side OnHotkeyRotateItem( HK_FLIP_FOOTPRINT ); break; + case HK_SWITCH_HIGHCONTRAST_MODE: // switch to high contrast mode and refresh the canvas + DisplayOpt.ContrastModeDisplay = !DisplayOpt.ContrastModeDisplay; + m_canvas->Refresh(); + break; } if( evt_type != 0 )