src/vs/workbench/services/keybinding/common/windowsKeyboardMapper.ts/WindowsKeyboardMapper/constructor
class WindowsKeyboardMapper:	constructor(isUSStandard: boolean, rawMappings: IWindowsKeyboardMapping) {
		this.isUSStandard = isUSStandard;
		this._scanCodeToKeyCode = [];
		this._keyCodeToLabel = [];
		this._keyCodeExists = [];
		this._keyCodeToLabel[KeyCode.Unknown] = KeyCodeUtils.toString(KeyCode.Unknown);

		for (let scanCode = ScanCode.None; scanCode < ScanCode.MAX_VALUE; scanCode++) {
			const immutableKeyCode = IMMUTABLE_CODE_TO_KEY_CODE[scanCode];
			if (immutableKeyCode !== KeyCode.DependsOnKbLayout) {
				this._scanCodeToKeyCode[scanCode] = immutableKeyCode;
				this._keyCodeToLabel[immutableKeyCode] = KeyCodeUtils.toString(immutableKeyCode);
				this._keyCodeExists[immutableKeyCode] = true;
			}
		}

		let producesLetter: boolean[] = [];
		let producesLetters = false;

		this._codeInfo = [];
		for (let strCode in rawMappings) {
			if (rawMappings.hasOwnProperty(strCode)) {
				const scanCode = ScanCodeUtils.toEnum(strCode);
				if (scanCode === ScanCode.None) {
					log(`Unknown scanCode ${strCode} in mapping.`);
					continue;
				}
				const rawMapping = rawMappings[strCode];

				const immutableKeyCode = IMMUTABLE_CODE_TO_KEY_CODE[scanCode];
				if (immutableKeyCode !== KeyCode.DependsOnKbLayout) {
					const keyCode = NATIVE_WINDOWS_KEY_CODE_TO_KEY_CODE[rawMapping.vkey] || KeyCode.Unknown;
					if (keyCode === KeyCode.Unknown || immutableKeyCode === keyCode) {
						continue;
					}
					if (scanCode !== ScanCode.NumpadComma) {
						// Looks like ScanCode.NumpadComma doesn't always map to KeyCode.NUMPAD_SEPARATOR
						// e.g. on POR - PTB
						continue;
					}
				}

				const value = rawMapping.value;
				const withShift = rawMapping.withShift;
				const withAltGr = rawMapping.withAltGr;
				const withShiftAltGr = rawMapping.withShiftAltGr;
				const keyCode = NATIVE_WINDOWS_KEY_CODE_TO_KEY_CODE[rawMapping.vkey] || KeyCode.Unknown;

				const mapping: IScanCodeMapping = {
					scanCode: scanCode,
					keyCode: keyCode,
					value: value,
					withShift: withShift,
					withAltGr: withAltGr,
					withShiftAltGr: withShiftAltGr,
				};
				this._codeInfo[scanCode] = mapping;
				this._scanCodeToKeyCode[scanCode] = keyCode;

				if (keyCode === KeyCode.Unknown) {
					continue;
				}
				this._keyCodeExists[keyCode] = true;

				if (value.length === 0) {
					// This key does not produce strings
					this._keyCodeToLabel[keyCode] = null;
				}

				else if (value.length > 1) {
					// This key produces a letter representable with multiple UTF-16 code units.
					this._keyCodeToLabel[keyCode] = value;
				}

				else {
					const charCode = value.charCodeAt(0);

					if (charCode >= CharCode.a && charCode <= CharCode.z) {
						const upperCaseValue = CharCode.A + (charCode - CharCode.a);
						producesLetter[upperCaseValue] = true;
						producesLetters = true;
						this._keyCodeToLabel[keyCode] = String.fromCharCode(CharCode.A + (charCode - CharCode.a));
					}

					else if (charCode >= CharCode.A && charCode <= CharCode.Z) {
						producesLetter[charCode] = true;
						producesLetters = true;
						this._keyCodeToLabel[keyCode] = value;
					}

					else {
						this._keyCodeToLabel[keyCode] = value;
					}
				}
			}
		}

		// Handle keyboard layouts where latin characters are not produced e.g. Cyrillic
		const _registerLetterIfMissing = (charCode: CharCode, keyCode: KeyCode): void => {
			if (!producesLetter[charCode]) {
				this._keyCodeToLabel[keyCode] = String.fromCharCode(charCode);
			}
		};
		_registerLetterIfMissing(CharCode.A, KeyCode.KeyA);
		_registerLetterIfMissing(CharCode.B, KeyCode.KeyB);
		_registerLetterIfMissing(CharCode.C, KeyCode.KeyC);
		_registerLetterIfMissing(CharCode.D, KeyCode.KeyD);
		_registerLetterIfMissing(CharCode.E, KeyCode.KeyE);
		_registerLetterIfMissing(CharCode.F, KeyCode.KeyF);
		_registerLetterIfMissing(CharCode.G, KeyCode.KeyG);
		_registerLetterIfMissing(CharCode.H, KeyCode.KeyH);
		_registerLetterIfMissing(CharCode.I, KeyCode.KeyI);
		_registerLetterIfMissing(CharCode.J, KeyCode.KeyJ);
		_registerLetterIfMissing(CharCode.K, KeyCode.KeyK);
		_registerLetterIfMissing(CharCode.L, KeyCode.KeyL);
		_registerLetterIfMissing(CharCode.M, KeyCode.KeyM);
		_registerLetterIfMissing(CharCode.N, KeyCode.KeyN);
		_registerLetterIfMissing(CharCode.O, KeyCode.KeyO);
		_registerLetterIfMissing(CharCode.P, KeyCode.KeyP);
		_registerLetterIfMissing(CharCode.Q, KeyCode.KeyQ);
		_registerLetterIfMissing(CharCode.R, KeyCode.KeyR);
		_registerLetterIfMissing(CharCode.S, KeyCode.KeyS);
		_registerLetterIfMissing(CharCode.T, KeyCode.KeyT);
		_registerLetterIfMissing(CharCode.U, KeyCode.KeyU);
		_registerLetterIfMissing(CharCode.V, KeyCode.KeyV);
		_registerLetterIfMissing(CharCode.W, KeyCode.KeyW);
		_registerLetterIfMissing(CharCode.X, KeyCode.KeyX);
		_registerLetterIfMissing(CharCode.Y, KeyCode.KeyY);
		_registerLetterIfMissing(CharCode.Z, KeyCode.KeyZ);

		if (!producesLetters) {
			// Since this keyboard layout produces no latin letters at all, most of the UI will use the
			// US kb layout equivalent for UI labels, so also try to render other keys with the US labels
			// for consistency...
			const _registerLabel = (keyCode: KeyCode, charCode: CharCode): void => {
				// const existingLabel = this._keyCodeToLabel[keyCode];
				// const existingCharCode = (existingLabel ? existingLabel.charCodeAt(0) : CharCode.Null);
				// if (existingCharCode < 32 || existingCharCode > 126) {
				this._keyCodeToLabel[keyCode] = String.fromCharCode(charCode);
				// }
			};
			_registerLabel(KeyCode.Semicolon, CharCode.Semicolon);
			_registerLabel(KeyCode.Equal, CharCode.Equals);
			_registerLabel(KeyCode.Comma, CharCode.Comma);
			_registerLabel(KeyCode.Minus, CharCode.Dash);
			_registerLabel(KeyCode.Period, CharCode.Period);
			_registerLabel(KeyCode.Slash, CharCode.Slash);
			_registerLabel(KeyCode.Backquote, CharCode.BackTick);
			_registerLabel(KeyCode.BracketLeft, CharCode.OpenSquareBracket);
			_registerLabel(KeyCode.Backslash, CharCode.Backslash);
			_registerLabel(KeyCode.BracketRight, CharCode.CloseSquareBracket);
			_registerLabel(KeyCode.Quote, CharCode.SingleQuote);
		}
	}