Changes to Sketcher keyboard shortcuts [Discussion thread]

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!
Bance
Veteran
Posts: 4255
Joined: Wed Feb 11, 2015 3:00 pm
Location: London

Re: Changes to Sketcher keyboard shortcuts [Discussion thread]

Post by Bance »

AKielhorn wrote: Mon Jun 21, 2021 10:43 amI prefer to have one shortcut for one command.
So do I, in the case of Regular Polygon/Radius-Diameter/Create Conic my preferred choice would be to have the "magic 'M' (mode) modifier" this would keep some consistency since it used already for polyline.

The next simplest method would be to add a number, G,P,3 for triangle, G,P,4 for square D,R,1 for Radius, D,R,2 for diameter and so on.(YMMV)
There are a couple of multi-function 'Creates' that I missed, (Arcs and Circles) I'll think about them.

The 'V' issue is one that I missed, I rarely use it :lol: I'm in two minds about it, for consistency it should work as everywhere else, but it's such a frequently used constraint in Sketcher.

Thanks for the feedback, lets hear from some others.
Bance
Veteran
Posts: 4255
Joined: Wed Feb 11, 2015 3:00 pm
Location: London

Re: Changes to Sketcher keyboard shortcuts [Discussion thread]

Post by Bance »

Bump! any other comments before I take this to a dev.
User avatar
M4x
Veteran
Posts: 1483
Joined: Sat Mar 11, 2017 9:23 am
Location: Germany

Re: Changes to Sketcher keyboard shortcuts [Discussion thread]

Post by M4x »

First of all: Thank you very much for this proposal! An overwork of the Sketcher shortcuts would be a good time to create a cheatsheet - my way to getting used to shortcuts and asking myself how I was able to survive without them in the past :D

Overall I'm with chrisb.

V,H should belong to Std_ViewFitAll and work within Sketcher too. I'm not using it too often and nearly never within Sketcher but I've learned from giving FreeCAD courses / lessons / workshops that this is a very useful way to find "lost objects". Since it's a global function / feature, this shortcut should be "overwritten" from my point of view.

I like the idea of using D for dimensions (+ another letter) and G for geometry (+ another letter). I think it's good mixture between logical affiliation and number of keys you've to press.

What I don't like are shortcuts which make use of numbers. It's okay how the macro shortcut is working (Shift + Ctrl + "number") - at least for 1 to 3 because it's easily reachable with one hand. But using numbers quickly leads to "uncomfortable" arrangements of keys you've to press. When using shortcuts, I'd like to be faster than clicking on icons :D

I really like this wiki page [wiki]Sandbox:Keyboard_Shortcuts[/wiki]! We shouldn't forget to update it. Could be a good place to link to cheatsheets too.

@Bance: Is your spreadsheet up to date? I've realized that several shortcuts in the column "New Schema" aren't following the possible schema we've discussed here.
chrisb
Veteran
Posts: 54201
Joined: Tue Mar 17, 2015 9:14 am

Re: Changes to Sketcher keyboard shortcuts [Discussion thread]

Post by chrisb »

We may have to answer the general question what should have preference: the global or the local shortcuts.

I am all for the local shortcuts. Otherwise the global shortcuts block the corresponding keys in all other workbenches.
Although the global shortcuts are important, I personally don't use them as often as I use the keys for adding constraints. So for me it would be perfectly acceptable to have the global shortcuts less comfortable, e.g. by using an additional modifier key such as Ctrl.

The workbenches should be optimized to get the most comfortable/easy/fast workflow. That's where the proposal comes from, to have single key shortcuts for the geometric constraints. Looking at my modeling: I use the vertical constraint much more often than the fit all function. So I prefer to have the former on a single key.

Giving a different key to just the vertical constraint would counteract the very clear concept of the proposal. Questions such as "why is it just this key that is special?", "was it horizontal or vertical having a special key?", "if vertical follows a different paradigm, shouldn't the others follow the same?", ...
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
hic
Posts: 10
Joined: Tue Jun 29, 2021 4:32 am

Re: Changes to Sketcher keyboard shortcuts [Discussion thread]

Post by hic »

Hi,

thank you for your work. The inconsistent shortcuts in sketcher always bugged me, because I struggled to remember, which did need Shift and which won't.

I use shortcuts a lot, and I would like that as much as possible would be possible without using a mouse. It is much quicker, because you could use your muscle memory, instead of aiming and clicking with your mouse.

My ideal would be, that all important functions would have a single-character shortcut. I had a look at the list, and have a few remarks:
  • I would prefer if for creating a line, the shortcut would be "L" instead of "G,L", because I personally use it very often
  • To reduce the number of shortcuts necessary, I would propose the following: instead of having a different shortcut for different kinds of dimensioning constraints (circle, angle, distance) it would be much more handy, if there was only one "intelligent" dimensioning, that knows what kind of dimension I want to place: if I select two lines that are angled, a distance constraint would not work. If I select a circle, an angle constraint would not make any sense. FreeCAD is detecting, if I chose the wrong geometry already, so maybe it wouldn't be too much of an effort to merge them.
  • I would propose to use "X" as shortcut for trimming, as the letter is shaped like a scissor, and it has it's analogy in cmd + X for cutting
ymmv ;-)

Regards
hic
User avatar
adrianinsaval
Veteran
Posts: 5551
Joined: Thu Apr 05, 2018 5:15 pm

Re: Changes to Sketcher keyboard shortcuts [Discussion thread]

Post by adrianinsaval »

chrisb wrote: Thu Jul 01, 2021 9:03 pm
I'm of the same opinion as chrisb
hic wrote: Fri Jul 02, 2021 6:54 pm [*] To reduce the number of shortcuts necessary, I would propose the following: instead of having a different shortcut for different kinds of dimensioning constraints (circle, angle, distance) it would be much more handy, if there was only one "intelligent" dimensioning, that knows what kind of dimension I want to place: if I select two lines that are angled, a distance constraint would not work. If I select a circle, an angle constraint would not make any sense. FreeCAD is detecting, if I chose the wrong geometry already, so maybe it wouldn't be too much of an effort to merge them.
That's an entirely separate feature request, I too would like to have it but we need to rework the shortcuts with how things work now in FreeCAD, not with the features we wish.
I would propose to use "X" as shortcut for trimming, as the letter is shaped like a scissor, and it has it's analogy in cmd + X for cutting
There's already one with an X in the proposal spreadsheet, and the T for trimming seems more intuitive to me since we're going with letters from the command name.
AKielhorn
Posts: 24
Joined: Wed Jul 01, 2020 9:38 am

Re: Changes to Sketcher keyboard shortcuts [Discussion thread]

Post by AKielhorn »

adrianinsaval wrote: Fri Jul 02, 2021 7:18 pm There's already one with an X in the proposal spreadsheet, and the T for trimming seems more intuitive to me since we're going with letters from the command name.
The Draft workbench uses TR for trim.

It is already annoying to have different shortcuts in Draft and Sketcher, we shouldn't introduce more incompatibility.

We only have 26 letters when using one letter shortcuts and it get difficult to connect the shortcut to the commands after half of them are used up. (Vertical constraint or Vertical dimension?)

A quick poll:
  1. Is there a consensus to use only letters and numbers without modifier keys?
  2. Is there a consensus to use multi letter sequences for some shortcuts?
  3. Is there a consensus to prefix dimensioning shortcuts with D?
  4. Is there a consensus that local shortcuts have priority over global shortcuts?
  5. Anything else we already agree on?
Some more questions:
  1. Where will the shortcuts be stored? Hopefully not in the source code.
  2. Can we avoid storing them in user.cfg?
  3. How about a sketcher_shortcut.cfg that is created when FreeCAD is started the first time (unless it already exists)? (Or even a shortcut_<workbenchname>.cfg)
  4. How will this cfg file get updates when new commands are added?
  5. How to edit this file (not everyone has Vim)? (A spreadsheet document?)
Even when I disagree with the official shortcuts and keep using my own, I would like to give these definition to my students without editing user.cfg.
chrisb
Veteran
Posts: 54201
Joined: Tue Mar 17, 2015 9:14 am

Re: Changes to Sketcher keyboard shortcuts [Discussion thread]

Post by chrisb »

AKielhorn wrote: Mon Jul 12, 2021 4:07 pm The Draft workbench uses TR for trim.

It is already annoying to have different shortcuts in Draft and Sketcher, we shouldn't introduce more incompatibility.
If you read the complete topic, you will see, that there are good arguments for the choice of the shortcuts. Perhaps it is worth thinking about changing the Draft shortcuts?
Although it would be very nice if Draft and Sketcher use the same shortcuts, it would be just that: very nice. Shortcuts are used to speed things up for power users, and it seems not very common that people use Sketcher and Draft with the same intensity. After all, both workbenches are different and each of them should be optimized. The few people working in both worlds can customize their keys.
  1. Is there a consensus to use only letters and numbers without modifier keys?
  2. Is there a consensus to use multi letter sequences for some shortcuts?
  3. Is there a consensus to prefix dimensioning shortcuts with D?
  4. Is there a consensus that local shortcuts have priority over global shortcuts?
  5. Anything else we already agree on?
I cannot confirm a consensus, but here is my view:
1. no (so no consensus here)
2. yes
3. yes
4. yes
Where will the shortcuts be stored?
This is a different question, which may be discussed separately. It could be sensible to split other preferences as well, e.g. for Path workbench, but I am not at all sure about this. I like also the concept of having the whole config in a single file.
If it is an xml text file it can be edited with every text editor you like.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
AKielhorn
Posts: 24
Joined: Wed Jul 01, 2020 9:38 am

Re: Changes to Sketcher keyboard shortcuts [Discussion thread]

Post by AKielhorn »

chrisb wrote: Mon Jul 12, 2021 7:59 pm After all, both workbenches are different and each of them should be optimized. The few people working in both worlds can customize their keys.
  1. Is there a consensus to use only letters and numbers without modifier keys?
I cannot confirm a consensus, but here is my view:
1. no (so no consensus here)
Just one note:

On many keyboards you don't have a right CTRL or right Option/Alt key.
That leaves only the SHIFT key as a modifier key that you can use with one hand, while the other hand is on the mouse.
  1. Is there a consensus to use only letters and numbers with (no modifier|SHIFT modifier)?
Where will the shortcuts be stored?
This is a different question, which may be discussed separately. It could be sensible to split other preferences as well, e.g. for Path workbench, but I am not at all sure about this. I like also the concept of having the whole config in a single file.
If it is an xml text file it can be edited with every text editor you like.
I would like to exchange part of my configuration with other users.
Editing the user.cfg file is possible and writing a short program to replace parts of the cfg file with parts from another cfg file isn't that difficult, but simply replacing a file is easier.

But as you say, this is a different discussion that involves all workbenches.
AKielhorn
Posts: 24
Joined: Wed Jul 01, 2020 9:38 am

Re: Changes to Sketcher keyboard shortcuts [Discussion thread]

Post by AKielhorn »

AKielhorn wrote: Tue Jul 13, 2021 5:30 am
Where will the shortcuts be stored?
This is a different question, which may be discussed separately. It could be sensible to split other preferences as well, e.g. for Path workbench, but I am not at all sure about this. I like also the concept of having the whole config in a single file.
If it is an xml text file it can be edited with every text editor you like.
There is a discussion about Preference Packs over there:

https://forum.freecadweb.org/viewtopic. ... 13#p518313

This could be the solution to distribute local shortcut definitions.
Post Reply