Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature request: Add support for calling preventdefault from Hotkeys #362

Closed
skadefro opened this issue Jan 10, 2024 · 1 comment
Closed
Projects

Comments

@skadefro
Copy link
Contributor

Could you add a way to call "preventdefault" when an otkey has been triggered ?

For instance, i have

baklava.commandHandler.registerCommand("SelectAll", {
    canExecute: () => { return true; },
    execute: () => {
      baklava.displayedGraph.selectedNodes = baklava.displayedGraph.nodes;
      return true;
    },
});
baklava.commandHandler.registerHotkey(["Control", "a"], "SelectAll");

This works perfectly, but it also selects everything on the page, witch is super annoying when the designer is hosted on a page with other elements.
Simply passing the event to execute or making it an option to get it called when we call registerCommand would be nice.

@newcat newcat added this to Done but not released in V2 Jan 21, 2024
@newcat
Copy link
Owner

newcat commented Feb 8, 2024

Implemented in v2.4.0

@newcat newcat closed this as completed Feb 8, 2024
@newcat newcat moved this from Done but not released to Done in V2 Feb 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
V2
  
Done
Development

No branches or pull requests

2 participants