Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support remapping shorcuts in the Editor #2314

Open
4 tasks
ericoporto opened this issue Jan 25, 2024 · 3 comments
Open
4 tasks

Support remapping shorcuts in the Editor #2314

ericoporto opened this issue Jan 25, 2024 · 3 comments
Labels
context: ui/ux type: enhancement a suggestion or necessity to have something improved what: editor related to the game editor

Comments

@ericoporto
Copy link
Member

ericoporto commented Jan 25, 2024

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.

  • Figure how to save/load shortcut bindings information
  • Refactor AGS Editor to centralize shortcuts to some entity (which?)
  • code API for shortcut remapping
  • Design the screen, workflow for remapping and make it work

There are a few details

  • There are keys used in places in conjunction with mouse (Room and GUI Editors), these can only be modifiers, are they remappable
  • Is Copy/Cut/Paste/Undo remappable?
  • Scintilla comes with a bunch of defaults, these would need to be redefined (but keeping their default values)

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/

Hello all. Right now we have commands like control-G to bring up the global script, but would it be possible to create custom keyboard shortcuts to bring up additional module scripts? There are a few that I have to open up a lot, and being able to open it with a quick keyboard shortcut would be handy. Especially since I have a lot of them buried in folders.

And while I'm here, a shortcut to automatically open the sprite or global variable tabs would be nice as well!

I parsed as three different things

Support remapping shortcuts on the AGS Editor
Add a way to create custom shortcuts to open user created module scripts
Add a shortcut to open Sprite Manager and a shortcut to open the Global Variables panel

@ivan-mogilko
Copy link
Contributor

ivan-mogilko commented Jan 25, 2024

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.)

@ivan-mogilko ivan-mogilko added type: enhancement a suggestion or necessity to have something improved what: editor related to the game editor context: ui/ux labels Jan 25, 2024
@linuxloot-de
Copy link

I would also welcome the rearrangement of keyboard shortcuts. The most important points have already been mentioned by Érico Porto.

@ericoporto
Copy link
Member Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
context: ui/ux type: enhancement a suggestion or necessity to have something improved what: editor related to the game editor
Projects
None yet
Development

No branches or pull requests

3 participants