src/vs/platform/menubar/electron-main/menubar.ts/Menubar/confirmBeforeQuit
class Menubar:	private async confirmBeforeQuit(event: KeyboardEvent): Promise<boolean> {
		if (this.windowsMainService.getWindowCount() === 0) {
			return true; // never confirm when no windows are opened
		}

		const confirmBeforeClose = this.configurationService.getValue<'always' | 'never' | 'keyboardOnly'>('window.confirmBeforeClose');
		if (confirmBeforeClose === 'always' || (confirmBeforeClose === 'keyboardOnly' && this.isKeyboardEvent(event))) {
			const options: MessageBoxOptions = {
				title: this.productService.nameLong,
				type: 'question',
				buttons: [
					mnemonicButtonLabel(nls.localize({ key: 'quit', comment: ['&& denotes a mnemonic'] }, "&&Quit")),
					mnemonicButtonLabel(nls.localize({ key: 'cancel', comment: ['&& denotes a mnemonic'] }, "&&Cancel"))
				],
				message: nls.localize('quitMessage', "Are you sure you want to quit?"),
				noLink: true,
				defaultId: 0,
				cancelId: 1
			};

			const { response } = await this.nativeHostMainService.showMessageBox(this.windowsMainService.getFocusedWindow()?.id, options);
			return response === 0;
		}

		return true;
	}