MCPcopy Create free account
hub / github.com/continuedev/continue / isMetaEquivalentKeyPressed

Function isMetaEquivalentKeyPressed

gui/src/util/index.ts:20–34  ·  view source on GitHub ↗
({
  metaKey,
  ctrlKey,
}: KeyboardEvent | ReactKeyboardEvent)

Source from the content-addressed store, hash-verified

18}
19
20export function isMetaEquivalentKeyPressed({
21 metaKey,
22 ctrlKey,
23}: KeyboardEvent | ReactKeyboardEvent): boolean {
24 const platform = getPlatform();
25 switch (platform) {
26 case "mac":
27 return metaKey;
28 case "linux":
29 case "windows":
30 return ctrlKey;
31 default:
32 return metaKey;
33 }
34}
35
36export function getMetaKeyLabel(): string {
37 return getPlatform() === "mac" ? "⌘" : "Ctrl";

Callers 6

handleKeyDownFunction · 0.90
InputToolbarFunction · 0.90
handleKeyDownFunction · 0.90
handleKeyDownFunction · 0.90
handleKeyDownFunction · 0.90
listenerFunction · 0.90

Calls 1

getPlatformFunction · 0.70

Tested by

no test coverage detected