Fix: Ctrl displaying as Control
This commit is contained in:
parent
60dba48703
commit
9466e061be
4 changed files with 15 additions and 4 deletions
|
|
@ -178,6 +178,7 @@ export default function GlobalVariablesPage() {
|
||||||
pagination={false}
|
pagination={false}
|
||||||
columnDefs={colDefs}
|
columnDefs={colDefs}
|
||||||
rowData={rowData}
|
rowData={rowData}
|
||||||
|
containerStyle={{ overflow: "auto", maxWidth: "80vh" }}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -114,10 +114,18 @@ export default function EditShortcutButton({
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
function onKeyDown(e: KeyboardEvent) {
|
function onKeyDown(e: KeyboardEvent) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
let fixedKey = e.key;
|
||||||
if (key) {
|
if (key) {
|
||||||
if (key.toUpperCase().includes(e.key.toUpperCase())) return;
|
if (key.toUpperCase().includes(e.key.toUpperCase())) return;
|
||||||
}
|
}
|
||||||
setKey((oldKey) => getFixedCombination({ oldKey: oldKey!, key: e.key }));
|
if (e.key?.toLowerCase() === "control") {
|
||||||
|
console.log("oi");
|
||||||
|
fixedKey = "Ctrl";
|
||||||
|
console.log(fixedKey);
|
||||||
|
}
|
||||||
|
setKey((oldKey) =>
|
||||||
|
getFixedCombination({ oldKey: oldKey!, key: fixedKey }),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
document.addEventListener("keydown", onKeyDown);
|
document.addEventListener("keydown", onKeyDown);
|
||||||
|
|
|
||||||
|
|
@ -86,7 +86,7 @@ export default function ShortcutsPage() {
|
||||||
setOpen={setOpen}
|
setOpen={setOpen}
|
||||||
>
|
>
|
||||||
<Button variant="primary">
|
<Button variant="primary">
|
||||||
<ForwardedIconComponent name="Plus" className="mr-2 w-4" />
|
<ForwardedIconComponent name="Wrench" className="mr-2 w-4" />
|
||||||
Customize
|
Customize
|
||||||
</Button>
|
</Button>
|
||||||
</EditShortcutButton>
|
</EditShortcutButton>
|
||||||
|
|
|
||||||
|
|
@ -141,7 +141,8 @@ import {
|
||||||
X,
|
X,
|
||||||
XCircle,
|
XCircle,
|
||||||
Zap,
|
Zap,
|
||||||
PlaySquare
|
PlaySquare,
|
||||||
|
Wrench,
|
||||||
} from "lucide-react";
|
} from "lucide-react";
|
||||||
import { FaApple, FaGithub } from "react-icons/fa";
|
import { FaApple, FaGithub } from "react-icons/fa";
|
||||||
import { AWSIcon } from "../icons/AWS";
|
import { AWSIcon } from "../icons/AWS";
|
||||||
|
|
@ -150,7 +151,7 @@ import { AnthropicIcon } from "../icons/Anthropic";
|
||||||
import { AstraDBIcon } from "../icons/AstraDB";
|
import { AstraDBIcon } from "../icons/AstraDB";
|
||||||
import { AzureIcon } from "../icons/Azure";
|
import { AzureIcon } from "../icons/Azure";
|
||||||
import { BingIcon } from "../icons/Bing";
|
import { BingIcon } from "../icons/Bing";
|
||||||
import { BotMessageSquareIcon} from "../icons/BotMessageSquare";
|
import { BotMessageSquareIcon } from "../icons/BotMessageSquare";
|
||||||
import { ChromaIcon } from "../icons/ChromaIcon";
|
import { ChromaIcon } from "../icons/ChromaIcon";
|
||||||
import { CohereIcon } from "../icons/Cohere";
|
import { CohereIcon } from "../icons/Cohere";
|
||||||
import { ElasticsearchIcon } from "../icons/ElasticsearchStore";
|
import { ElasticsearchIcon } from "../icons/ElasticsearchStore";
|
||||||
|
|
@ -518,4 +519,5 @@ export const nodeIconsLucide: iconsType = {
|
||||||
ArrowBigUp,
|
ArrowBigUp,
|
||||||
Dot,
|
Dot,
|
||||||
RotateCcw,
|
RotateCcw,
|
||||||
|
Wrench,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue