Only apply ctrl-left/right shortcut when it doesn't conflict. Refs #542

* We only apply it for non-textbox controls since there ctrl-left and
  ctrl-right move through words.
* Also only apply it while a capture is open.
This commit is contained in:
baldurk
2017-05-10 17:20:34 +01:00
parent 886d6f608b
commit 50a02d713d
+17 -12
View File
@@ -1717,24 +1717,29 @@ namespace renderdocui.Windows
}
}
if (keyData == (Keys.Control | Keys.Left))
Control sender = Control.FromHandle(msg.HWnd);
if (m_Core.LogLoaded && !(sender is TextBox) && !(sender is ScintillaNET.Scintilla))
{
FetchDrawcall draw = m_Core.CurDrawcall;
if (keyData == (Keys.Control | Keys.Left))
{
FetchDrawcall draw = m_Core.CurDrawcall;
if (draw != null && draw.previous != null)
m_Core.SetEventID(null, draw.previous.eventID);
if (draw != null && draw.previous != null)
m_Core.SetEventID(null, draw.previous.eventID);
return true;
}
return true;
}
if (keyData == (Keys.Control | Keys.Right))
{
FetchDrawcall draw = m_Core.CurDrawcall;
if (keyData == (Keys.Control | Keys.Right))
{
FetchDrawcall draw = m_Core.CurDrawcall;
if (draw != null && draw.next != null)
m_Core.SetEventID(null, draw.next.eventID);
if (draw != null && draw.next != null)
m_Core.SetEventID(null, draw.next.eventID);
return true;
return true;
}
}
}
return base.ProcessCmdKey(ref msg, keyData);