9

So, I recently installed Visual Studio Code(1.40.0) on Windows 10. Everything was working fine as I was working around to see how to run Python Code, I installed Python extension, pylint, Auto PEP-8 formatter, code-runner extension and I was being able to run code just fine using keyboard shortcut Ctrl-Alt-N. Then I also tried to see if I could use MSVC compiler to run C code and it wasn't to my satisfaction of VSCode, but then all of a sudden the keyboard shortcut to run code stopped working.

Now if I press Ctrl-Alt-N, all it gives in the editor window, is this symbol 'ṇ'.

I have tried reinstalling VSCode, deleting base configuration files(.json), reinstalling python extension, but problem still persists. One more thing I was thinking about was that I updated pip from the VS terminal, but I am not sure if it was at that point that the shortcut stopped working. I can run code fine using the run code icon or from command bar, but cannot do the same with the shortcut. Can anyone help out?

Update: I even tried re-configuring the keyboard shortcut, but it won't take Ctrl-Alt-N from the user, it defaults to 'n'.

5 Answers 5

4

Steps to fix:

  • Go to 'Advanced keyboard settings'. Ensure the drop-down menu option under 'Override for default input method' is set to 'Use language list (Recommended)'.
  • Go to 'Language settings', Make sure under 'Preferred languages', first option is set to 'English (United States)'. Click on it. Click on 'Options'.
  • Under 'Keyboards', remove whatever keyboard is there, and add 'US' keyboard instead.

It should be fixed now.

I believe the offending keyboard is 'English (India)', because the 'ṇ' character (and you can produce other such 'weird' characters with Ctrl+Alt+) is a Devanagari transliteration character used to write phonetically correct Devanagari words in Romanized form.

2

You are not the only one. See the following bug reports:

The fixes that worked for some people:

  • Rebooting the computer was the simplest fix
  • Assigning this command another key-combination (link)
6
  • Yes I came across these, but what surprised me was that it was working fine just a few minutes ago. I don't know what could have changed.
    – Arko
    Commented Nov 12, 2019 at 12:11
  • Also I did try rebooting and reinstalling several times, and what seems to me from the other reports is that, the people in concern are getting no response at all from the shortcut, while I am getting this weird 'ṇ' symbol with a dot beneath in the editor.
    – Arko
    Commented Nov 12, 2019 at 12:14
  • The weird 'ṇ' is mentioned in a couple of the above links. I don't know why it happens, it may even be caused by a Windows update. I really don't think that this problem is worth reinstalling software as it is simple to solve by changing the shortcut. If you prefer keeping Ctrl-Alt-N, you could use a key-mapping product such as AutoHotkey to remap Ctrl-Alt-N to the new VSCode shortcut.
    – harrymc
    Commented Nov 12, 2019 at 12:58
  • This issue seems to indicate it's a bug introduced by a conflict with recent Windows update: github.com/platformio/platformio-vscode-ide/issues/607
    – AMtwo
    Commented Nov 12, 2019 at 12:59
  • @AMtwo: It may pertain to some localized versions of Windows, because I can't duplicate the problem at my end.
    – harrymc
    Commented Nov 12, 2019 at 13:04
2

Make sure to select English US Keyboard. To change the type of the keyboard press (win+space) and select English US Keyboard and then (ctrl+alt+n) will run the code.

0
  1. GO to File -> preferences -> Keyboard Shortcuts and open it.
  2. Search for code runner something like this enter image description here

3.Then click on the pencil icon and change the shortcut key to anything suitable for you !!

0

You need to install/re-install the Code Runner extension otherwise you have to manually select a debugger all the time you hit run...

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .