| Summary: | [Feature request] Escape while selecting region doesn't quit, but brings up main window | ||
|---|---|---|---|
| Product: | [Applications] Spectacle | Reporter: | John <john.j.beard> |
| Component: | General | Assignee: | Noah Davis <noahadvs> |
| Status: | RESOLVED INTENTIONAL | ||
| Severity: | wishlist | CC: | kde |
| Priority: | NOR | ||
| Version First Reported In: | 24.02.2 | ||
| Target Milestone: | --- | ||
| Platform: | Other | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
John
2024-04-23 02:26:19 UTC
> But if there's a use case for getting Spectacle appearing after Escape that I'm not sensitive to, it could be a separate config item?
The use case is currently, "opened spectacle window, then decided to do rectangle capture, then decided not to" and also because the old spectacle (22.12) used to go back when you pressed escape. Not sure if the current behavior is exactly the same as the old though.
In most cases, starting in rectangle capture mode and pressing escape already quits spectacle. There are currently only two cases I can think of where it's possible to start in rectangle capture mode without completely exiting when you press escape:
- Launching spectacle from the command line with `spectacle -r`. Note the absence of the `-b`/`--background` option. Unless you explicitly put a different start mode, spectacle will use GUI mode.
- Launching spectacle from either an app menu or the Print key with the "Use last-used capture mode" setting.
It may be possible to tweak the behavior for those cases.
We have the ability to know when `-r` was specified, so we could potentially make Spectacle exit on pressing Escape when it was started with `-r`.
I'm more hesitant to change the behavior for the "Use last-used capture mode" setting because that setting makes it a bit more inconvenient to pick other capture modes when started in rectangle capture mode. There's still the Options menu for changing capture modes though, so it's not like you'd be stuck in the rectangle capture mode either way.
I wouldn't want to make the behavior depend on "Quit after manual Save or Copy" because pressing Escape is not a manual save or copy. Perhaps the setting name doesn't quite match with the average user's true desires, perhaps it does.
I'm not a fan of adding yet another setting, but I'm not totally against it. Figuring out a good way to present a setting is important when adding it and the current organization of keyboard input related settings could be better.
Wow, thank you for a very thoughtful answer. It seems that I can do what I wanted using the -rb flags. I had followed the entry in the .desktop file for RectangularRegionScreenShot, which is just -r (which now I look closer actually does seem to instantly dismiss from the Plasma shortcut, but not from the command line!) So I don't think it's absolutely necessary to change it, since there is indeed a combination of arguments which results in an instant-dismiss on Escape. Though perhaps if the shortcut via the desktop file and the command line did the same thing, it would be slightly more intiutive (or is is it that when launching from the desktop file, the "open the GUI on cancel" is what is supposed to happen and doesn't?) (In reply to John from comment #2) > I had followed the entry in the .desktop file for RectangularRegionScreenShot, which is just -r (which now I look closer actually does seem to instantly dismiss from the Plasma shortcut, but not from the command line!) I'm not completely sure why the behavior is different, but I'm pretty sure the reason why is that spectacle is launched from a DBus service when you activate those desktop file shortcuts. In that situation, spectacle behaves as if it was activated via a global shortcut, which is intentional. If you want to understand how to use spectacle via the command line, it is better to run `spectacle --help`. It also says that GUI mode is the default mode there: " -g, --gui Start in GUI mode (default)" I see, thank you. I didn't realise it could tell if it were activated by a global shortcut and act differently! I suppose the issue can be closed as "working as expected". Thank you for your time and consideration! No problem |