Skip to content
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

binding alt+shift+key #205

Open
yangkennyk opened this issue Jan 12, 2023 · 9 comments
Open

binding alt+shift+key #205

yangkennyk opened this issue Jan 12, 2023 · 9 comments

Comments

@yangkennyk
Copy link

I can't seem to be able to use alt+shift + key for binding keyboard shortcuts. I tried removing all although bindings to alt to say if maybe that was the issue but it doesn't record the shortcut.

Is this intentional?

I'm used to using alt+shift + h,j,k,l for window shortcuts and it would be nice if not.

@rxhanson
Copy link
Owner

In the settings tab, check the box for "Remove shortcut recorder safeguards"

Those key combinations are likely used somewhere in macOS. I have plans to migrate to a different shortcut recorder at some point, where I might be able to add in more detailed communication of this type of behavior.

@yangkennyk
Copy link
Author

@rxhanson I think I had removed bindings to those keys before trying. I was able to bind them in other apps. For some keys i'll get a prompt from rectangle saying that the binding is already in use but for these it registers the alt+shift but once I press any other key it cancels.

as an aside. Is there any sort of utility to figure out what app a key is binded to?

@rxhanson
Copy link
Owner

The keyboard shortcut recorder (MASShortcut) has logic that checks with macOS for whether or not it should record, so it would be macOS erroneously reporting back that the shortcut cannot be recorded. In this case, any shortcut recorder that checks with macOS would have the same issue.

If a shortcut is captured elsewhere before it makes it to Rectangle Pro's recorder, then Rectangle Pro wouldn't be able to record it, regardless of that checkbox in the settings tab.

Is there any sort of utility to figure out what app a key is binded to?

I don't know of any, but it would be dependent on being able to ask the macOS API what shortcuts have been recorded and that wouldn't be able to catch apps that listen to keystrokes rather than using the macOS API.

@yangkennyk
Copy link
Author

yangkennyk commented Jan 13, 2023

@rxhanson here's a video of me trying alt+shift+h on rectangle vs moom. it doesn't seem to reach MASShortcut. any combination of alt+shift + key doesn't seem to register.

not quite sure how to debug it. I guess unless I just systematically close out every app to figure out the culprit.

I'd like to switch over to rectangle but just really used to using alt+shift as a modifier 🥲

is it possible that moom listens to keystrokes+macOS api or only keystrokes opposed to just macOS api?

2023-01-13_07-54-40.mp4

@yangkennyk
Copy link
Author

@rxhanson I think I may have found the reason

cocoabits/MASShortcut#161

can you confirm if you are able to get any alt+shift + key bindings to work on your end?

@rxhanson
Copy link
Owner

rxhanson commented Jan 13, 2023

image

(alt+shift bindings work fine for me)

I don't know what Moom could be doing, but as a crude workaround you could circumvent MASShortcut by making shortcuts close to what you want, then exporting the config and modifying the json to import back in.

I do have plans to migrate away from MASShortcut to the Sindre Sorhus library. My MASShortcut is modified quite a bit, so I have some work to do to bring it up to what I need. But in your case, I don't know if that would fix your issue regardless; and maybe something that just listens to keystrokes would be the only way to get around it.

This all points to some other app catching your shortcut :(

@yangkennyk
Copy link
Author

@rxhanson ah I see. I don't have much understanding in terms of how the macOS api works. Would a keybinding be "released" if the app that is taking over alt+shift is closed or would I have to completely remove the binding in order for the binding to be released?

@rxhanson
Copy link
Owner

@yangkennyk My expectation is that a closed app releases the key binding that it had, and this is what I have always observed.

With that said, I have had a few other users with issues like this and the only ones that solved it found a running application that had those keybindings registered. I think there were a couple that never found out what was going on as far as I know.

@yangkennyk
Copy link
Author

@rxhanson what keyboard input do you use?

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants