You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by ja...@apache.org on 2023/12/05 01:57:07 UTC
(pinot) branch master updated: Adds support for CTRL key as a modifier for Query shortcuts (#12087)
This is an automated email from the ASF dual-hosted git repository.
jackie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pinot.git
The following commit(s) were added to refs/heads/master by this push:
new b25f7cf6c1 Adds support for CTRL key as a modifier for Query shortcuts (#12087)
b25f7cf6c1 is described below
commit b25f7cf6c165d9de39d79e86894235fca359adab
Author: Renato Böhler <re...@gmail.com>
AuthorDate: Mon Dec 4 22:57:00 2023 -0300
Adds support for CTRL key as a modifier for Query shortcuts (#12087)
---
pinot-controller/src/main/resources/app/pages/Query.tsx | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/pinot-controller/src/main/resources/app/pages/Query.tsx b/pinot-controller/src/main/resources/app/pages/Query.tsx
index 68fe621fd6..ea87009520 100644
--- a/pinot-controller/src/main/resources/app/pages/Query.tsx
+++ b/pinot-controller/src/main/resources/app/pages/Query.tsx
@@ -214,12 +214,14 @@ const QueryPage = () => {
};
const handleQueryInterfaceKeyDown = (editor, event) => {
- // Map Cmd + Enter KeyPress to executing the query
- if (event.metaKey == true && event.keyCode == 13) {
+ const modifiedEnabled = event.metaKey == true || event.ctrlKey == true;
+
+ // Map (Cmd/Ctrl) + Enter KeyPress to executing the query
+ if (modifiedEnabled && event.keyCode == 13) {
handleRunNow(editor.getValue());
}
- // Map Cmd + / KeyPress to toggle commenting the query
- if (event.metaKey == true && event.keyCode == 191) {
+ // Map (Cmd/Ctrl) + / KeyPress to toggle commenting the query
+ if (modifiedEnabled && event.keyCode == 191) {
handleComment(editor);
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org