visual-studio-codevscode-code-runner

How to edit the shortcut for runnig code in visual studio code with code runner (Ctrl+Alt+N)


How can I change the shortcut used in visual studio code after installing code runner. Current shortcut Ctrl+Alt+N. I want to change it to something like F5 or Switch + Enter or any other easier one.

enter image description here

This is how to run the code:

enter image description here

How can I change that shortcut?


Solution

    1. Go to settings ----(On the bottom left of your screen on vs code, click on the cog)
    2. Click on keyboard shortcuts
    3. Search the term "Run code" in the search bar ----(you'll see the text "code-runner.run" under the command)
    4. Hover over this field and then either right click or click on the pencil icon that shows up to change keybinding
    5. Change details and enter

    Alternatively you could directly search up the keys involved in the shortcut. Here you could have searched up the term "ctrl alt n" to get to your command in a more convenient fashion ----(if you do not know which keywords are associated with your particular shortcut, then you may just search up the interfering keys)