Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
victordfb opened this issue Mar 11, 2022 · 8 comments

Comments

@victordfb
Copy link

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.

@victordfb victordfb changed the title Reformat code "ctrl + alt + l" not working, instead it insert character 'ø' Reformat code "ctrl + alt + l" is not working, instead it inserts character 'ø' Mar 11, 2022
@mggevaer
Copy link

mggevaer commented Apr 3, 2022

I'm having the same issue, but it is likely caused by vscode itself, not this extension:
microsoft/vscode#68787

@victordfb
Copy link
Author

victordfb commented Apr 4, 2022

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

@mggevaer
Copy link

mggevaer commented Apr 4, 2022

@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
Copy link

Mardenf commented Jul 24, 2022

@kasecato kasecato self-assigned this Jul 27, 2022
@misterabdul
Copy link

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
Copy link

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
Copy link

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
Copy link
Owner

kasecato commented Mar 9, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants