-
Notifications
You must be signed in to change notification settings - Fork 10
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
Some shortcut combinations make one of them not to work #12
Comments
Same issue here - M1 Macbook Air on latest version |
@Bryceshaw06 @xezrunner Can you guys try v0.10.0? Let me know if the issues are fixed :) |
@pablopunk It did not fix it for me. I am on the latest version, and the commands I'm trying to use are "Command" for "Move" and "Alt+Command" for "Resize". https://share.cleanshot.com/wGq9Jxst |
Can confirm that there still is a shortcut overlap problem. Screen.Recording.2024-01-03.at.07.35.10.movHowever, on Ventura, the shortcuts now work as expected when screen recording as well, was broken in the first few versions. |
This seems to be a different issue to the one I solved (which was just triggering both actions at the same time, so one would shadow the other one). This one only happens when one shortcut contains the other one (⌘⇪ contains ⌘) but I'm having a hard time fixing the code. SwiftShift/Swift Shift/src/shortchuts/ShortcutsManager.swift Lines 112 to 116 in 05305ab
Both shortcuts pass the second check because ⌘⇪ contains ⌘, so I think by inverting the check (⌘ contains ⌘⇪) it should work but the AlgebraSet might not work as I think 😅, cause this makes no shortcut to be triggered: if event.modifierFlags.isDisjoint(with: shortcut.modifierFlags) {
MouseTracker.shared.stopTracking(for: action)
-} else if event.modifierFlags.contains(shortcut.modifierFlags) {
+} else if shortcut.modifierFlags.contains(event.modifierFlags) {
MouseTracker.shared.startTracking(for: action)
} |
Well I asked ChatGPT and it completely solved the issue by using something I didn't know about (converting the events using |
@xezrunner @Bryceshaw06 Please check out the latest release and see if the issue is finally fixed 🙏🏻 https://github.com/pablopunk/SwiftShift/releases/tag/0.13.0 |
Works great @pablopunk ! Thanks for the fix! |
Can also confirm that the issue is now fixed - shortcuts no longer overlap if both use the same key. |
The text was updated successfully, but these errors were encountered: