mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-03-21 15:45:01 +00:00
vmui: change autocomplete hotkey to Alt/Option + A (#5328)
This commit is contained in:
parent
17c45d1206
commit
98e73a4022
2 changed files with 4 additions and 3 deletions
|
@ -33,8 +33,8 @@ const AdditionalSettingsControls: FC<{isMobile?: boolean}> = ({ isMobile }) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleKeyDown = (e: KeyboardEvent) => {
|
const handleKeyDown = (e: KeyboardEvent) => {
|
||||||
const { key, ctrlKey, metaKey, shiftKey } = e;
|
const { code, altKey } = e;
|
||||||
if (key === "a" && shiftKey && (ctrlKey || metaKey)) {
|
if (code === "KeyA" && altKey) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
onChangeAutocomplete();
|
onChangeAutocomplete();
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,8 +4,9 @@ import { VisibilityIcon } from "../../Icons";
|
||||||
import GraphTips from "../../../Chart/GraphTips/GraphTips";
|
import GraphTips from "../../../Chart/GraphTips/GraphTips";
|
||||||
|
|
||||||
const ctrlMeta = <code>{isMacOs() ? "Cmd" : "Ctrl"}</code>;
|
const ctrlMeta = <code>{isMacOs() ? "Cmd" : "Ctrl"}</code>;
|
||||||
|
const altMeta = <code>{isMacOs() ? "Option" : "Alt"}</code>;
|
||||||
|
|
||||||
export const AUTOCOMPLETE_KEY = <>{ctrlMeta} + <code>Shift</code> + <code>A</code></>;
|
export const AUTOCOMPLETE_KEY = <>{altMeta} + <code>A</code></>;
|
||||||
|
|
||||||
const keyList = [
|
const keyList = [
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue