I want to fix it so the home button long press kills a particular app. I can't see the option for home long press in Tasker or Macrodroid.

Galaxy S5, rooted, CM Marshmallow, Xposed installed.

  • 1
    Xposed Additions allows modifying long-press behaviour, but executing more complicated actions is a bit out of it...
    – Andy Yan
    Aug 22 '17 at 7:43
  • Additions can execute Tasker actions, so this gets me close. However, tasker won't kill the app successfully
    – Ne Mo
    Aug 23 '17 at 20:25

Macrodroid doesn't offer an action based on home key trigger. Macrodroid developer in app forums says

It's impossible to create such a trigger because the home button is a fundamental part of the OS and there is no way to intercept the button press.

I don't know Tasker, but guess the same limitations would apply, so you would need to find an alternative way. One method below:

Since you are on CM, you can use Gravity Box Xposed module

To kill foreground app

Navigation keys action → Home key → long press action → Kill foreground application

To kill a particular app - combination of Gravity Box and Macrodroid

Navigation keys action → Home key → long press action → Custom actions → toggle applications to reveal shortcuts → Macrodroid Shortcuts → Add new macro

Trigger → Empty Trigger

Action : Kill application → choose application from drop down menu

  • If your ROM offers you navigation bar, you can add a custom key from navigation bar tweaks and assign similarly
    – beeshyams
    Aug 22 '17 at 9:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.