[Bug] Keyboard shortcuts conflict

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!
openBrain
Posts: 3089
Joined: Fri Nov 09, 2018 5:38 pm

[Bug] Keyboard shortcuts conflict

Postby openBrain » Fri Feb 01, 2019 2:19 pm

Hi all,

I mostly use keyboard shortcuts when working with CAD softwares. And I often encounter conflicts in FC that prevent default shortcuts to work correctly.
As some examples :
* "(V,F)" is the shortcut for "Fit all" view. But when done in Sketcher WB, it successively activates "Vertical constraints" (V) then finally "Fillet" (F) instead
* Inside Sketcher WB, "Trim edge" is documented as "(T,R)". But instead this shortcut activates "Tangent constraint" (T) then finally "Draw rectangle (R)
* Same as previous line also fails with "Extend edge" documented as "(T,E)" that will finally land to "Equal constraint" (E)

First question is of course to know if I'm missing something here or if my understanding is correct. :)
If I'm correct, do you think having a bit of work to build a new proposal for a global keyboard shortcut list would make sense ?

Thx
chrisb
Posts: 21394
Joined: Tue Mar 17, 2015 9:14 am

Re: [Bug] Keyboard shortcuts conflict

Postby chrisb » Fri Feb 01, 2019 4:44 pm

A good proposal is always welcome; besides I would call this a feature request and not a bug. Even more so as you can configure the shortcuts yourself.

What you are aiming at seems to be very ambitious, because it should meet different conditions:
  • You talk about a system of shortcuts where the so called Fano-condition holds: No shortcut is allowed to be the prefix of another shortcut.
  • Shortcuts should be easy to memorize, which means they have a strong connection to the action being triggered. Like VF for View FFit, or V for Vertical and H for Horizontal. It is never H for Vertical. This reduces the possible keys dramatically.
  • You have only the keys common in all languages at your disposal plus the modifiers Shift, Ctrl, Alt.
  • It is preferred to have the shortest, i.e. one key shortcuts for the most frequently used functions.
One of the first open source programs - if not the first was Richard M. Stallman's Emacs, where the different modes of an editing session can be compared to our workbenches. The mode specific keys mostly had a certain prefix, which sometimes lead to even three or counting the modifier even 4 keypress shortcuts.

A guess of mine is that most useful time is spent in Sketcher. (With "useful" I mean that some operations burn a lot of time due to the not yet fully implemented user interface such as edge selection in PartDesign's sweep), so it's useful to have the one key shortcuts there. So it has to be considered if the global functions should be changed to something more complicated, a cost that has to be payed in every other workbench too.
openBrain
Posts: 3089
Joined: Fri Nov 09, 2018 5:38 pm

Re: [Bug] Keyboard shortcuts conflict

Postby openBrain » Fri Feb 01, 2019 6:10 pm

chrisb wrote:
Fri Feb 01, 2019 4:44 pm
A good proposal is always welcome; besides I would call this a feature request and not a bug. Even more so as you can configure the shortcuts yourself.
True that it goes beyond bug fix. But in the 2 last examples I gave in the opening post of this topic, some default shortcuts of the Sketcher WB simply don't work at all because conflicting with other default shortcuts of the same WB... Here I call it a bug. :) My thought is just that once the work started, it could be worth trying to propose a global harmonized scheme for keyboard shortcuts. ;)
What you are aiming at seems to be very ambitious, because it should meet different conditions:
It's probably ambitious, but ATM doesn't seem impossible. :)
  • You talk about a system of shortcuts where the so called Fano-condition holds: No shortcut is allowed to be the prefix of another shortcut.
We could imagine that FC may wait a small amount of time after a keypress to see if it's part of a keypress series or not. But it looks quite complicated to implement thus I basically agree. ;)
  • Shortcuts should be easy to memorize, which means they have a strong connection to the action being triggered. Like VF for View FFit, or V for Vertical and H for Horizontal. It is never H for Vertical. This reduces the possible keys dramatically.
Here I'll mitigate. Eg the "V" key obviously sounds well for "Vertical". But today I'm not able to remember if (in Sketcher WB) it stands for "Vertical constraint" or "Vertical dimension"... I would be more comfortable with "C,V" for "Vertical constraint" (that will expand in "C,H" for horizontal, "C,T" for tangent, "C, C" for coincidence, ...) and "D,V" for "Vertical Dimension" (that will expand in in "D,H" for horizontal, and so on...). ;)
  • You have only the keys common in all languages at your disposal plus the modifiers Shift, Ctrl, Alt.
True, but I still think it may be enough. :)
  • It is preferred to have the shortest, i.e. one key shortcuts for the most frequently used functions.
Sure, but at that time I prefer a 2-key combination that I can remember and that works... :lol:
A guess of mine is that most useful time is spent in Sketcher. (With "useful" I mean that some operations burn a lot of time due to the not yet fully implemented user interface such as edge selection in PartDesign's sweep), so it's useful to have the one key shortcuts there. So it has to be considered if the global functions should be changed to something more complicated, a cost that has to be payed in every other workbench too.
I don't think it's a locking point. Common global functions across softwares use the "Ctrl" modifier. Using that they can be single key shortcuts. And (that's all about compromise), global funcs are not necessarily the most used ones. ;)
chrisb
Posts: 21394
Joined: Tue Mar 17, 2015 9:14 am

Re: [Bug] Keyboard shortcuts conflict

Postby chrisb » Fri Feb 01, 2019 9:45 pm

openBrain wrote:
Fri Feb 01, 2019 6:10 pm
global funcs are not necessarily the most used ones.
Sure, that's why I would rather give two keys to those, probably with a modifier and keep one keys for the workbenches. That's far more flexible because the one key shortcuts can well be reused in different workbenches.
For me a key+modifier is a two key shortcut. While Ctrl seems to be rather natural, it might be not for people using different systems. They often have slightly different keyboard layouts with some modifier left of ctrl, some don't have it.
triplus
Posts: 9136
Joined: Mon Dec 12, 2011 4:45 pm

Re: [Bug] Keyboard shortcuts conflict

Postby triplus » Sun Feb 03, 2019 12:36 am

User avatar
bejant
Posts: 6059
Joined: Thu Jul 11, 2013 3:06 pm

Re: [Bug] Keyboard shortcuts conflict

Postby bejant » Wed Dec 11, 2019 6:20 am

openBrain wrote:
Fri Feb 01, 2019 2:19 pm
I mostly use keyboard shortcuts when working with CAD softwares.
...snip..
know if I'm missing something here or if my understanding is correct. :)
I'll offer this with the hope that it helps you: I made some quick reference guides a while ago for 0.18 and they included the the keyboard shortcuts of which I was aware and I think (but I'm not certain) that I did verify those I listed. You can get the quick reference guides from this forum thread:
https://forum.freecadweb.org/viewtopic.php?f=36&t=34733
but know that they did evolve throughout the course of that topic.