documents/android/button-mapper.md

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

  1. Install: Button Mapper (flar2) from Play Store

    • Free version works for basic remapping
    • Pro (~$4) unlocks custom keycodes, per-app blacklisting, screen-off remapping
  2. Grant accessibility: Settings → Accessibility → Installed apps → Button Mapper → enable

  3. 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:

  1. Settings → Apps → Default apps → Digital assistant app
  2. Install an app like Assist Mapper or Assistant Remap
  3. Set it as your default assistant
  4. Configure it to launch your chosen app

This intercepts the "launch assistant" intent before Gemini gets it.

  • documents/android/voice-access.md — speech-to-text dictation via Accessibility
  • documents/keyboards/ — hardware keyboard layouts & mods