Skip to content

Commit

Permalink
github-deploy-action-command_palette
Browse files Browse the repository at this point in the history
  • Loading branch information
github-deploy-action committed Apr 17, 2024
1 parent 87b0079 commit 41a55f5
Show file tree
Hide file tree
Showing 2 changed files with 165 additions and 59 deletions.
178 changes: 129 additions & 49 deletions command_palette/hazel.js

Large diffs are not rendered by default.

46 changes: 36 additions & 10 deletions command_palette/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,25 +50,51 @@

function commandPalleteEvent(action) {
return new CustomEvent('commandPalletteEvent', {
action: action
detail: action
});
}
const customEvent = new CustomEvent('myCustomEvent', {
detail: {
// You can include any relevant data here
}
});


const hotkeys = [
{
id: "Go To Definition",
title: "Go to Definition",
hotkey: "cmd+b",
mdIcon: "arrow_forward",
handler: () => {
console.log("Going to Definition");
document.dispatchEvent(commandPalleteEvent("go-to-definition"));
var foo = commandPalleteEvent("go-to-definition")
console.log(foo);
document.dispatchEvent(foo);
}
},
{
id: "Proceed To Next Hole",
title: "Proceed To Next Hole",
mdIcon: "arrow_forward",
handler: () => {
document.dispatchEvent(commandPalleteEvent("proceed-to-next-hole"));
}
},
{
id: "Undo",
title: "Undo",
mdIcon: "undo",
handler: () => {
document.dispatchEvent(commandPalleteEvent("undo"));
}
},
{
id: "Redo",
title: "Redo",
mdIcon: "redo",
handler: () => {
document.dispatchEvent(commandPalleteEvent("redo"));
}
},
{
id: "Reparse Current Editor",
title: "Reparse Current Editor",
mdIcon: "refresh",
handler: () => {
document.dispatchEvent(commandPalleteEvent("reparse-current-editor"));
}
}
];
Expand Down

0 comments on commit 41a55f5

Please sign in to comment.