Screenshots
Description
MX3 Button Mapper remaps hardware buttons on MX3-style air-mouse remotes connected to Google TV devices -- buttons that send the wrong keycode, or nothing useful at all, out of the box.
It works by combining two Android mechanisms:
• An Accessibility Service that listens for raw scancodes system-wide and can consume (swallow) the original button press.
• Shizuku, used to inject a replacement keycode or press sequence in place of the original one. Shizuku grants this using the same shell-level privileges 'adb shell input keyevent' already has, so no root is required. If Shizuku isn't connected but the device is rooted, the app falls back to injecting keys via 'su' instead, and so will ask your root manager for superuser access.
Supported mapping types (a ready-made default mapping set is built in, so there is nothing to configure per button):
• Remap a button to a different keycode (e.g. a stray Page Up/Page Down button remapped to proper Channel Up/Channel Down).
• Fire the same keycode several times in one press (e.g. a single button that sends three Volume Down presses).
• Remap a button differently depending on which app is in the foreground (e.g. Channel Up/Down inside the TV app, a single Page Up/Page Down inside Kodi, and a burst of D-pad presses to jump through lists everywhere else).
• Launch an app directly from a button press, while holding the same button still sends its normal long-press (e.g. tapping Home opens MX3 Launcher, holding it long-presses Home).
In-app settings:
• TV brand (TCL or Blaupunkt), since these TVs expect different keycodes for the remote's TV button and use different live-TV apps.
• Optional key-press logging for troubleshooting, off by default.
• App language, with the interface translated into around 100 languages.
The app also sets itself up via Shizuku: once you agree to the in-app disclosure, it enables its own Accessibility Service for you, so there is no need to dig through Settings -> Accessibility by hand, it can launch your chosen launcher on startup, and on TCL TVs it re-grants the auto-start permission that TCL's firmware otherwise removes, so the mapper keeps working after a reboot.
Note: some of the default mappings launch specific third-party apps for convenience (e.g. jumping straight to a launcher, a video app or a browser).
Accessibility Service API use:
This app uses the Accessibility Service API for its core function. The service:
• Receives hardware key events from your remote so it can replace specific buttons with a different key, a burst of key presses, or an app launch. Buttons that aren't mapped pass through untouched.
• Receives window-change events only to learn the package name of the app on screen, so a button can behave differently inside the TV app.
It does not read screen content, text or passwords. No key presses or other data are collected, stored (unless you turn on the optional troubleshooting logs, which stay on the device) or shared -- the app has no internet access. The service is only turned on after you agree to an in-app disclosure, and you can turn it off at any time in Settings -> Accessibility.
What’s new (0.0.53)
* The app now explains exactly what its Accessibility Service reads
and why, and asks for your agreement before turning it on -- it is
never enabled without your consent.
* The Accessibility Service now only asks Android for the window
changes it actually needs, rather than every accessibility event.
Versions
Permissions
What the app asks the system for. Android only grants sensitive access after you confirm it.
- NotificationsShow notifications.
- Network stateCheck whether and how the device is connected.
- Change networkChange network connections.
- mx3buttonmapper.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION
- permission.API_V23
Comments