-
Notifications
You must be signed in to change notification settings - Fork 30.3k
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
Shift+Option+F does not work on US extended kb layout #8914
Comments
If you open the Developer Tools, do you see any errors there? Does running the What are the contents of your keybindings file? |
@hafuta Also what appears when you go to customize keybindings and use the |
I just reported about the same issue but just for typescript .tsx files under certain circumstances but with concrete sourcefile that make is repro possible - weee :) |
@joaomoreno @alexandrudima You see, It seems like, vscode only add some spaces around brackets, letters, commas etc. I opened vscode's ChromeDevTools, but not error msg showed. |
I think that is how tsserver decides to format. The fact that the whitespace changes indicates the integration works correctly and that tsserver simply decides to not insert newlines. Perhaps @dbaeumer knows of some config options that might help. |
But if I have this file(see the first line of this file) Then I use code to fromat, I get this I upload my file |
@treri to help tracking this down, can you please enable tsserver tracing using the following setting: "typescript.tsserver.trace": "verbose" Then switch to the output view and select the TypeScript channel and format. Could you provide the created trace? |
@dbaeumer step: just use code to format the uglified js file. |
Maybe you can use my uploaded file to reproduce? |
@dbaeumer
|
@joaomoreno please see attached screen recording with the developer tools on the right side. @alexandrudima I've also tried using the Define keybinding widget to define different key combination, same thing, it identifies the keys correctly but does not work. At the moment I've installed beautify plugin in order to have the format functionality until I'll understand the issue with the built-in feature. My keybindings.json content is: Thanks |
Any progress on this issue? |
Was on vacation for two weeks. |
@treri for your issue I created microsoft/TypeScript#10126 to track this since it is a TS/JS server issue. Assigning this issue back since the original reported problem from @hafuta is not addressed by this. |
@hafuta Any more information from you? -- otherwise I will close this issue. |
@ramamurthynagaraj What keyboard layout do you use? Do you press |
I think this depends on the configured keyboard input system. Using the U.S. layout, Shift-Option-f is the shortcut for the Ï (LATIN CAPITAL LETTER I WITH DIAERESIS). Using the ABC Extended layout, that shortcut starts the process of entering a COMBINING TILDE BELOW with whatever key you hit next. If I enable the default U.S. layout, the default formatting shortcut works instead of inserting an Ï. If I use a different layout, it does not work because the text entry system swallows the keystroke and waits for you to enter the character with which the tilde below will be combined, which is visible but rather subtly as an underlined tilde beneath the cursor. This behaviour is standard across all system text inputs and so I'd guess that VS Code would either need to use a lower-level interface to get the raw keyboard events or simply pick shortcuts which don't conflict. See https://support.apple.com/en-us/HT201236, http://symbolcodes.tlt.psu.edu/accents/codemacext.html, etc. or simply open the keyboard viewer (https://support.apple.com/kb/PH18449) and hold down modifier keys – the combining diacritics will display as orange. |
Ok, so the action for us is to change the default keybinding for format code from |
I have validated that we now (i.e. after PR #22894 aka #17521 -- in today's Insiders build) detect correctly this keypress under the US layout on OSX. Furthermore, I have checked in a JSON file that |
The shift+alt+f keybinding doesn't work for me what steps do I need to do to get it working? |
If your keyboard layout is ABC - extended, shift+option+f goes into composition mode (drive by the OS), similar how composition works for CJK languages. If you don't care about such type of compositions, change your keyboard layout to ABC or pick a language-country keyboard layout that works for you. |
In last few versions the code format feature (shift+alt+f) is not working, I've tried to change to other key combination for the format command but it's not working, when I install v1.0 it seems to work okay, I've tried mainly on JavaScript files but it doesn't seem to work for other types also (css, json).
I don't have any other program who uses this combination or any os command that uses this key combination, I've no installed extensions and I've also tried to load the program with the '--disable-extensions' cli argument.
Thanks
The text was updated successfully, but these errors were encountered: