function getNormalizedKeyName(keyboardKey) {
  const key = keyboardKey.trim();

  const keyMap = {
    ArrowUp: 'Up',
    ArrowDown: 'Down',
    ArrowLeft: 'Left',
    ArrowRight: 'Right',
  };

  if (key.length === 1) {
    return key.toUpperCase();
  }

  if (Object.keys(keyMap).includes(key)) {
    return keyMap[key];
  }

  return key;
}
Returns normalized key name compliant with
Electron Accelerator API.

@param {string} keyboardKey
Name of the key