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

Keyboard Shortcuts: Extend shortcuts API to cover Monaco and DOM shortcuts. #273

Open
seanparsons opened this issue Jul 16, 2020 · 3 comments

Comments

@seanparsons
Copy link
Contributor

Add in support for the non-React related parts of the editor. For Monaco we’ll need something that maps onto the API for that given a set of shortcuts we want to integrate.

// Invocation would be something like this:
addMonacoShortcuts(editor, {
  [DELETE_ELEMENTS_SHORTCUT]: () => {
    this.editorDispatch(deleteElements(this.selectedViews))
  }
})

// Within addMonacoShortcuts for each shortcut something like this would be executed:
editor.addCommand(makeMonacoShortcut(shortcut.defaultShortcut), shortcutAction)
@maltenuhn
Copy link
Member

Does this mean that we need to map every shortcut defined in the Monaco keybindings? Or the inverse - only map those non-Monaco shortcuts we want to work from within Monaco?
image

@seanparsons
Copy link
Contributor Author

seanparsons commented Jul 17, 2020

@maltenuhn We've defined some shortcuts that we add to Monaco. This work is to make those configurable.

@maltenuhn
Copy link
Member

Ah ok, got it @seanparsons . Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants