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

Launcher not in foreground constraint prevents other apps from triggering the key map #1525

Open
1 task
githubsterer opened this issue Mar 13, 2025 · 4 comments
Assignees
Labels
bug Something isn't working needs triage

Comments

@githubsterer
Copy link

Developer TODO (don't remove)

  • update documentation

Describe the bug
Using OneUI Home to constrain a key map disables the use of all created Key Mapper home shortcuts and links to other apps because they are perceived to be launched from the home screen.

@githubsterer githubsterer added bug Something isn't working needs triage labels Mar 13, 2025
@jambl3r
Copy link
Collaborator

jambl3r commented Mar 14, 2025

Could you clarify what you mean by this? Is it that if you use constraint "App not in foreground: OneUI Home', the home shortcuts never work? And crucially is that also true if you trigger the shortcut with intents in another app?

@githubsterer
Copy link
Author

In an effort to find a safe harbor to quickly pause Key Mapper, because none of the normal constraints for volume control were working, I stumbled upon this internal OneUI Home "app" in the list of available apps to use for the Not In Foreground constraint that actually controls the Home, Apps, and Recents screens and thought, gee this is useful for a quick and dirty way to temporarily pause the key map by flicking there to make the volume change and flicking back to where I was working. And that actually works well in theory.

In practice, while it's better than having no volume control it's still not very helpful when you're in the middle of a call or video, however I'm very encouraged they you're fixing that now so this won't ordinarily be necessary.

Nonetheless, the idea is still a good one to implement a Recents Screen constraint because then it would be limited to that one screen and not apply to the Home and Apps screens where you might want to use a key map. It's so quick and easy, much more so than getting to the quick settings icon to tap.

The issue with the shortcuts is, that because the Home screen is being used as a constraint, then the home shortcuts created for key maps that are then called by other apps are also paused even if you're not actually at the Home screen because it is being perceived as if you are and thus they don't work.

The bottom line fix for this, assuming the shortcuts issue is baked in because there's no way to exclude them from the constraint, is to filter out the OneUI Home from the available apps list to prevent the user from selecting it and accidentally messing up the shortcuts and links, but to also then offer the Recents screen as a primary constraint included in your built-in list as the best option for most people, most of the time, to quickly disable an action.

As with the other two parts of this solution, the not in phone call and media not playing constraints, I would at some point make these into a global settings option to apply to every key map, rather than having to set them for each one separately. But for now having these constraints for each key map is fine.

@jambl3r
Copy link
Collaborator

jambl3r commented Mar 15, 2025

I think I understand now but just to clarify the answers to my questions

Is it that if you use constraint "App not in foreground: OneUI Home', the home shortcuts never work?
And crucially is that also true if you trigger the shortcut with intents in another app?

The answers are 'yes' and 'yes'?

@jambl3r jambl3r changed the title OneUI Home Constraint Breaks Key Mapper Shortcuts and Links Launcher not in foreground constraint prevents other apps from triggering the key map Mar 15, 2025
@githubsterer
Copy link
Author

Yes and yes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage
Projects
None yet
Development

No branches or pull requests

3 participants