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

Mac OS Keyboard shortcut for formatting a document not working #142261

Closed
abhinavganguly1987 opened this issue Feb 5, 2022 · 8 comments
Closed
Assignees
Labels
info-needed Issue requires more information from poster

Comments

@abhinavganguly1987
Copy link

Issue Type: Bug

Hi Team,
Lately i've obeserved that on Mac OS, keyboard shortcut of "Shift+Option+F" to format a document is not working, instead it is adding a tilde ~ symbol in the file at the point of current cursor position.

If i do --> right click --> format document with ... --> HTML language features.
It formats the document.
This is happening with all types of files, currently in my project i have HTML. Markdown, CSS, toml and javascript files.

Appreciate your help..
Regards,
Abhinav

VS Code version: Code 1.64.0 (Universal) (5554b12, 2022-02-03T04:20:17.224Z)
OS version: Darwin x64 21.3.0
Restricted Mode: No

System Info
Item Value
CPUs Intel(R) Core(TM) i7-6820HQ CPU @ 2.70GHz (8 x 2700)
GPU Status 2d_canvas: enabled
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
webgl: enabled
webgl2: enabled
Load (avg) 1, 1, 1
Memory (System) 16.00GB (4.43GB free)
Process Argv --crash-reporter-id 96855504-5e89-44f6-a263-70d4435ba3cf
Screen Reader no
VM 0%
Extensions (7)
Extension Author (truncated) Version
language-hugo-vscode bud 1.3.1
better-toml bun 0.3.2
prettier-vscode esb 9.2.0
vetur oct 0.35.0
prettyxml Pra 1.4.0
svg-preview Sim 2.8.3
markdown-all-in-one yzh 3.4.0
A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythonvspyl392:30425749
pythontb:30283811
pythonvspyt551:30345470
pythonptprofiler:30281270
vshan820:30294714
vstes263cf:30335440
pythondataviewer:30285071
vscod805:30301674
pythonvspyt200:30340761
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593:30376534
vsc1dsc:30433058
pythonvs932:30410667
vs360cf:30404996
vsrem710cf:30416617

@chrmarti
Copy link
Collaborator

chrmarti commented Feb 7, 2022

/needsMoreInfo

Does this occur with all extensions disabled? (F1 > Developer: Reload With Extensions Disabled or code --disable-extensions)

@chrmarti chrmarti assigned alexdima and unassigned chrmarti Feb 7, 2022
@abhinavganguly1987
Copy link
Author

abhinavganguly1987 commented Feb 7, 2022

Hi @chrmarti
Thank you for your reply,
Yes, i've already tried with the 'Reload with Extension Disabled as well'
Unfortunately, issue persists, if you want i can send you a screenrecord of the issue

@alexdima
Copy link
Member

Let's first try to find out what command executes on your machine, with your settings and your keybindings when pressing Shift+Option+F. Could you please try the following:

  • Run the command Developer: Toggle Keyboard Shortcuts Troubleshooting
  • This will activate logging of dispatched keyboard shortcuts and will open an output panel with the corresponding log file.
  • Press exactly the keybinding you desire.
  • check what VS Code detects and what command is invoked.

If you are having trouble understanding the output, please feel free to paste here and I can try to help.

@abhinavganguly1987
Copy link
Author

abhinavganguly1987 commented Feb 24, 2022

Hello @alexdima
Thank you for your steps, and apologied for delayed response.
I've followed your mentioned troubleshooting steps, and this is the outcome:
image

Andy thing that i need to change here?

Also would you please reopne this issue ?
Many thanks for your help

@abhinavganguly1987
Copy link
Author

abhinavganguly1987 commented Feb 24, 2022

Ah

vs_code_macOS_bug.mov

hey @alexdima i think i found the root cause.
It seems that VS code has a bug with ABC-India keyboard layout. If i toggle it to English keyboard layout, the format shortcut Shift+⎇(option)+ F works.
For now, i can do with English keyboard, it is only when i need to use INR symbol like Rupee, i might have to toggle keyboard layout.
Is there any fix for this?
Im attaching the screen recording for your reference.

Thanks for your help

@alexdima
Copy link
Member

Thank you for the extra information. This has been reported before and is an upstream issue. Let's track at #41024 .

@github-actions github-actions bot locked and limited conversation to collaborators Apr 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

4 participants
@alexdima @chrmarti @abhinavganguly1987 and others