From b10031b62b8406fd5bff61cf2969fd75cb593ff0 Mon Sep 17 00:00:00 2001 From: Ygal Bellaiche Date: Mon, 10 May 2021 18:38:17 +0300 Subject: [PATCH] add CTRL+Enter support --- .../Controls/QueryControl.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/CymaticLabs.InfluxDB.Studio/Controls/QueryControl.cs b/src/CymaticLabs.InfluxDB.Studio/Controls/QueryControl.cs index b8fbd74..26f455d 100644 --- a/src/CymaticLabs.InfluxDB.Studio/Controls/QueryControl.cs +++ b/src/CymaticLabs.InfluxDB.Studio/Controls/QueryControl.cs @@ -114,6 +114,16 @@ public override async Task ExecuteRequestAsync() resultsLabel.Text = string.Format("results: {0}, response time: {1:0} ms", resultsCount, stopWatch.Elapsed.TotalMilliseconds); } + protected override bool ProcessCmdKey(ref Message msg, Keys keyData) + { + if (keyData == (Keys.Control | Keys.Enter)) + { + ExecuteRequestAsync(); + return true; + } + return base.ProcessCmdKey(ref msg, keyData); + } + #endregion Methods } }