MASShortcut icon indicating copy to clipboard operation
MASShortcut copied to clipboard

Toggling shortcut handling? e.g. an off-mode

Open mcint opened this issue 3 years ago β€’ 6 comments

I'm looking to add functionality to rxhanson/Rectangle (discussion), which relies on MASShortcut and listens globally (vs just while focused), to toggle shortcut handling on and off. I would like to have a shortcut, which enables and disables handling of shortcuts by the client app, allowing me to use the same shortcuts in other apps.

Is this kind of functionality currently possible? Is it easy, as in supported for groups of shortcuts, e.g. all but the toggling key combination?

mcint avatar Mar 05 '21 23:03 mcint

Hi @mcint πŸ‘‹ There is no such property as isEnabled, although it’s a great idea. You have to register and unregister manually, if I get your question correctly. Sorry for the slow reply!

shpakovski avatar Mar 07 '21 12:03 shpakovski

Thanks @shpakovski πŸ‘‹ . If I were interested in implementing this feature, I might go a little further and make activate-able groups, just implementing 1 app-wide by default. Mmm, I need to sketch out for myself how MAS instances in applications fit into the system.

It looks like #115 is a good foundation for what I'm looking for here. Ah, you are merging PRs. Any limitations or concerns about #115 ?

mcint avatar Apr 10 '22 20:04 mcint

The #115 has got conflicts with the main branch, but this looks like what you are looking for.

shpakovski avatar Apr 11 '22 03:04 shpakovski

@shpakovski #115 fixes quite an important flaw of this library. Any plans to ever get that PR (or new PR with similar functionality) merged?

RaimundasSakalauskas avatar Jan 24 '23 12:01 RaimundasSakalauskas

@RaimundasSakalauskas Thank you for the heads up. That PR has got unresolved conflicts. Could you please fix them first?

shpakovski avatar Jan 25 '23 04:01 shpakovski

Maybe original author of the PR would like to do it? Post a comment on the PR. I am currently working on MVP app that uses this lib, so since this is MVP that lacks 80% of features, this UX issue is very low on priority list. Like they said in chernobyl movie "not great, not terrible".

RaimundasSakalauskas avatar Jan 25 '23 13:01 RaimundasSakalauskas