Skip to content

Add a page that lists the app shortcuts #433

Description

@AerunDev

As a User
I would like to know the App shortcuts
So that I can use them properly

Things to know

MacOS already lists the shortcuts but not Linux or Windows.

Acceptance criterias

  • A design has been made on Figma
  • The user is able to find the App shortcuts
  • App shortcuts can't be modified
  • App shortcuts view is translated in both English and French (other languages will be translated on Weblate)

References

Link to the design on Figma

Texts

Catégorie (FR) Category (EN) Raccourci (FR) Shortcut (EN) Windows macOS
Raccourcis par défaut Default shortcuts Sauvegarder les modifications apportées au projet Save project changes Ctrl + S ⌘ Cmd + S
Raccourcis par défaut Default shortcuts Créer un nouvel élément dans la base de données Create a new database entry Ctrl + N ⌘ Cmd + N
Raccourcis par défaut Default shortcuts Copier l'identifiant d'une entrée de la base de données Copy the selected database entry ID Ctrl + Shift + C ⌘ Cmd + Shift + C
Raccourcis par défaut Default shortcuts Démarrer le jeu en mode debug Start the game in debug mode Ctrl + P ⌘ Cmd + P
Navigation Navigation Naviguer entre les éléments d'une liste Navigate between items in a list Ctrl + ← / Ctrl + → ⌘ Cmd + ← / ⌘ Cmd + →
Navigation Navigation Naviguer entre les éléments d'une liste secondaire Navigate between items in a secondary list Ctrl + Alt + ← / Ctrl + Alt + → ⌘ Cmd + ⌥ Opt + ← / ⌘ Cmd + ⌥ Opt + →
Divers Miscellaneous Afficher en plein écran Toggle fullscreen F11 F11
Divers Miscellaneous Réduire la fenêtre Minimize window Ctrl + H ⌘ Cmd + H
Divers Miscellaneous Afficher les Developer Tools Open Developer Tools Ctrl + Alt + I ⌘ Cmd + ⌥ Opt + I

Code sample to get app shortcuts

function getShortcuts(menu) {
  const result = [];

  menu.items.forEach(item => {
    if (item.accelerator) {
      result.push({
        label: item.label,
        accelerator: item.accelerator.toString()
      });
    }

    if (item.submenu) {
      result.push(...getShortcuts(item.submenu));
    }
  });

  return result;
}

const shortcuts = getShortcuts(Menu.getApplicationMenu());
console.log(shortcuts);

Metadata

Metadata

Assignees

Labels

AccessibilityIssues related to accessibilityGood first issueGood for newcomersUser storyIssues related to a new feature or request

Projects

Status
In Review

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions