src/vs/workbench/services/keybinding/common/keybindingEditing.ts/KeybindingsEditingService/doEditKeybinding
class KeybindingsEditingService:	private async doEditKeybinding(keybindingItem: ResolvedKeybindingItem, key: string, when: string | undefined, add: boolean): Promise<void> {
		const reference = await this.resolveAndValidate();
		const model = reference.object.textEditorModel;
		if (add) {
			this.updateKeybinding(keybindingItem, key, when, model, -1);
		} else {
			const userKeybindingEntries = <IUserFriendlyKeybinding[]>json.parse(model.getValue());
			const userKeybindingEntryIndex = this.findUserKeybindingEntryIndex(keybindingItem, userKeybindingEntries);
			this.updateKeybinding(keybindingItem, key, when, model, userKeybindingEntryIndex);
			if (keybindingItem.isDefault && keybindingItem.resolvedKeybinding) {
				this.removeDefaultKeybinding(keybindingItem, model);
			}
		}
		try {
			await this.save();
		} finally {
			reference.dispose();
		}
	}