<Front shorcut '1'> fail with <Recent macro shortcut>

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
User avatar
Shalmeneser
Veteran
Posts: 9443
Joined: Wed Dec 23, 2020 12:04 am
Location: Fr

<Front shorcut '1'> fail with <Recent macro shortcut>

Post by Shalmeneser »

My Std_ViewFront shorcut '1' fails if Preference > Macro > Recent Macro > Keyboard Modifiers is not set (void).
But i cannot change this with CTRL or SHIFT or ALT.
With a simple letter as modifier, '1' for 'Front' reworks.
Attachments
Capture du 2022-01-06 22-11-09.png
Capture du 2022-01-06 22-11-09.png (9.12 KiB) Viewed 1407 times
TheMarkster
Veteran
Posts: 5505
Joined: Thu Apr 05, 2018 1:53 am

Re: <Front shorcut '1'> fail with <Recent macro shortcut>

Post by TheMarkster »

Type in the string "Ctrl+Shift+" for example.

Edit: added the extra + after Shift.

Edit #2: added screenshot:
Snip macro screenshot-fb0a93.png
Snip macro screenshot-fb0a93.png (5.86 KiB) Viewed 1387 times
Last edited by TheMarkster on Thu Jan 06, 2022 9:43 pm, edited 1 time in total.
TheMarkster
Veteran
Posts: 5505
Joined: Thu Apr 05, 2018 1:53 am

Re: <Front shorcut '1'> fail with <Recent macro shortcut>

Post by TheMarkster »

You could also set shortcut count to 0 for no shortcuts. Then there would be no conflict with the 1 key shortcut.
User avatar
Shalmeneser
Veteran
Posts: 9443
Joined: Wed Dec 23, 2020 12:04 am
Location: Fr

Re: <Front shorcut '1'> fail with <Recent macro shortcut>

Post by Shalmeneser »

TheMarkster wrote: Thu Jan 06, 2022 9:37 pm Type in the string "Ctrl+Shift+" for example.
Thanks. :P
I thought I had to type the concerned key (like in https://wiki.freecadweb.org/Interface_C ... n#Keyboard) and not their 'name'. Weird ? :roll:
TheMarkster
Veteran
Posts: 5505
Joined: Thu Apr 05, 2018 1:53 am

Re: <Front shorcut '1'> fail with <Recent macro shortcut>

Post by TheMarkster »

Shalmeneser wrote: Thu Jan 06, 2022 9:48 pm Thanks. :P
I thought I had to type the concerned key (like in https://wiki.freecadweb.org/Interface_C ... n#Keyboard) and not their 'name'. Weird ? :roll:
Not weird. It should probably the same input technique for both dialogs. My fault it's not.
openBrain
Veteran
Posts: 9031
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: <Front shorcut '1'> fail with <Recent macro shortcut>

Post by openBrain »

https://github.com/FreeCAD/FreeCAD/pull/5404 converts the line edit to a "key catcher" that sets up modifiers.

Maybe a way to warn user that changing default can lead to collisions could be a good addition too. :)
openBrain
Veteran
Posts: 9031
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: <Front shorcut '1'> fail with <Recent macro shortcut>

Post by openBrain »

openBrain wrote: Thu Jan 20, 2022 5:52 pm https://github.com/FreeCAD/FreeCAD/pull/5404 converts the line edit to a "key catcher" that sets up modifiers.
Merged by @wmayer.
TheMarkster
Veteran
Posts: 5505
Joined: Thu Apr 05, 2018 1:53 am

Re: <Front shorcut '1'> fail with <Recent macro shortcut>

Post by TheMarkster »

Would it be difficult to also check these dynamic shortcuts for conflicts on startup? We know what they are even if they are not yet created by checking these parameters: BaseApp/Preferences/RecentMacros (ShortcutCount and ShortcutModifiers). For example, if ShortcutCount = 3 and ShortcutModifiers = "Ctrl+Alt+", then we have:

Ctrl+Alt+1
Ctrl+Alt+2
Ctrl+Alt+3

We know without any modifiers there will be conflicts with the view menu shortcuts (unless the user has changed these).
openBrain
Veteran
Posts: 9031
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: <Front shorcut '1'> fail with <Recent macro shortcut>

Post by openBrain »

TheMarkster wrote: Mon Jan 24, 2022 5:48 pm Would it be difficult to also check these dynamic shortcuts for conflicts on startup? We know what they are even if they are not yet created by checking these parameters: BaseApp/Preferences/RecentMacros (ShortcutCount and ShortcutModifiers). For example, if ShortcutCount = 3 and ShortcutModifiers = "Ctrl+Alt+", then we have:

Ctrl+Alt+1
Ctrl+Alt+2
Ctrl+Alt+3

We know without any modifiers there will be conflicts with the view menu shortcuts (unless the user has changed these).
Hi, I pushed a Draft PR implementing shortcut conflict detection and warning here : https://github.com/FreeCAD/FreeCAD/pull/5437
Main limitation is that we can detect shortcut collisions at the time menu is created/updated. If then another workbench is loaded that has some conflicts in its commands, it won't be detected. Is this acceptable ?

Can you look and tell me is it looks worth to you ? Because the PR also contains a fix for shortcut display in status bar. If the shortcut conflict detection looks useless, I will remove the latest commit and submit the PR without it. ;)
TheMarkster
Veteran
Posts: 5505
Joined: Thu Apr 05, 2018 1:53 am

Re: <Front shorcut '1'> fail with <Recent macro shortcut>

Post by TheMarkster »

openBrain wrote: Tue Jan 25, 2022 3:47 pm
Hi, I pushed a Draft PR implementing shortcut conflict detection and warning here : https://github.com/FreeCAD/FreeCAD/pull/5437
Main limitation is that we can detect shortcut collisions at the time menu is created/updated. If then another workbench is loaded that has some conflicts in its commands, it won't be detected. Is this acceptable ?

Can you look and tell me is it looks worth to you ? Because the PR also contains a fix for shortcut display in status bar. If the shortcut conflict detection looks useless, I will remove the latest commit and submit the PR without it. ;)
Looks good to me.
Post Reply