[Feature request] Import & export Macros, Toolbars & keyboard shortcuts

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
Post Reply
Hologram
Posts: 201
Joined: Thu Nov 03, 2022 3:05 pm

[Feature request] Import & export Macros, Toolbars & keyboard shortcuts

Post by Hologram »

For some reason, my User.cfg got corrupted see this topic , so now I am in the process of restoring my macros, toolbars and keyboard shortcuts by pasting them back in from my old user.cfg (only for the things I know worked fine).

This to me raised the question whether it would be beneficial for FreeCAD to be able to export these customization settings? I think it would be a good idea to store these user customisations in separate files, so you can transfer them over to someone else (who may or may not like your interface and other preference settings). It also allows you to make regular backups of macros (the assignments, not the .FCMacro files). And you can more easily transfer them to someone else. The idea is that you could, like with other software, save several shortcut profiles (default, user1, user2, etc.) so you can load in your shortcuts at a co-worker's pc to help them with something, while using your own shortcut assignments. When done, you set the shortcuts back to those of your co-worker. I think this really improves the user experience (and especially improves flexibility) over having just one user.cfg.
drmacro
Veteran
Posts: 8869
Joined: Sun Mar 02, 2014 4:35 pm

Re: [Feature request] Import & export Macros, Toolbars & keyboard shortcuts

Post by drmacro »

See several threads about Preference packs and how to use them for saving advanced and personalized settings.

https://wiki.freecad.org/Preference_Packs
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
Hologram
Posts: 201
Joined: Thu Nov 03, 2022 3:05 pm

Re: [Feature request] Import & export Macros, Toolbars & keyboard shortcuts

Post by Hologram »

I thought the preference packs didn't contain keyboard shortcuts. And looking at the documentation, seems to only contain toolbars and UI related items.
drmacro
Veteran
Posts: 8869
Joined: Sun Mar 02, 2014 4:35 pm

Re: [Feature request] Import & export Macros, Toolbars & keyboard shortcuts

Post by drmacro »

Hologram wrote: Thu Feb 09, 2023 12:32 pm I thought the preference packs didn't contain keyboard shortcuts. And looking at the documentation, seems to only contain toolbars and UI related items.
If you read the documentation you'll see you can define custom sections of parameters to export with the pack.

(Admittedly, it is a bit of a pain to get the window layout, because it is not stored the same way...)
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
Hologram
Posts: 201
Joined: Thu Nov 03, 2022 3:05 pm

Re: [Feature request] Import & export Macros, Toolbars & keyboard shortcuts

Post by Hologram »

Ah okay. But in that case, my idea (feature request) to export keyboard shortcuts and such still holds, but it could be exposed to the preference packs instead. I don't expect the average user to do custom programming. At least from reading the docs it is far from clear to me how it should work (how I should do this) for something like shortcuts.

And I think it's best to store these files separstely and to have sets of shortcuts you can choose from a dropdown. Considering my .cfg corruption, I would rather not affect my 50+ hotkeys, which I didn't manage to get back by copying and pasting to the new auto-generated user.cfg.

Thanks for chiming in though for what is currently possible!
Haavard
Posts: 217
Joined: Wed Feb 17, 2021 10:48 pm

Re: [Feature request] Import & export Macros, Toolbars & keyboard shortcuts

Post by Haavard »

+1000 on including keyboard shortcuts and custom toolbars in preference packs!
drmacro
Veteran
Posts: 8869
Joined: Sun Mar 02, 2014 4:35 pm

Re: [Feature request] Import & export Macros, Toolbars & keyboard shortcuts

Post by drmacro »

Haavard wrote: Thu Feb 09, 2023 2:39 pm +1000 on including keyboard shortcuts and custom toolbars in preference packs!
@chennes
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
Hologram
Posts: 201
Joined: Thu Nov 03, 2022 3:05 pm

Re: [Feature request] Import & export Macros, Toolbars & keyboard shortcuts

Post by Hologram »

The way I would handle this is tgat you get import and export buttons in the keyboard shortcuts section. If this then imports and exports just the keyboard shortcuts, in which importing applies it as a preference pack, it'll at least be a good short term step that makes use of existing functionality 😉
User avatar
chennes
Veteran
Posts: 3881
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: [Feature request] Import & export Macros, Toolbars & keyboard shortcuts

Post by chennes »

Preference packs can store anything that is set by user.cfg, so what’s needed is to add loading shortcuts from preferences: then support is automatic.
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
Post Reply