FreeCAD icon indicating copy to clipboard operation
FreeCAD copied to clipboard

[Problem] Move Body Tip keyboard shortcut is not working

Open wohltat opened this issue 9 months ago • 4 comments

Is there an existing issue for this?

  • [x] I have searched the existing issues

Version

0.20 (Release)

Full version info

[code]
OS: Manjaro Linux (GNOME/gnome-xorg)
Word size of FreeCAD: 64-bit
Version: 2024.1006.0.14555 (Git shallow) AppImage
Build type: Release
Branch: (HEAD detached at 20241003stable)
Hash: a9810d509a6f112b5ac03d4d4831b67e6bffd5b7
Python 3.11.9, Qt 5.15.13, Coin 4.0.1, Vtk 9.2.6, OCC 7.7.2
Locale: English/United States (en_US)
[/code]

Subproject(s) affected?

PartDesign

Problem description

I wanted use the keyboard shortcut for setting the tip of the body in the tree view but it didn't work. It's possible to set the shortcut but it is neither used nor shown in the context menu next to "Set body Tip" like for other commands.

I solved it after a long research by adding the 'PartDesign_MoveTip' command to a toolbar. It think this should not be necessary and the shortcut should also be displayed.

Anything else?

No response

Code of Conduct

  • [x] I agree to follow this project's Code of Conduct

wohltat avatar Mar 09 '25 21:03 wohltat

Agreed

drwho495 avatar Mar 09 '25 21:03 drwho495

It's possible to set the shortcut but it is neither used nor shown in the context menu next to "Set body Tip" like for other commands

May I know how you attempted to set the shortcut to the context menu?

realthunder avatar Mar 28 '25 15:03 realthunder

May I know how you attempted to set the shortcut to the context menu?

I just set the keybinding as normal "Tools"-->"Customize..."-->then searched for "Set tip"--> and "Assign"ed the "Current shortcut" I did not try to set an extra shortcut for the context menu. I just expect that the mapping i made will be displayed there since other key mappings are shown there as well, like "Show hidden items T,S".

Image

While writing i just discovered that the keybinding for "Show hidden items" is also not displayed correctly. I set a different keybinding which works, but "T, S" does not work. Although "T, S" does not work, It is shown as used already by ~"Show hidden items"("Show hidden items"). My mapping that works seems to be a different command "Toggle showing hidden items"(Std_TreeToggleShowHidden).

"Rename" is also strange. "F2" works and the mapping from the customize menu ("Shift-F2") also works. Both change the name of the current object. Though the latter writes something in the python console.

And "Send to python console" works as well and even displays the mapping that i set correctly. So i guess it should be possible for all commands, its just a little messed up.

wohltat avatar Mar 28 '25 16:03 wohltat

FreeCAD command shortcut system relies on Qt framework, which only works if the corresponding toolbar button and/or menu item is visible. It does not work for context menu items, which is hidden by its natural. Once the user brings up the context menu, I doubt he/she will bother with the shortcut anymore.

Application menu (those menus in the menu bar) is different than context menu. Application menu items are consider visible as long as it's root item is visible in the menu bar.

While writing i just discovered that the keybinding for "Show hidden items" is also not displayed correctly. I set a different keybinding which works, but "T, S" does not work. Although "T, S" does not work, It is shown as used already by ~"Show hidden items"("Show hidden items"). My mapping that works seems to be a different command "Toggle showing hidden items"(Std_TreeToggleShowHidden).

This is indeed a problem. I'll fix it. The root cause being that context menu items generally do not follow FreeCAD shortcut system because of the reason stated above. It brings confusion when there is duplicate actions in context menu and toolbar button or application menu, plus the fact that not all context menu actions have correspondence in FreeCAD command shortcut system.

realthunder avatar Mar 31 '25 03:03 realthunder