简体   繁体   中英

Add custom keyboard shortcuts to VS Code Jupyter extension

Is there a way to add custom keyboard shortcuts to the VS Code Jupyter extension?

To give you some context, I wanted to change the CopyLinewsDownAction from Alt+Shift+Down to Ctrl+Shift+d

I was able to change the keybinding for most of the editors with

{
  "key": "ctrl+shift+d",
  "command": "editor.action.copyLinesDownAction",
  "when": "editorTextFocus && !editorReadonly"
}

but this does not change the shortcut in the notebooks.

I tried also to change the keybinding

{
  "key": "shift+alt+down",
  "command": "notebook.cell.copyDown",
  "when": "notebookEditorFocused && !inputFocus"
}

but without success.

Customized keyboard shortcuts for VS Code Jupyter notebooks are only supported in the preview native notebooks interface. If you're interested in trying it out, please follow these directions: https://devblogs.microsoft.com/python/notebooks-are-getting-revamped/#how-to-try-out-native-notebooks

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM