import { Action, ActionPanel, Detail } from "@raycast/api";
export default function Command() {
return (
<Detail
markdown="Let's play some games 👾"
actions={
<ActionPanel title="Game controls">
<Action title="Up" shortcut={{ modifiers: ["opt"], key: "arrowUp" }} onAction={() => console.log("Go up")} />
<Action
title="Down"
shortcut={{ modifiers: ["opt"], key: "arrowDown" }}
onAction={() => console.log("Go down")}
/>
<Action
title="Left"
shortcut={{ modifiers: ["opt"], key: "arrowLeft" }}
onAction={() => console.log("Go left")}
/>
<Action
title="Right"
shortcut={{ modifiers: ["opt"], key: "arrowRight" }}
onAction={() => console.log("Go right")}
/>
</ActionPanel>
}
/>
);
}
KeyEquivalent: "a" |
"b" |
"c" |
"d" |
"e" |
"f" |
"g" |
"h" |
"i" |
"j" |
"k" |
"l" |
"m" |
"n" |
"o" |
"p" |
"q" |
"r" |
"s" |
"t" |
"u" |
"v" |
"w" |
"x" |
"y" |
"z" |
"0" |
"1" |
"2" |
"3" |
"4" |
"5" |
"6" |
"7" |
"8" |
"9" |
"." |
"," |
";" |
"=" |
"+" |
"-" |
"[" |
"]" |
"{" |
"}" |
"«" |
"»" |
"(" |
")" |
"/" |
"\\" |
"'" |
"`" |
"§" |
"^" |
"@" |
"$" |
"return" |
"delete" |
"deleteForward" |
"tab" |
"arrowUp" |
"arrowDown" |
"arrowLeft" |
"arrowRight" |
"pageUp" |
"pageDown" |
"home" |
"end" |
"space" |
"escape" |
"enter" |
"backspace";
KeyModifier: "cmd" | "ctrl" | "opt" | "shift";