Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[UI] Adds support for CTRL key as a modifier for Query shortcuts #12087

Merged
merged 1 commit into from
Dec 5, 2023

Conversation

renato-bohler
Copy link
Contributor

This PR includes a simple UI enhancement, adding support for the CTRL key as a modifier on the Query page (for Windows and Linux users).

The feature was originally added on #7359, but only included support for the event.metaKey modifier, which maps to the ⌘ key on MacOS, but really can't be used as a modifier for Windows/Linux users.

const handleQueryInterfaceKeyDown = (editor, event) => {
// Map Cmd + Enter KeyPress to executing the query
if (event.metaKey == true && event.keyCode == 13) {
handleRunNow(editor.getValue());
}
// Map Cmd + / KeyPress to toggle commenting the query
if (event.metaKey == true && event.keyCode == 191) {
handleComment(editor);
}
}

With the implementation on this PR, MacOS users could use either the Cmd (⌘) or Control (^) as modifiers.

Closes #12086

@Jackie-Jiang Jackie-Jiang added the ui UI related issue label Dec 5, 2023
@Jackie-Jiang Jackie-Jiang merged commit b25f7cf into apache:master Dec 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ui UI related issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Linux and Windows users unable to use Cmd + Enter to submit queries on Pinot UI
2 participants