This repository was archived by the owner on Oct 24, 2024. It is now read-only.
This repository was archived by the owner on Oct 24, 2024. It is now read-only.
A command
software architecture #181
Open
Description
Feature Request
Thinking deeper about issue #172, I found that a more sustainable way of developing the power of keyboard shortcuts is having a command architecture. The current way of adding code in the main class can only support a very limited number of commands and will make the code messy.
Many CAD software like AutoCAD
are command-line-based, and the keyboard is just an alias
for the corresponding command. Rhino
even put the command line UI in front of the user, which is a successful design in my view.
Details
I would suggest the following update:
- Adding a
compas_view2.commands
(orcompas_view2.actions
?) class where all the actions and their names (likezoom_selected
,SetView_TOP
are stored). - Then, the user defines the keyboard shortcuts (
alias
) by modifying thesettings.json
.
Some additional thoughts
- Many of our users are migrated from
Rhino
, which exportsRhinoSettings.ini
file to store the settings. Maybe we can add a helper function to intake theRhinoSettings.ini
and directly produce aRhino-like
user-friendly setting? - Maybe we should add the command line UI?