├── .gitattributes ├── .gitignore ├── .vscode └── launch.json ├── .vscodeignore ├── CODE_OF_CONDUCT.md ├── LICENSE ├── README.md ├── SECURITY.md ├── SUPPORT.md ├── build └── pipeline.yml ├── icon.png ├── package-lock.json └── package.json /.gitattributes: -------------------------------------------------------------------------------- 1 | # Set default behavior to automatically normalize line endings. 2 | * text=auto 3 | 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | *.vsix 3 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | // A launch configuration that launches the extension inside a new window 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | { 6 | "version": "0.2.0", 7 | "configurations": [ 8 | { 9 | "name": "Extension", 10 | "type": "extensionHost", 11 | "request": "launch", 12 | "args": [ 13 | "--extensionDevelopmentPath=${workspaceFolder}" 14 | ] 15 | } 16 | ] 17 | } -------------------------------------------------------------------------------- /.vscodeignore: -------------------------------------------------------------------------------- 1 | .vscode/** 2 | .vscode-test/** 3 | .gitignore 4 | vsc-extension-quickstart.md 5 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Microsoft Open Source Code of Conduct 2 | 3 | This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). 4 | 5 | Resources: 6 | 7 | - [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/) 8 | - [Microsoft Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) 9 | - Contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with questions or concerns 10 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) Microsoft Corporation. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Jupyter Keymaps Extension for Visual Studio Code 2 | 3 | This extension provides keymaps for notebooks in Visual Studio Code to match the keybindings in [Jupyter Notebook](https://jupyter.org). This extension comes with the [Jupyter extension for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=ms-toolsai.jupyter) and can be disabled or uninstalled. 4 | 5 | ## Contributing 6 | 7 | This project welcomes contributions and suggestions. Most contributions require you to agree to a 8 | Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us 9 | the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com. 10 | 11 | When you submit a pull request, a CLA bot will automatically determine whether you need to provide 12 | a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions 13 | provided by the bot. You will only need to do this once across all repos using our CLA. 14 | 15 | This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). 16 | For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or 17 | contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. 18 | 19 | ## Trademarks 20 | 21 | This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft 22 | trademarks or logos is subject to and must follow 23 | [Microsoft's Trademark & Brand Guidelines](https://www.microsoft.com/en-us/legal/intellectualproperty/trademarks/usage/general). 24 | Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. 25 | Any use of third-party trademarks or logos are subject to those third-party's policies. 26 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | ## Security 4 | 5 | Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/). 6 | 7 | If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://docs.microsoft.com/en-us/previous-versions/tn-archive/cc751383(v=technet.10)), please report it to us as described below. 8 | 9 | ## Reporting Security Issues 10 | 11 | **Please do not report security vulnerabilities through public GitHub issues.** 12 | 13 | Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://msrc.microsoft.com/create-report). 14 | 15 | If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://www.microsoft.com/en-us/msrc/pgp-key-msrc). 16 | 17 | You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://www.microsoft.com/msrc). 18 | 19 | Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue: 20 | 21 | * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.) 22 | * Full paths of source file(s) related to the manifestation of the issue 23 | * The location of the affected source code (tag/branch/commit or direct URL) 24 | * Any special configuration required to reproduce the issue 25 | * Step-by-step instructions to reproduce the issue 26 | * Proof-of-concept or exploit code (if possible) 27 | * Impact of the issue, including how an attacker might exploit the issue 28 | 29 | This information will help us triage your report more quickly. 30 | 31 | If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://microsoft.com/msrc/bounty) page for more details about our active programs. 32 | 33 | ## Preferred Languages 34 | 35 | We prefer all communications to be in English. 36 | 37 | ## Policy 38 | 39 | Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://www.microsoft.com/en-us/msrc/cvd). 40 | 41 | -------------------------------------------------------------------------------- /SUPPORT.md: -------------------------------------------------------------------------------- 1 | # TODO: The maintainer of this repo has not yet edited this file 2 | 3 | **REPO OWNER**: Do you want Customer Service & Support (CSS) support for this product/project? 4 | 5 | - **No CSS support:** Fill out this template with information about how to file issues and get help. 6 | - **Yes CSS support:** Fill out an intake form at [aka.ms/spot](https://aka.ms/spot). CSS will work with/help you to determine next steps. More details also available at [aka.ms/onboardsupport](https://aka.ms/onboardsupport). 7 | - **Not sure?** Fill out a SPOT intake as though the answer were "Yes". CSS will help you decide. 8 | 9 | *Then remove this first heading from this SUPPORT.MD file before publishing your repo.* 10 | 11 | # Support 12 | 13 | ## How to file issues and get help 14 | 15 | This project uses GitHub Issues to track bugs and feature requests. Please search the existing 16 | issues before filing new issues to avoid duplicates. For new issues, file your bug or 17 | feature request as a new Issue. 18 | 19 | For help and questions about using this project, please **REPO MAINTAINER: INSERT INSTRUCTIONS HERE 20 | FOR HOW TO ENGAGE REPO OWNERS OR COMMUNITY FOR HELP. COULD BE A STACK OVERFLOW TAG OR OTHER 21 | CHANNEL. WHERE WILL YOU HELP PEOPLE?**. 22 | 23 | ## Microsoft Support Policy 24 | 25 | Support for this **PROJECT or PRODUCT** is limited to the resources listed above. 26 | -------------------------------------------------------------------------------- /build/pipeline.yml: -------------------------------------------------------------------------------- 1 | trigger: 2 | branches: 3 | include: 4 | - main 5 | pr: none 6 | 7 | resources: 8 | repositories: 9 | - repository: templates 10 | type: github 11 | name: microsoft/vscode-engineering 12 | ref: main 13 | endpoint: Monaco 14 | 15 | parameters: 16 | - name: publishExtension 17 | displayName: 🚀 Publish Extension 18 | type: boolean 19 | default: false 20 | 21 | extends: 22 | template: azure-pipelines/extension/stable.yml@templates 23 | parameters: 24 | publishExtension: ${{ parameters.publishExtension }} 25 | buildSteps: 26 | - script: npm i -g npm@8.15.1 27 | displayName: npm install npm@8.15.1 28 | 29 | tsa: 30 | config: 31 | areaPath: 'Visual Studio Code Jupyter Extensions' 32 | serviceTreeID: '14f24efd-b502-422a-9f40-09ea7ce9cf14' 33 | enabled: true 34 | -------------------------------------------------------------------------------- /icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/vscode-jupyter-keymap/e7e35afffaf7e08f2289f2cb2048ddeffa776f3c/icon.png -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jupyter-keymap", 3 | "version": "1.2.0", 4 | "lockfileVersion": 2, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "name": "jupyter-keymap", 9 | "version": "1.2.0", 10 | "license": "MIT", 11 | "engines": { 12 | "vscode": "^1.80.0" 13 | } 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jupyter-keymap", 3 | "publisher": "ms-toolsai", 4 | "author": { 5 | "name": "Microsoft Corporation" 6 | }, 7 | "license": "MIT", 8 | "icon": "icon.png", 9 | "galleryBanner": { 10 | "color": "#ffffff", 11 | "theme": "light" 12 | }, 13 | "displayName": "Jupyter Keymap", 14 | "description": "Jupyter keymaps for notebooks", 15 | "version": "1.2.0", 16 | "engines": { 17 | "vscode": "^1.80.0" 18 | }, 19 | "repository": { 20 | "type": "git", 21 | "url": "https://github.com/Microsoft/vscode-jupyter-keymap" 22 | }, 23 | "bugs": { 24 | "url": "https://github.com/Microsoft/vscode-jupyter-keymap/issues" 25 | }, 26 | "categories": [ 27 | "Notebooks" 28 | ], 29 | "keywords": [ 30 | "notebook-keymap" 31 | ], 32 | "contributes": { 33 | "keybindings":[ 34 | { 35 | "key": "F", 36 | "when": "notebookEditorFocused && !inputFocus && !notebookOutputInputFocused", 37 | "command": "notebook.find" 38 | }, 39 | { 40 | "key": "K", 41 | "when": "notebookEditorFocused && !inputFocus && !notebookOutputInputFocused", 42 | "command": "list.focusUp" 43 | }, 44 | { 45 | "key": "J", 46 | "when": "notebookEditorFocused && !inputFocus && !notebookOutputInputFocused", 47 | "command": "list.focusDown" 48 | }, 49 | { 50 | "key": "A", 51 | "when": "notebookEditorFocused && !inputFocus && !notebookOutputInputFocused", 52 | "command": "notebook.cell.insertCodeCellAboveAndFocusContainer" 53 | }, 54 | { 55 | "key": "B", 56 | "when": "notebookEditorFocused && !inputFocus && !notebookOutputInputFocused", 57 | "command": "notebook.cell.insertCodeCellBelowAndFocusContainer" 58 | }, 59 | { 60 | "key": "D D", 61 | "when": "notebookEditorFocused && !inputFocus && !notebookOutputInputFocused", 62 | "command": "notebook.cell.delete" 63 | }, 64 | { 65 | "key": "Z", 66 | "when": "notebookEditorFocused && !inputFocus && !notebookOutputInputFocused", 67 | "command": "undo" 68 | }, 69 | { 70 | "key": "S", 71 | "when": "notebookEditorFocused && !inputFocus && !notebookOutputInputFocused", 72 | "command": "workbench.action.files.save" 73 | }, 74 | { 75 | "key": "C", 76 | "when": "notebookEditorFocused && !inputFocus && !notebookOutputInputFocused", 77 | "command": "notebook.cell.copy" 78 | }, 79 | { 80 | "key": "X", 81 | "when": "notebookEditorFocused && !inputFocus && !notebookOutputInputFocused", 82 | "command": "notebook.cell.cut" 83 | }, 84 | { 85 | "key": "V", 86 | "when": "notebookEditorFocused && !inputFocus && !notebookOutputInputFocused", 87 | "command": "notebook.cell.paste" 88 | }, 89 | { 90 | "key": "shift+L", 91 | "when": "notebookEditorFocused && !inputFocus && !notebookOutputInputFocused", 92 | "command": "notebook.toggleLineNumbers" 93 | }, 94 | { 95 | "key": "O", 96 | "when": "notebookEditorFocused && !inputFocus && !notebookOutputInputFocused", 97 | "command": "notebook.cell.toggleOutputs" 98 | }, 99 | { 100 | "key": "L", 101 | "when": "notebookEditorFocused && !inputFocus && !notebookOutputInputFocused", 102 | "command": "notebook.cell.toggleLineNumbers" 103 | }, 104 | { 105 | "key": "ctrl+shift+-", 106 | "when": "editorTextFocus && inputFocus && notebookEditorFocused && !notebookOutputInputFocused", 107 | "command": "notebook.cell.split" 108 | }, 109 | { 110 | "key": "ctrl+enter", 111 | "when": "!inlineChatVisible && notebookCellListFocused", 112 | "command": "notebook.cell.executeAndFocusContainer" 113 | }, 114 | { 115 | "key": "shift+enter", 116 | "when": "editorTextFocus && inputFocus && notebookEditorFocused && !inlineChatFocused || notebookCellListFocused && notebookCellType == 'code' && !inlineChatFocused", 117 | "command": "notebook.cell.executeAndSelectBelow" 118 | }, 119 | { 120 | "win": "ctrl+alt+enter", 121 | "linux": "ctrl+alt+enter", 122 | "when": "inlineChatHasProvider && inlineChatVisible && !inlineChatDocumentChanged || inlineChatHasProvider && inlineChatVisible && config.inlineChat.editMode != 'preview'", 123 | "command": "interactive.acceptChanges" 124 | } 125 | ] 126 | } 127 | } --------------------------------------------------------------------------------