mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +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 { key, ctrlKey, metaKey, shiftKey } = e;
|
||||
if (key === "a" && shiftKey && (ctrlKey || metaKey)) {
|
||||
const { code, altKey } = e;
|
||||
if (code === "KeyA" && altKey) {
|
||||
e.preventDefault();
|
||||
onChangeAutocomplete();
|
||||
}
|
||||
|
|
|
@ -4,8 +4,9 @@ import { VisibilityIcon } from "../../Icons";
|
|||
import GraphTips from "../../../Chart/GraphTips/GraphTips";
|
||||
|
||||
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 = [
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue