formulahendry / vscode-code-runner

Code Runner for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=formulahendry.code-runner
MIT License
2.18k stars 291 forks source link

run code hotkey (ctrl + alt + n) doesn't work #286

Closed jasonhuang1115 closed 6 years ago

jasonhuang1115 commented 6 years ago

Hi,

I am running VSCode 1.21.1 on Windows 10. Pretty vanilla installation without much customizations. When pressing ctrl+alt+N, nothing happened in VSCode, not even an error message. Right mouse click to run code and the play button on top right corner to run code work fine.

I tried 4 main hotkeys of Run Code (Ctrl + Alt + J, N, K, M). Only the Ctrl+Alt+M responds but it's due to that hotkey is assigned to send Mel code to Maya.

Anyone experiencing this?

formulahendry commented 6 years ago

send Mel code to Maya

Sorry, I did not get you. Could you explain more? And could you disable all other extension and try again? Sometimes, there is key binding conflict with extensions.

jasonhuang1115 commented 6 years ago

Hi, I have just tried with the mayaPort extension disabled and experienced the same issue. Basically, when I hit ctrl+alt+N, nothing happens. The hotkey doesn't work for me. But if I right-click and click on Run Code, it works fine. Or if I click the "play" button on the top right corner to run code, it works fine too.

formulahendry commented 6 years ago

Could you try updating the key bindings? https://code.visualstudio.com/docs/getstarted/keybindings#_keyboard-shortcuts-editor

jasonhuang1115 commented 6 years ago

So I removed the keybinding for Run Code through the Keyboard Shortcuts (Right click -> Remove keybindings). Now the Run Code keybinding is empty and the source shows User (instead of Default). Then Right click -> Add Keybinding, VSCode wouldn't let me press Ctrl+Alt+n to add the keybinding. I then Right click -> reset keybinding to set it back. Still, after all this, the hotkey still doesn't work... VSCode didn't detect any keybinding conflict for ctrl+alt+n.

formulahendry commented 6 years ago

How about setting other keybinding instead of Ctrl+Alt+n?

jasonhuang1115 commented 6 years ago

I set the keybinding to something else and it works like a charm. Thanks! Not sure why the default keybinding doesn't work though. There is no conflict as far as I can tell.

formulahendry commented 6 years ago

Good to know it is working for other keybinding. Closing this then.

KRSatpute commented 5 years ago

This was working properly for me until recent VSCode update. Now character "ṇ" gets printed even if ctrl+alt+N is mapped to Run Code in key mappings.

This is definitely a issue that needs fixing.

Not working in version 1.31.1. Was working before that.

As mentioned above a different key binding works but default behavior should not change abruptly.

diego-quiroga commented 5 years ago

Found the same issue today. Even the mapping is there it does not work.

falcon97 commented 5 years ago

The key mapping doesn't work after VSCode updated to v1.31.1. The character ṇ gets printed instead. Please fix this issue.

KRSatpute commented 5 years ago

This is happening specifically for ctrl+alt combination keys.... the alternative of mapping a different key binding works fine.

Satanic-temple commented 5 years ago

i got the same problem, by pressing CTRL+ALT+N it showed up a "ṇ" character. but i tried the same old formula. i restarted my system. and guess what ? it worked.

Yinimi commented 4 years ago

Hi, with US international keyboard layout I get an ñ so it is still not completly fixed I guess.

nishnat-rishi commented 4 years ago

This was working properly for me until recent VSCode update. Now character "ṇ" gets printed even if ctrl+alt+N is mapped to Run Code in key mappings.

This is definitely a issue that needs fixing.

Not working in version 1.31.1. Was working before that.

As mentioned above a different key binding works but default behavior should not change abruptly.

Steps to fix:

Search for 'Advanced keyboard settings' in Windows 10 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.

sunny0910 commented 4 years ago

The fix by @nishnat-rishi works. Thanks a lot. Just to add something to his comment, he refers to the 'Advance keyboard settings' of the OS. I spent some considerable time trying to search advance keyboard settings in VSCode, lol.

nishnat-rishi commented 4 years ago

Just to add something to his comment, he refers to the 'Advance keyboard settings' of the OS.

Added the distinction. Thank you! (And although it's a bit too late now, apologies nonetheless!)

paolotormon commented 3 years ago

For me, it's the extension 'Namespace Resolver' that caused this issue. There was a hotkey collision

asif17r commented 3 years ago

Just turn on the NumLock -_-

NikhilKumarJha commented 3 years ago

Just turn on the NumLock -_-

Thank you this is simplest way ..

Master-Faraz commented 3 years ago

Just turn on the NumLock -_-

Thanks bro

ghost commented 3 years ago

Just turn on the NumLock -_-

This worked for me too. But WHY does this work? It makes no sense... if someone knows reply!

sourashis59 commented 3 years ago

The fix by @nishnat-rishi works. Thanks a lot. Just to add something to his comment, he refers to the 'Advance keyboard settings' of the OS. I spent some considerable time trying to search advance keyboard settings in VSCode, lol.

just to add something , if it is not working after changing language settings, then restart the pc, it will work them : )

striver01 commented 3 years ago

We can set another keybinding instead of ctrl+alt+n and that works fine for me.

amit920114 commented 3 years ago

This was working properly for me until recent VSCode update. Now character "ṇ" gets printed even if ctrl+alt+N is mapped to Run Code in key mappings.

This is definitely a issue that needs fixing.

Not working in version 1.31.1. Was working before that.

As mentioned above a different key binding works but default behavior should not change abruptly.

Same issues occurred again i just updated vsc to latest one. 16th July 2021

bhaskart488 commented 3 years ago

This was working properly for me until recent VSCode update. Now character "ṇ" gets printed even if ctrl+alt+N is mapped to Run Code in key mappings. This is definitely a issue that needs fixing. Not working in version 1.31.1. Was working before that. As mentioned above a different key binding works but default behavior should not change abruptly.

Same issues occurred again i just updated vsc to latest one. 16th July 2021

Resolved on 17th July 2021.

Just turn on NumLock :)

Bukangliwayway commented 3 years ago

Switch input language and keyboard layout back using key combinations: windows key + spacebar

ItzYuzuruYT commented 2 years ago

This was working properly for me until recent VSCode update. Now character "ṇ" gets printed even if ctrl+alt+N is mapped to Run Code in key mappings. This is definitely a issue that needs fixing. Not working in version 1.31.1. Was working before that. As mentioned above a different key binding works but default behavior should not change abruptly.

Steps to fix:

Search for 'Advanced keyboard settings' in Windows 10 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.

ty

Akshay-K8 commented 2 years ago

Try with Num lock on and then press the command it will worked for me

filipembcruz commented 2 years ago

I changed the hotkey to (ctrl + alt + b) on File > Preferences > Keyboard Shortcuts

hxrshilgupta commented 2 years ago

I am facing the similar issue discussed above and the sad part is I have tried all fixes I could as mentioned (except for Num Lock coz...I don't have a Num Lock due to a short keyboard [without NUMPAD😔])

RishiK-jpg commented 2 years ago

Hold on! There is a simple solution to this problem. Turn on your Num Lock key and try Cltr+Alt+N . This will solve the issue :)

RishiK-jpg commented 2 years ago

i got the same problem, by pressing CTRL+ALT+N it showed up a "ṇ" character. but i tried the same old formula. i restarted my system. and guess what ? it worked.

Guess what! Turning on your NUM LOCK KEY might solve the problem.

CrescendoFluffy commented 1 year ago

Hi, with US international keyboard layout I get an ñ so it is still not completly fixed I guess.

You should install US QWERTY Keyboard layout it got fixed for me

nandish-nandhu commented 1 year ago

Wow truning the NumLock worked that's GREAT ,thanks ..... :)

ghost commented 10 months ago

Just turn on the NumLock -_-

This worked for me too. But WHY does this work? It makes no sense... if someone knows reply!

NumPad has some cyrillic letters stored in it, so when you turns it on the actual alphabet part of the keyboard goes off