Skip to content

✨ Enable reverse cycling of window actions with Shift key #729

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

Merged
merged 3 commits into from
May 26, 2025

Conversation

Morniak
Copy link
Contributor

@Morniak Morniak commented May 16, 2025

This is an initial implementation for #696, adding support for cycling backwards through actions when the Shift key is pressed.

With this code, backward cycling is enabled for all Cycle actions if the Shift key is pressed and neither the trigger key nor the keybind already includes Shift.

To support this behavior, I introduced an isShiftPressed() method in KeybindMonitor. It's a bit of a rough solution, so if you have a cleaner approach in mind, I'm happy to revise it.

Also, we should discuss the feature's scope. It might make sense to add a global toggle to enable/disable backward cycling or add per-cycle configuration of this behavior

Feedback is welcome—especially on implementation design and configurability.

@MrKai77
Copy link
Owner

MrKai77 commented May 16, 2025

@Morniak actually, this looks great so far! You mentioned isShiftPressed() feeling like a rough solution, but I don’t think it is :)
Since KeybindMonitor was designed to track pressed keys during Loop’s activation, it totally makes sense to use it here.

As for the feature’s scope, I think it should be a global setting. Making it per-cycle might overcomplicate things for the average user.

@Morniak
Copy link
Contributor Author

Morniak commented May 16, 2025

Great, thanks! Should I go ahead and add a global toggle to disable this feature?
If so, do you have a preferred location for it? I was thinking the Keybinds tab, under the Settings section, might be a good fit.

@MrKai77
Copy link
Owner

MrKai77 commented May 16, 2025

Yes, that makes sense. But It would also make sense to make it it's own little "section", without a title, right below the trigger settings. And, do you think it would make sense to only show it if the keybinds list contains a cycle action as well?

@Morniak
Copy link
Contributor Author

Morniak commented May 16, 2025

A new section below the trigger key makes sense, and showing it only when there's a cycle action is a good idea — I'm on it.
If the trigger key uses Shift, I think we should keep the toggle visible but disabled, and add a LuminareInfoView to explain why.

@Morniak
Copy link
Contributor Author

Morniak commented May 18, 2025

The change has been pushed, you can check it out now @MrKai77.
Note: the section is toggled off, not disabled, when the trigger key includes Shift because LuminareInfoView doesn’t appear for disabled LuminareToggle.

@SenpaiHunters SenpaiHunters linked an issue May 18, 2025 that may be closed by this pull request
4 tasks
@Morniak Morniak marked this pull request as ready for review May 26, 2025 10:46
@SenpaiHunters SenpaiHunters merged commit 8cdb535 into MrKai77:develop May 26, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

✨ Modifier key reverses cycle direction
3 participants