documents/android/button-mapper.md
Table of Contents
Button Mapper — Remap Hardware Keys on Android
Remap physical buttons (including AI/Gemini/Assistant keys) to launch any app or action.
Use Case
Hardware Android keyboards (Bluetooth/wired) sometimes have a dedicated AI/Gemini button. This app lets you intercept that keypress and redirect it to open whatever app you want instead.
Setup
-
Install: Button Mapper (flar2) from Play Store
- Free version works for basic remapping
- Pro (~$4) unlocks custom keycodes, per-app blacklisting, screen-off remapping
-
Grant accessibility:
Settings → Accessibility → Installed apps → Button Mapper → enable -
Add the key:
- Open Button Mapper → tap "Add button" → press the AI/Gemini key
- If detected, assign Single / Double / Long press actions
- Pick "Open app" and choose your target
If the Key Isn't Detected
Some keyboards send non-standard keycodes or intercept at a lower level.
Try these alternatives:
- Key Mapper (Play Store) — sometimes catches what Button Mapper misses
- Identify the keycode: use an app like Key Test or
adb shell getevent -l - ADB remap: Once you know the keycode, you can remap system-level via ADB
The Assist App Trick
Many keyboards fire the AI button as a standard KEYCODE_ASSIST (219). If so:
Settings → Apps → Default apps → Digital assistant app- Install an app like Assist Mapper or Assistant Remap
- Set it as your default assistant
- Configure it to launch your chosen app
This intercepts the "launch assistant" intent before Gemini gets it.
Related
documents/android/voice-access.md— speech-to-text dictation via Accessibilitydocuments/keyboards/— hardware keyboard layouts & mods