
Hello,
How can I get which key was used to commit the completion provider?
Thanks!
Hello,
How can I get which key was used to commit the completion provider?
Thanks!
Hi Josh,
There's not anything that tracks that right now, as there are a number of things that could trigger a commit (key, mouse, programmatic, etc.). But as mentioned in this related thread, you could possibly override the CompletionSession.OnViewTextInput method to track the last text input.
yeah, this is what I ended up with so far:
private class CustomCompletionSession : CompletionSession
{
public KeyEventArgs LastKeyEvent { get; protected set; }
protected override void OnViewKeyDown(IEditorView view, KeyEventArgs e)
{
LastKeyEvent = e;
base.OnViewKeyDown(view, e);
}
}
Please log in to a validated account to post comments.