vmui: change autocomplete hotkey to Alt/Option + A (#5328)

This commit is contained in:
Yury Molodov 2023-11-15 23:33:10 +01:00 committed by GitHub
parent 17c45d1206
commit 98e73a4022
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View file

@ -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();
}

View file

@ -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 = [
{