Skip to content

feat: Add Undo as an Action variant + double-click to trigger actions-on-enter #481

@clansty

Description

@clansty

Feature Request

1. Undo as an Action variant

Currently the Action enum supports save-to-clipboard, save-to-file, save-to-file-as, copy-filepath-to-clipboard, and exit. These can be composed in actions-on-enter, actions-on-escape, and actions-on-right-click.

I'd like to propose adding undo as a new Action variant. This would allow configurations like:

--actions-on-right-click undo,exit

Semantics: undo is a fallible action — if it succeeds (something was undone), stop processing further actions in the list. If it fails (nothing to undo), continue to the next action. This makes undo,exit mean "undo one step; if nothing left to undo, exit".

Use case: Right-click-to-undo is a common interaction pattern in annotation/drawing tools. Combined with exit as a fallback, it gives a natural "undo or cancel" flow without needing a dedicated config flag.

2. Double-click to trigger configurable actions

Add --actions-on-double-click as a new configurable action list, consistent with the existing actions-on-enter, actions-on-escape, and actions-on-right-click options.

When actions-on-double-click is not set (empty), it falls back to actions-on-enter behavior for backwards compatibility.

Double-click is only processed when the active tool does not stop propagation, so it does not interfere with existing double-click behavior (e.g. text tool word selection).

Use case: Double-click to confirm/copy is a natural gesture for screenshot crop workflows.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions