Skip to content

Map CTRL + 0 to View: Reset Zoom #15840

Closed

Description

Right now, the View: Reset Zoom editor command does not have a default keyboard shortcut mapping. To keep consistent with other software, especially Internet browsers such as Internet Explorer, Microsoft Edge, Google Chrome, etc. I'd suggest mapping CTRL + 0 to View: Reset Zoom as a default keyboard shortcut.

Cheers,
Trevor Sullivan
Docker Captain
Microsoft MVP: Cloud & Data Center Management
https://trevorsullivan.net
https://twitter.com/pcgeek86

Activity

  1. added
    keybindings
    feature-request
    on Nov 22, 2016
  2. Tekbr commented on Dec 2, 2016

    @Tekbr

    Similar to issue #14979 ? But I still had no response from alexandrudima !!

  3. pcgeek86 commented on Dec 5, 2016

    @pcgeek86
    Author

    Tekbr thanks for pointing out that issue report. It does appear similar.

  4. alexdima commented on Dec 12, 2016

    @alexdima
    Member
  5. bpasero commented on Dec 12, 2016

    @bpasero
    Contributor

    This keybinding is currently used to focus the sidebar so that you have a nice logical keybinding model of Ctrl+0 being sidebar and Ctrl+1/2/3 to focus an editor group.

  6. pcgeek86 commented on Dec 12, 2016

    @pcgeek86
    Author

    Benjamin Pasero (@bpasero) I recently figured this out. It is convenient to have CTRL + 0 map to the sidebar.

    Do you have an alternative suggestion for how this request could implemented, consistent with other programs?

  7. bpasero commented on Dec 12, 2016

    @bpasero
    Contributor

    Maybe this should go into a keymap extension to make it "consistent" with whatever the extension is about (Sublime, Atom).

  8. added
    *extension-candidate
    on Dec 12, 2016
  9. Tekbr commented on Dec 13, 2016

    @Tekbr

    Benjamin Pasero (@bpasero) Ctrl + Shift + E does the same thing as Ctrl + 0, does not it? I tried on Windws 10, 1.8.0 - insider.

    If so, please change Ctrl + 0 to Reset Zoom. This does not require an extension for this.

  10. bpasero commented on Dec 13, 2016

    @bpasero
    Contributor

    Tekbr no it does not:

    image

  11. Tekbr commented on Dec 13, 2016

    @Tekbr

    Benjamin Pasero (@bpasero) If not, what does Ctrl + Shift + E do? I'm confused now. 😕

    gif4

  12. bpasero commented on Dec 14, 2016

    @bpasero
    Contributor

    Tekbr if opens/focus the explorer view. there are keybindings for each view. Ctrl+0 just moves focus to whatever view is active.

  13. Tekbr commented on Dec 14, 2016

    @Tekbr

    Benjamin Pasero (@bpasero) I do not know if that is what it says: 😕
    The cursor is in the editor, if you press Ctrl + Shift + E once, move to the view explorer, if you press it again "back" the course to the editor.
    Using Ctrl + 0 does not do it right?

    Would that be the difference, or not? If possible show a gif with the difference by pressing the keys.

  14. bpasero commented on Dec 14, 2016

    @bpasero
    Contributor

    Tekbr the difference is that Ctrl+Shift+E (E for EXPLORER) opens the explorer and Ctrl+0 focusses the view that is currently active. Sorry, I am not sure how to explain that any better, maybe someone else can.

  15. 3 remaining items

  16. Tekbr commented on Dec 15, 2016

    @Tekbr

    Benjamin Pasero (@bpasero) Now I see the difference. 😄
    Thank you. And once again I'm sorry. 😊

  17. pcgeek86 commented on Dec 22, 2016

    @pcgeek86
    Author

    In the latest version of VSCode, version 1.8.1, the following changes were added:

    • On Mac OS X, the CMD + NUMPAD 0 keyboard shortcut is bound to View: Reset Zoom
    • On Windows, the CTRL + NUMPAD 0 keyboard shortcut is bound to View: Reset Zoom

    Neither of these are usable though, because:

    • The Macbook Pro does not have a numeric keypad
    • Most Windows laptops don't offer numeric keypads (including my Dell XPS 9350)

    There has got to be a better solution to this, yeah?

  18. Yahkob commented on Feb 14, 2017

    @Yahkob

    Quick fix for those mildly irritated like me add this to preference/keymaps :)

         {
            "key": "cmd+0",
            "command": "workbench.action.zoomReset",
            "when": "editorTextFocus"        
         }
    
  19. alexdima commented on Jun 1, 2017

    @alexdima
    Member

    👍 Jake Harclerode (@Yahkob) Our keybinding system is written in such a way that you can change absolutely everything and this use-case is one of the most simple:

    • Open Preferences > Keyboard Shortcuts
    • Type "zoom"
    • Click the edit icon
    • Record new keybinding
    • Done! ;)

    15840

  20. NinoFloris commented on Jun 6, 2017

    @NinoFloris

    Came here to report this but basically want to write this

    #15840 (comment)

    In the latest version of VSCode, version 1.8.1, the following changes were added:

    On Mac OS X, the CMD + NUMPAD 0 keyboard shortcut is bound to View: Reset Zoom
    On Windows, the CTRL + NUMPAD 0 keyboard shortcut is bound to View: Reset Zoom
    Neither of these are usable though, because:

    The Macbook Pro does not have a numeric keypad
    Most Windows laptops don't offer numeric keypads (including my Dell XPS 9350)
    There has got to be a better solution to this, yeah?

    This is an utterly stupid default binding :')

  21. ldexterldesign commented on Jul 26, 2018

    @ldexterldesign

    Hi Nino Floris (@NinoFloris),

    Since Apple[e] desktop machines ship with a numeric keypad and laptops don't, and assuming all OS X users are using Apple hardware, we would need to know what percentage of OS X users run a desktop vs laptop for this default binding to be confirmed as a poor decision

    Do you know what the percentage split is?

    Disclaimer: I run a Macbook Pro and I do find this default binding strange but I understand there are other (OS X) users with numeric keypads

    Regards

    [e] https://www.apple.com/mac/

  22. gandalfsaxe commented on Aug 14, 2018

    @gandalfsaxe

    Reset zoom have default shortcut of ⌘+Numpad0 is really bad on the Mac. The vast majority of Mac users are surely using Macbook Pro, not Mac/iMac, so we don't have any numpad.

    Just make any default shortcut that is able to be pressed on MBP. Since the conventional ⌘0 is already mapped to workbench.action.focusSideBar, may I suggest ⇧⌘0? It's currently unused in the default keymap 👍

  23. lucascaton commented on Jul 25, 2019

    @lucascaton

    Hi there.
    Any news on this?

  24. bpasero commented on Oct 8, 2019

    @bpasero
    Contributor

    Unfortunately all the keyboard shortcuts with KeyCode.KEY_0 seem to be occupied. Please see #15840 (comment) for a solution by changing this keybinding as needed.

  25. added
    *as-designed
    and removed
    *extension-candidate
    on Oct 8, 2019
  26. gandalfsaxe commented on Oct 20, 2019

    @gandalfsaxe

    Benjamin Pasero (@bpasero) But how is this an acceptable default for the Mac though? See my comment above.

  27. bpasero commented on Oct 21, 2019

    @bpasero
    Contributor

    Gandalf Saxe (@gandalfsaxe) if you can come up with a good keybinding, fire up a PR and I can have a look.

  28. locked and limited conversation to collaborators on Nov 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    *as-designedfeature-requestkeybindings

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions