[MOD][MAGISK] Mi AI Button Remapper

Search This thread

Serbinhio

Senior Member
Feb 8, 2013
53
37
cr0wsplace.com
Description:
This module remaps the functionality of the AI button. There are several options available until now but with your help and testing we can enrich the functionality.

Screenshot-2019-04-05-00-14-06-422-com-topjohnwu-magisk.png


Requirements:
- Magisk Installed

Installation:
- Flash in Magisk or TWRP
- If you want to reassign a new functionality to the button reinstall the module.

To uninstall:
- Uninstall from the modules section in Magisk Manager

Bugs
- Only single press for now! Basically this mod changes the functionality of the button so it is not recognized by the system as the AI button anymore and you cannot assign long press or double tap functions! Searching for a solution :)
- Maybe more ;)

Download

Module is in testing phase. Use at your own risk. :D
 
Last edited:

Serbinhio

Senior Member
Feb 8, 2013
53
37
cr0wsplace.com
I using single tap for music player. Working very well but when u want use double tap u can't coz music player is open immediately and second tap isn't recognised.
The problem is that remapping the single tap functionality results in miui not recognizing the button as "AI" button so it cannot perform the double and long press functions! This means that you have to use some 3rd party app to assign these functionalities :)
 

Serbinhio

Senior Member
Feb 8, 2013
53
37
cr0wsplace.com
If you use tasker you can assign double tap, trible tap and even more. I wrote down some actions I programmed for my AI button https://forum.xda-developers.com/showpost.php?p=78523778&postcount=38
I can share my tasker events if anyone is interested.
@Serbinhio: Does your module work if screen is off?

Thanks for your input. I mainly edit the /sdcard/Downloads/gpio-keys.kl as you describe in your post so I think that the combination of this mod and tasker is the best bet here! I have also posted in the Mi Mix 3 forum but you can include me in your post if you want and you find the mod handy, cause you do not mess up with files and editing (for new users).

For your other question Yes the button works when screen is off. For example, when I set the "Next Media" function, the song changes when I press the button even if the screen is off :)
 

doggydog2

Senior Member
Jul 2, 2007
598
241
Samsung Galaxy S10
OnePlus 8 Pro
Easy solution: Xposed Edge, the must have tool.. Register this hardware key in "Keys" section and easily configure tap, double tap, and long tap.. Nothing special required for this phone (Samsungs often need enablers first, then again you remap it with Edge). Even can mix with XIAOMI settings if you want. And can remap much more (volume keys, headphone insertion event and tons more). No brainer.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 14
    Description:
    This module remaps the functionality of the AI button. There are several options available until now but with your help and testing we can enrich the functionality.

    Screenshot-2019-04-05-00-14-06-422-com-topjohnwu-magisk.png


    Requirements:
    - Magisk Installed

    Installation:
    - Flash in Magisk or TWRP
    - If you want to reassign a new functionality to the button reinstall the module.

    To uninstall:
    - Uninstall from the modules section in Magisk Manager

    Bugs
    - Only single press for now! Basically this mod changes the functionality of the button so it is not recognized by the system as the AI button anymore and you cannot assign long press or double tap functions! Searching for a solution :)
    - Maybe more ;)

    Download

    Module is in testing phase. Use at your own risk. :D
    4
    Here another idea , AI BUTTON to mute phone or DND MODE
    3
    Possible to add an Ring switcher (one press -> vibrate another press -> silent -> another press sound on
    2
    Very nice.

    Any chance of adding flashlight to the AI button functionality?
    2
    Very nice! Any way to toggle between silent/dnd modes?