ShortCuts

Need help, or want to share a macro? Post here!
triplus
Posts: 8839
Joined: Mon Dec 12, 2011 4:45 pm

Re: ShortCuts

Postby triplus » Sun Sep 25, 2016 9:39 pm

Autorun command
  • Configurable key delay interval
  • ShortCutsLocator module (QTimer support)
  • Dictionary of unique shortcut combinations
  • Stop key delay timer on down key and on ShortCuts hide
After enabling Key delay:
AutorunCommand.png
AutorunCommand.png (32.93 KiB) Viewed 1146 times
Command will run automatically on timeout.
RunTimeout.png
RunTimeout.png (10.28 KiB) Viewed 1147 times
Pressing on key C will add Cylinder after timeout. If instead C is pressed again time interval starts over again and the Cone will be the result.
pablogil
Posts: 793
Joined: Wed Nov 26, 2014 3:19 pm
Location: Badajoz (Spain)
Contact:

Re: ShortCuts

Postby pablogil » Mon Sep 26, 2016 7:09 pm

Really cool update @triplus!!
I like it a lot, it works perfect and it allows super fast launch of commands (even without the need to open an specific workbench and then run the command)
I have tested it for a while and, by the time being, I find myself very comfortable with just Global commands and 200ms for "key delay"...

For future updates I still miss:
  • "clear workbench binds" button
  • "reset all binds" button
  • (I know you are going to tell me that it's already possible through "Edit parameters..." panel but:) import/export buttons for newbies and people that don't know how to do it through "Edit parameters" panel
And above all those: I wish this become FreeCAD default because of its features and because that way it wouldn't be necessary to have an "invoke key" and it would turn into an even faster and perfect workflow...

Any official developer reading this thread? what do you think about it?

Thanks @triplus
Dark and Light stylesheets v2.0 to theme your FreeCAD UI, more information here
triplus
Posts: 8839
Joined: Mon Dec 12, 2011 4:45 pm

Re: ShortCuts

Postby triplus » Tue Sep 27, 2016 12:37 pm

pablogil wrote:Really cool update @triplus!!
I like it a lot, it works perfect and it allows super fast launch of commands (even without the need to open an specific workbench and then run the command)
Good to hear that.
I have tested it for a while and, by the time being, I find myself very comfortable with just Global commands and 200ms for "key delay"...
Such things are left to the end user to figure them out. ;)
For future updates I still miss:
  • "clear workbench binds" button
  • "reset all binds" button
  • (I know you are going to tell me that it's already possible through "Edit parameters..." panel but:) import/export buttons for newbies and people that don't know how to do it through "Edit parameters" panel
This will happen and in addition developers should be able to define and provide default set of shortcuts for their workbench in the future. As for export/import capability. Such functionality will likely be explored as one of the last features added.
And above all those: I wish this become FreeCAD default because of its features and because that way it wouldn't be necessary to have an "invoke key" and it would turn into an even faster and perfect workflow...
Invoke key is needed as this is just the way how ShortCuts work. I was thinking about what is simple and what is complex. What can work reliably and what can't... From shortcuts perspective FreeCAD is more than a single application as each workbench is basically a whole new application. There can be 100 or more of them in the future. Then there is Qt and the default set of shortcuts it provide. The list of shortcuts is actually substantial (standard shortcuts like Ctrl + N). After that there are different operating systems heavily relying on modifier keys (and additional key combinations). Then there are macros that can at any time introduce new shortcut anywhere. And finally there is the end user that has built in ability to define custom shortcuts. Well as i said in the past good luck with that. ;)

If i would try really hard i probably could introduce a way on how to manage this slightly better. That is improve things like local workbench shortcut behaviour. Slightly better duplicate condition management... But due to complexity and different needs and expectations from all the mentioned parties involved this can always work only up to a point.

Therefore in my opinion better to leave standard Qt an operating system related shortcuts as they are. Provide as much workbench specific shortcuts as possible behind invoke key. By providing sensible combinations by default. User can always manage them after. And leave the keyboard itself for macro writers and end users to actually have a chance to use currently built in shortcut system to define some custom shortcuts.

This is what ShortCuts is all about. This is how i made it and i provided the reasoning why. On how the result (once finished) will be used in the future i can't say.
Any official developer reading this thread? what do you think about it?
I wouldn't count on that too much. ;)
Thanks @triplus
You're welcome.
efyx
Posts: 280
Joined: Fri Sep 26, 2014 7:36 pm

Re: ShortCuts

Postby efyx » Tue Sep 27, 2016 1:15 pm

@triplus - very cool feature. I miss only an option of export/import those shortcuts (once set could be used in many places).
Are you going to work on "pie menu" backagain right now :D ?
triplus
Posts: 8839
Joined: Mon Dec 12, 2011 4:45 pm

Re: ShortCuts

Postby triplus » Tue Sep 27, 2016 2:23 pm

efyx wrote:@triplus - very cool feature.
Thanks.
I miss only an option of export/import those shortcuts (once set could be used in many places).
Once things will be more or less completed.
Are you going to work on "pie menu" backagain right now :D ?
I will do first release of IconThemes. After i will implement shortcut related functionality in PieMenu. And after likely i will add support to ShortCuts for workbench developers being able to define default set of shortcuts. That is the current development plan. ;)
pablogil
Posts: 793
Joined: Wed Nov 26, 2014 3:19 pm
Location: Badajoz (Spain)
Contact:

Re: ShortCuts

Postby pablogil » Tue Sep 27, 2016 2:25 pm

triplus wrote: I will do first release of IconThemes. After i will implement shortcut related functionality in PieMenu. And after likely i will add support to ShortCuts for workbench developers being able to define default set of shortcuts. That is the current development plan. ;)
Nice!
Dark and Light stylesheets v2.0 to theme your FreeCAD UI, more information here
nokian
Posts: 40
Joined: Wed Sep 14, 2016 8:22 pm

Re: ShortCuts

Postby nokian » Tue Sep 27, 2016 3:07 pm

@triplus:
The way you improve the usability of FreeCAD is incredible!
Definitely one of the main reasons I use this software.
jidoeuf
Posts: 43
Joined: Sun Mar 01, 2015 4:06 pm

Re: ShortCuts

Postby jidoeuf » Thu Apr 27, 2017 4:06 pm

@triplus
Hello,
Why this add-on doesn't appear in repository?
Jee-Bee
Posts: 1979
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

Re: ShortCuts

Postby Jee-Bee » Thu Apr 27, 2017 6:00 pm

depends on you're version of FreeCAD...
if you FreeCAD 0.17 it don't need it.
Maybe it is 0.16 only...


never mind didn't read well
triplus
Posts: 8839
Joined: Mon Dec 12, 2011 4:45 pm

Re: ShortCuts

Postby triplus » Fri Apr 28, 2017 10:09 pm

The explanation is actually simple. There was no request to add it yet:

https://github.com/FreeCAD/FreeCAD-addons/issues/27