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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

keybindings.json not syncing #1179

Open
mcandre opened this issue Apr 7, 2020 · 9 comments
Open

keybindings.json not syncing #1179

mcandre opened this issue Apr 7, 2020 · 9 comments

Comments

@mcandre
Copy link

mcandre commented Apr 7, 2020

馃悰 Describe the bug

I uploaded my custom VSCode keyboard shortcuts from one computer and tried to use sync settings to download the same keyboard settings onto a second computer. This is what I got on the second computer after sync settings processed.

keybindings.json:

// Place your key bindings in this file to override the defaults
[
]

馃尨 Visual Studio Code Version : 1.43.2
馃尨 Code Settings Sync Version : 3.4.3
馃尨 Standard or Insiders : Standard
馃尨 Portable or Installed : Installed
馃尨 OSS or Official Build : Official Build
馃尨 Operating System : macOS 10.15 Catalina
馃尨 Occurs On: Sync
馃尨 Proxy Enabled: No
馃尨 Gist Id: ca5bac8864a6c00bc671157a3dcd984a

馃摪 To Reproduce
Steps to reproduce the behavior:

  1. Customize shortcut keys on a Windows computer. For example, remap Control+L to navigate by line number.
  2. Upload settings to Gist with sync settings plugin.
  3. On a macOS computer, install the sync settings plugin. Download settings.
  4. On the mac, open the shortcuts keybindings.json file.

馃挭 Expected behavior

All shortcut settings transferred from the Windows computer to the macOS computer exactly as written in the keybindings.json shortcuts file on Windows.

I happened to select generic, BM PC compatible keyboard shortcuts for my keybindings.json file, but I would expect the settings to be preserved across computers even if I chosen Windows-specific shortcuts, or macOS-specific shortcuts, or Linux-specific shortcuts, and so on.

@mcandre mcandre changed the title Keyboard shortcuts not syncing keybindings.json not syncing Apr 7, 2020
@Hubro
Copy link

Hubro commented Feb 18, 2021

Same here. When I download settings to my MacBook using this extension, everything is included except keybindings.json, which is empty. It works fine between Windows and Linux, so I'm guessing there's some logic in this extension or in VSCode that separated macOS keybindings from other platforms, because of the different keyboard layout.

@Hubro
Copy link

Hubro commented Feb 18, 2021

This prompted me to test the official settings sync feature in VSCode, which has the setting "settingsSync.keybindingsPerPlatform". When set to false, my keybindings are successfully synced between all my PCs, including my MacBook.

@JeroenBos
Copy link

@Hubro Did you have to sync both machines, or just the one where you're trying to download the keybindings settings after setting settingsSync.keybindingsPerPlatform to false?

I don't have access to the machine I uploaded te keybinding settings currently, so I can't trigger that with this new setting settingsSync.keybindingsPerPlatform. And downloading of the settings does not happen after changing the setting and triggering a sync :(

@Hubro
Copy link

Hubro commented Jul 6, 2021

@Hubro Did you have to sync both machines, or just the one where you're trying to download the keybindings settings after setting settingsSync.keybindingsPerPlatform to false?

I don't have access to the machine I uploaded te keybinding settings currently, so I can't trigger that with this new setting settingsSync.keybindingsPerPlatform. And downloading of the settings does not happen after changing the setting and triggering a sync :(

Good question, I don't remember. Presumably you need to set it on the machine where you first uploaded the keybindings.

@schneems
Copy link

Hello. I think I hit this as well or a variant of it. I'm in the process of trying to move from computer 1 to computer 2. Both have vscode setting sync enabled. It seems after I opened one computer, it's settings over-wrote the other. Here's what I observed:

Computer 2: Map CTRL+P to "workbench.action.quickOpen". It works for a while.
Computer 1: Open a file with vscode to see it's contents.
Computer 2: When I moved back to this computer, I tried using CTRL+P but it was gone. Suspiciously it also showed me a "Last synced: now" in the UI (but I'm realizing that might be a false indicator as it seems to always say that).

Opportunity/Idea for versioned settings?

When it first happened I was hoping/guessing that the settings might be versioned and I could see how they changed and rollback. Regarless of the outcome of this issue/investigation. I believe the ability to have versioned settings or some kind of a history would be useful. It might not prevent this situation, but it would make it much easier and faster to recover. Even if it's only versioned locally and only accessible on disk (i.e. no sort of history/ui browser) it could help.

@ytrinh
Copy link

ytrinh commented Sep 11, 2021

Changing the "universalKeybindings" setting to true in syncLocalSettings.json fixed this issue for me.

@bmitc
Copy link

bmitc commented Apr 22, 2022

I am also having this issue. My "main" computer is a Windows 11 PC at home. I recently synced my settings to a Windows 10 work computer just fine. However, when I synced my settings on macOS Big Sur, the keyboard shortcut settings did not sync at all.

@ytrinh Can you point how to navigate to this file? I cannot find this file or setting anywhere.

@ytrinh
Copy link

ytrinh commented Apr 22, 2022

@bmitc The location on my MBP is "~/Library/Application Support/Code/User".

@waterproofpatch
Copy link

@Hubro Did you have to sync both machines, or just the one where you're trying to download the keybindings settings after setting settingsSync.keybindingsPerPlatform to false?

I don't have access to the machine I uploaded te keybinding settings currently, so I can't trigger that with this new setting settingsSync.keybindingsPerPlatform. And downloading of the settings does not happen after changing the setting and triggering a sync :(

I think I just ran into this same issue just now, trying to sync keybindings.json from my macbook to my ubuntu VM, in vscode 1.70. I set "settingsSync.keybindingsPerPlatform": 'false'" on both machines, and within a minute or so I had my bindings synced on my Ubuntu VM from my macbook.

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

No branches or pull requests

7 participants