GraphiteEditor / Graphite

2D vector & raster editor that melds traditional layers & tools with a modern node-based, non-destructive, procedural workflow.
https://graphite.rs
Apache License 2.0
7.66k stars 405 forks source link

Combine the hints and actions systems #741

Open Keavon opened 2 years ago

Keavon commented 2 years ago

This lets us avoid redundantly specifying both the presently available actions (which are currently valid hotkeys) and curated hints (which are drawn for the user). By combining them, it forces us to be comprehensive about our hint list. We still need to provide the human-curated list of hints where a name and grouping is provided to render neatly for human consumption, but the attached actions would thus become part of the hints instead of being a separate system. Pulling off this change requires that we increase the capabilities of the input mapper for specifying how mouse interaction works with keys, and avoiding our current way of telling some messages to check for the status of certain modifier keys in the handler (those which use refresh_keys in the input mapper). We need to make changes to the system in order to be able to accurately derive the mouse and keyboard icons from the input mapper entry.

This refactor may also be done as part of creating a global system of predefined actions that are not quite so based on just reusing certain messages in the message system, so it would overlap with #384 as well as a way of defining names for these actions, their shortcuts, and likely a way to remap them too (#1544).

TrueDoctor commented 7 months ago

@Keavon Is this still relevant?

Keavon commented 7 months ago

Yes, eventually. Next time I'm on a code cleanup binge I might even go for it.