mirror of
https://github.com/ShareX/ShareX.git
synced 2024-07-01 04:30:49 +12:00
Restrict zoom keybinds to image editor
This commit is contained in:
parent
a4aa82c250
commit
56d17fe1f2
|
@ -657,25 +657,34 @@ internal void RegionCaptureForm_KeyDown(object sender, KeyEventArgs e)
|
|||
case Keys.Control | Keys.C:
|
||||
CopyAreaInfo();
|
||||
break;
|
||||
case Keys.Control | Keys.Alt | Keys.D0:
|
||||
ZoomToFit();
|
||||
break;
|
||||
case Keys.Control | Keys.D0:
|
||||
ZoomFactor = 1;
|
||||
CenterCanvas();
|
||||
break;
|
||||
case Keys.Control | Keys.Oemplus:
|
||||
Zoom(true, false);
|
||||
break;
|
||||
case Keys.Control | Keys.OemMinus:
|
||||
Zoom(false, false);
|
||||
break;
|
||||
}
|
||||
|
||||
if (!IsEditorMode && e.KeyData >= Keys.D0 && e.KeyData <= Keys.D9)
|
||||
if (IsEditorMode)
|
||||
{
|
||||
MonitorKey(e.KeyData - Keys.D0);
|
||||
return;
|
||||
switch (e.KeyData)
|
||||
{
|
||||
case Keys.Control | Keys.Alt | Keys.D0:
|
||||
ZoomToFit();
|
||||
break;
|
||||
case Keys.Control | Keys.D0:
|
||||
ZoomFactor = 1;
|
||||
CenterCanvas();
|
||||
break;
|
||||
case Keys.Control | Keys.Oemplus:
|
||||
Zoom(true, false);
|
||||
break;
|
||||
case Keys.Control | Keys.OemMinus:
|
||||
Zoom(false, false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (e.KeyData >= Keys.D0 && e.KeyData <= Keys.D9)
|
||||
{
|
||||
MonitorKey(e.KeyData - Keys.D0);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue