kasecato / vscode-intellij-idea-keybindings

Port of IntelliJ IDEA key bindings for VS Code.
https://marketplace.visualstudio.com/items?itemName=k--kato.intellij-idea-keybindings
MIT License
817 stars 135 forks source link

Reformat code "ctrl + alt + l" is not working, instead it inserts character 'ø' #254

Open victordfb opened 2 years ago

victordfb commented 2 years ago

When I use reformat shortcut, it is inserting this character 'ø' instead of actually reformating the code.

It happens with or without selection.

I'm using Visual Studio Code in Windows 10 but the project is inside WSL 2 enviroment and VS Code connected to it.

MartijnGevaert commented 2 years ago

I'm having the same issue, but it is likely caused by vscode itself, not this extension: https://github.com/microsoft/vscode/issues/68787

victordfb commented 2 years ago

Actually, the shortcut came back to work. @mggevaer It seems that the problem really was what you commented

MartijnGevaert commented 2 years ago

@victordfb For me most of the time it works on pc startup, and after some time, on some days, I notice it stops working. Not sure what triggers it. So don't be surprised if you see the issue coming back (unless you switched keyboard language).

I have "US keyboard international" as default on Windows 10, and "US keyboard" as backup whenever the shortcut stops working. I don't lose that many buttons by switching to the wrong keyboard in Windows anyway.

Mardenf commented 2 years ago

https://github.com/microsoft/vscode/issues/68787#issuecomment-1157343210

misterabdul commented 1 year ago

Not exactly the same, but what happens to me today when I press Ctrl+Alt+L, it just doesn't do the reformatting. Then I realize there was a new version update (v1.5.3) lately. After reverting back to the previous version (v1.5.2), Ctrl+Alt+L behaviour is back to normal again. I'm on Fedora 36.

hiteshbaliyan commented 7 months ago

If you encounter issues with keyboard shortcuts, specifically Ctrl + Alt + L adding a weird character in Visual Studio Code, it may be related to having the keyboard layout set to India(QWERTY) instead of US(QWERTY). I faced a similar problem and found a solution on Stack Overflow.

You can find the solution and discussions related to this issue on Stack Overflow.

bbm124115 commented 6 months ago

Problem still exist : When I have Keyboard set to English (India) in windows 10 :

image

Ctrl + Alt + L adds this special character. I use it for formatting files , it works perfectly in PHPStorm and other applications but VS Code add this special character.

image

This solution works : https://stackoverflow.com/questions/54093453/vscode-ctrl-alt-l-adds-weird-character-need-to-get-rid-of-it

kasecato commented 5 months ago

This seems to be related to the Language setting of VSCode and Windows; when I selected English (India) in Windows, special characters were entered by ctrl+alt+l