Sandbox:Keyboard Shortcuts

= Context =

This page is aiming at refactoring the keyboard shortcuts in FreeCAD. Indeed at the moment, several problems exist such as overlapping, lack of consistency, ... When work is over, this page can be mutated so it serves as a keyboard shortcuts overview.

Discussion in the forum

= Timeline =

Proposed activities are (more or less in chronological order) :
 * List all available commands by workbench
 * Define global guidelines
 * Define new shortcuts to commands (following guidelines)
 * Implement in the code

= Global guidelines =

Proposed guidelines :
 * Use standard shortcuts for standard commands across software (New, Open, Save, Undo/Redo, ...)
 * Shortcuts using 'Ctrl' key should be reserved for global commands
 * Function keys (F1 to F12) should be reserved for global commands
 * Shortcuts using 'Shift' key could be used to indicate an opposite/complementary action (to the one without 'Shift')
 * Shortcuts using 'Alt' key should be avoided (it is used to access menus, and 'Ctrl+Alt' or 'Shift+Alt' are often system shortcuts)
 * Shortcuts using only alpha key (single or combo -- without modifier) should be reserved to workbench local commands
 * Shortcuts using only num key (without modifier) should be avoided (to prevent unwanted actions)
 * Shortcuts using system keys ('PrntScr', 'Pause', ...) should be avoided
 * Most used commands should have a shortcut. Not all commands have to have a shortcut.

= List of commands =
 * Note: "A" means the keyboard key A, not the upper case letter A (aka Shift-Key A)

Hidden Global Shortcuts
''These shortcuts are not listed in the Keyboard Customization window. You will not see a warning if one of your shortcuts causes a conflict!''

1. You can switch between workbenches with W, 1 through W, 9. These shortcuts are set automatically when FreeCAD launches. By arranging your workbench list in "Tools->Customize...->Workbenches", then closing and reopening FreeCAD, you can set these shortcuts to your liking. You can check and see these shortcuts in the Menubar's "View->Workbench", but not in the Workbench Dropdown List toolbar.

2. Std_DrawStyle opens a dropdown menu, making it impossible to change these 7 shortcuts in the GUI:

Customizable shortcuts
These global shortcuts do appear in "Tools->Customize...->Keyboard". FreeCAD's GUI lists shortcuts by "Category", but this Wiki page lists shortcuts by "workbench". FreeCAD's GUI puts some commands, like "Export Page as SVG" in the file "category", but that command is actually from the TechDraw "Workbench". (Another reason why you might not find a command is because this subsection hasn't been updated for FreeCAD 0.20 yet.)

Note: In KDE Linux, some FreeCAD shortcuts follow the Common Actions shortcuts found in KDE System Settings. For example, KDE's default Redo is Ctrl+Shift+Z, not Ctrl+Y. If you override the shortcut within FreeCAD, your preference will be remembered even if the KDE shortcut changes. To use KDE's universal shortcuts again, click "Reset" or "Reset All." When FreeCAD launches, it imports KDE's shortcuts, so shortcuts may not seem "up to date" until FreeCAD is restarted. Tested 2022-09-30, Manjaro Linux 5.15, FreeCAD 0.20.1 (flatpak)

Arch Workbench
Up to date for FreeCAD 0.20.1