# VS Code Keybinding

**URL:** https://discourse.julialang.org/t/vs-code-keybinding/71992
**Category:** VS Code
**Created:** [November 24, 2021, 3:43am UTC](https://discourse.julialang.org/t/vs-code-keybinding/71992 "2021-11-24T03:43:49Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![flin](https://avatars.discourse-cdn.com/v4/letter/f/9dc877/32.png) [@flin](https://discourse.julialang.org/u/flin)
#### Post date: [November 24, 2021, 3:43am UTC](https://discourse.julialang.org/t/vs-code-keybinding/71992/1 "2021-11-24T03:43:49Z")

</div>

Hello,

I am wondering if there is a way to change the behavior of ctrl + Enter in later versions to match that in version 1.4.3 (i.e. copying the current line or selected lines to REPL and evaluating it). I understand that this change is probably part of the effort to match the behavior of keybindings in the Notebook, but I personally prefer the previous mode. For instance, if the line being executed is a line within a function, the full function will be evaluated now, but many times I really just want to evaluate that single line and ctrl + Enter in version 1.4.3 will do the job perfectly.  
Thank you!

Best

---

<div class="post-metadata">

### Author: ![wfrgra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wfrgra/32/10702_2.png) [@wfrgra](https://discourse.julialang.org/u/wfrgra)
#### Post date: [November 24, 2021, 4:06am UTC](https://discourse.julialang.org/t/vs-code-keybinding/71992/2 "2021-11-24T04:06:54Z")

</div>

Yes, in File-\>Preferences-\>Keyboard Shortcuts, add Ctrl-Enter to Julia: Send Current Line or Selection to REPL and remove it from the conflicting Julia command.  
I agree that this is useful action and having a keyboard shortcut in the default settings would be a good thing

---

<div class="post-metadata">

### Author: ![flin](https://avatars.discourse-cdn.com/v4/letter/f/9dc877/32.png) [@flin](https://discourse.julialang.org/u/flin)
#### Post date: [November 24, 2021, 4:36am UTC](https://discourse.julialang.org/t/vs-code-keybinding/71992/3 "2021-11-24T04:36:48Z")

</div>

Thanks for your reply! This was very helpful.  
For future reference, I added the following lines (from [ver. 1.4.3](https://github.com/julia-vscode/julia-vscode/blob/0a7bc2b9c73ccb016f3d1d0a959aa279b99988ee/package.json)) to user’s keybindings.json:

```julia
    {
        "command": "language-julia.executeJuliaCodeInREPL",
        "key": "ctrl+Enter",
        "when": "editorTextFocus && editorLangId == julia || editorLangId == juliamarkdown && activeEditor != workbench.editor.notebook"
    }

```

This then overrides the default behavior.
