src/vs/base/browser/keyboardEvent.ts/extractKeyCode
function extractKeyCode(e: KeyboardEvent): KeyCode {
	if (e.charCode) {
		// "keypress" events mostly
		let char = String.fromCharCode(e.charCode).toUpperCase();
		return KeyCodeUtils.fromString(char);
	}
	return KEY_CODE_MAP[e.keyCode] || KeyCode.Unknown;
}