Open ericoporto opened 9 months ago
I think a good approach for this would be to introduce a concept of "Action", as something that may be run in the Editor, or particular "context" in the Editor. Then this Action may be customized by assigning a shortcut, and even allowed to be placed in a custom user-defined menu or a toolbar for a quicker access.
I don't think that defining all shortcut properties in a single entity would be convenient, in my opinion it's better to let Components define these as a list of "action" objects, and have some Manager to gather these together.
That would also allow for plugin-based components to define their own Actions and user to assign shortcuts for them.
EDIT: since there had been a talk about game "Action" some time ago, the Editor's action could have a different type name avoiding conflicts. For example, UICommand, UIAction, etc. (On a side note, it's a problem that AGS.Types does not provide separate namespace for types related to Editor itself and types related to the game data.)
I would also welcome the rearrangement of keyboard shortcuts. The most important points have already been mentioned by Érico Porto.
I notice now that the concept of action proposed by @ivan-mogilko feels similar (not same) to the idea for the redo/undo.
If I understood, in the case of here the actions are similar to the MenuCommand here but would instead receive a lambda and optionally some "context" to execute their command.
Describe the problem A person may be used to some shortcut from other editor or have some permanently open software in their computer that the shortcut clashes with an existing shortcut of AGS or they just want to change a particular shortcut for whatever reason.
Suggested change Support remapping shortcuts. The idea is to create a new tab for shortcut remapping in preferences panel.
There are a few details
Shortcut list to help finding them in the editor
https://adventuregamestudio.github.io/ags-manual/KeyboardShortcuts.html
I imagine some entity contain a bunch of properties and these properties would be of such type that they can contain the shortcut, and a string name of what the shortcut is (the "Function" column from above table). Maybe such type could be read only for some things (block selection?), and maybe they each have a set default - maybe in the UI you can set individual to default or all to default.
Is there any validation for not repeating a shortcut? What happens if you click default and the default of that conflicts with the set shortcut of something else? If someone has any idea on the design of this, I really need ideas.
Additional context First described here: https://www.adventuregamestudio.co.uk/forums/editor-development/feature-request-custom-keyboard-shortcuts/
I parsed as three different things