How to change the buttons on Xiaomi Redmi 8: 4 working methods with explanations

Owners of Xiaomi Redmi 8 often face the inconvenience of standard button layout โ€“ especially if the smartphone is used with the left hand or after switching from other brands (for example, Samsung with a traditional Back-List-Home layout). Fortunately, the model supports several ways to reassign keys, including hardware settings, third-party applications and even editing system files for advanced users.

But before we make any changes, it's important to understand that not all methods are equally safe. ADB-In this article, we will discuss 4 proven methods, from the simplest to the most radical, and explain which are reversible and which require backup data.

If you have never changed Xiaomiโ€™s system settings before, start with the first section, which describes the official methods without risking a guarantee. Experienced users will be interested in the section on manual editing of configuration files, which allows you not only to swap buttons in places, but also to add additional features (for example, double-pressing to lock the screen).

โš ๏ธ Warning: On models with a locked bootloader, some methods may not work. โ†’ The phone. โ†’ Version. MIUI (Click 7 times on "Core" if you see this device is locked, use only root-free methods.

1.Official method: customizing gestures and buttons in MIUI

The most secure and recommended method by Xiaomi is the use of built-in MIUI options. It does not require superuser rights and is suitable for most firmware versions (starting with MIUI 10).

To swap the navigation buttons (for example, do "Back" on the right and "Recent" on the left), follow the following steps:

  1. Open the settings โ†’ System โ†’ Gestures.
  2. Select the Navigation button (if you use the classic bar, not gestures).
  3. Slip on the location of the buttons and choose the desired option from the proposed schemes.
  4. Save the changes and restart the device (optional, but recommended for stability).

โœ… Pros of the method:

  • ๐Ÿ”„ Reversible change โ€“ you can return the standard layout at any time.
  • ๐Ÿ›ก๏ธ Does not affect the warranty and does not require unlocking the bootloader.
  • ๐Ÿ“ฑ It works on all versions of Redmi 8 (including global and Chinese firmware).

โŒ Cons:

  • โŒ Limited choice of schemes โ€“ you can not create a fully custom layout.
  • โŒ It doesnโ€™t work if you use full-screen gestures (in this case, the navigation buttons are hidden).
๐Ÿ“Š What button scheme do you prefer?
Classic (Back Home Recent)
Back (Recent Home Back)
Gestures without buttons
other

2. applications for button reassignment (without root)

If built-in MIUI options arenโ€™t enough, you can use third-party utilities, such as the Button Mapper app (available on Google Play) allowing you to reassign both software and hardware buttons (like a Bixby key if you have one on your model).

Instructions for using Button Mapper:

  1. Download and install the app from Google Play.
  2. Provide access to Special Features (in Android settings).
  3. Select the button you want to reassign (e.g. Recent Apps).
  4. Assign a new action: Back, Home, or a custom team.
  5. Save the profile and restart the application.

๐Ÿ’ก Useful tip: If buttons don't respond after a change, check if the battery optimizer blocks them. Add Button Mapper to exceptions: Settings โ†’ Annexes โ†’ Permits โ†’ Auto-start.

Enable debugging over USB (for some functions)

Provide access to special opportunities

Disable battery optimization for the application

Reboot your phone after settings-->

โš ๏ธ Note: On some Xiaomi firmware, button reassignment apps may conflict with system services. If lags or spontaneous reboots appear after the changes, return the standard settings and remove the utility.

3. editing system files (root required)

For users with unlocked bootloader and superuser rights, the most flexible method is available - manual editing of the qemu.hw.mainkeys file. This method allows not only to swap buttons in places, but also to disable unnecessary ones (for example, the Google Assistant key), as well as add new functions.

๐Ÿ”ง Step-by-step instruction:

  1. Install a file manager with root support (such as Root Explorer or Solid Explorer).
  2. Go to /system/usr/keylayout/.
  3. Find Generic.kl or qwerty.kl (depending on the firmware).
  4. Make a backup copy of the file (copy it on the SD-map).
  5. Open the file in the text editor and find the strings with the button definitions: key 158 BACK key 172 HOME key 139 MENU
  6. Change the key to the key 158 HOME and the key 172 BACK.
  7. Save the file, set the rights to 644 (rw-r--r---) and restart the device.

โš ๏ธ Note: Incorrect editing of the Generic.kl file may cause the touch buttons to fail completely. If the screen does not respond to clicks after rebooting, restore the file backup via the TWRP or Fastboot.

What if the buttons stopped working after editing?
If the touch keys don't respond, connect the phone to your PC and execute the command: adb shell su restorecon -R /system/usr/keylayout/ Then restart the device. If that doesn't work, return the original file from the backup.

๐Ÿ“Š Comparison of button reassignment methods:

MethodRoot is required.ReversibilityRisk to the systemFlexibility of settings
Built-in MIUI settingsโŒ No.โœ… Yes.โŒ No.โš ๏ธ Limited.
Button MapperโŒ No.โœ… Yes.โš ๏ธ Low.โœ… Tall.
Editing by Generic.klโœ… Yes.โœ… Yeah, backup)โŒ High-pitchedโœ… Maximum
Modified firmwareโœ… Yes.โš ๏ธ Partially.โŒ criticalโœ… Full customization

4. Installation of custom firmware with alternative layout

For the most advanced users, there is a radical way to install custom firmware (such as LineageOS or Pixel Experience), which supports flexible button settings. This method is suitable if you not only want to change the location of the keys, but also get additional features such as:

  • ๐Ÿ”„ Dynamic change of layout depending on the orientation of the screen.
  • ๐ŸŽฏ Adding new gestures (e.g. swipe up to call Google Assistant).
  • ๐Ÿ”ง Disabling hardware buttons in favor of software.

๐Ÿ”จ How to install custom firmware:

  1. Unlock bootloader through the official Mi Unlock Tool (requires a Xiaomi account binding).
  2. Install a custom TWRP recap for Redmi 8 (the version must match the model code, for example, olive for the global version).
  3. Download firmware (e.g. LineageOS 18.1) from the XDA Developers website.
  4. Run a full reset (Wipe โ†’ Advanced Wipe โ†’ Dalvik, Cache, System, Data).
  5. Install the firmware via TWRP and restart the device.

โš ๏ธ Attention: Installing custom firmware will void the warranty and may result in data loss:

  • Create a backup through TWRP or Mi Cloud.
  • Check firmware compatibility with your model (Redmi 8 is codenamed olive, Redmi 8A is olivelite).

๐Ÿ’ก

Custom firmware gives you maximum customization freedom, but requires technical knowledge. If you're a beginner, start with official methods or apps without root.

5. Frequent errors and their solutions

When changing the layout of the buttons, users of Xiaomi Redmi 8 often face typical problems, and here are the most common ones and how to fix them:

๐Ÿ”น The buttons do not respond after the change:

  • ๐Ÿ”„ Restart your device โ€“ sometimes system services donโ€™t apply settings right away.
  • ๐Ÿ› ๏ธ Check if the installed reassignment application conflicts with other utilities (for example, Nova Launcher or Tasker).
  • ๐Ÿ“ฑ Reset your gesture settings in Settings โ†’ System system โ†’ Gestures โ†’ Reset.

๐Ÿ”น No settings are saved in Button Mapper:

  • ๐Ÿ”ง Give the application the right to Overlay over other windows (Settings) โ†’ Annexes โ†’ Button Mapper โ†’ Permits).
  • ๐Ÿ”‹ Disable battery optimization for utility.
  • ๐Ÿ“ฒ Update the application to the latest version.

๐Ÿ”น After editing Generic.kl, the phone is bootlooped:

  • ๐Ÿ’ป Connect the device to the PC and restore the original file through ADB: adb push Generic.kl /system/usr/keylayout/ adb shell chmod 644 /system/usr/keylayout/Generic.kl
  • ๐Ÿ”„ If ADB It does not work, run the stock firmware through Fastboot.

๐Ÿ’ก

If youโ€™re experimenting with system files, always keep an archive of original firmware for your model on hand.

6. Alternative solutions: gestures and virtual buttons

If reassigning hardware buttons seems too complicated, consider alternative ways to manage:

  • ๐Ÿ‘† Full-screen gestures: B MIUI 12+ You can completely disable navigation buttons using swipes from the bottom edge of the screen. โ†’ System system โ†’ Gestures โ†’ Full-screen gestures.
  • ๐Ÿ–ฑ๏ธ Virtual buttons: Apps like Floating Soft Buttons add floating keys that can be moved around the screen.
  • ๐ŸŽฎ Game Triggers: In Game Turbo Mode (Settings) โ†’ Special facilities โ†’ Game Turbo: You can assign additional buttons for convenience in games.

โœ… Advantages of Alternative Methods:

  • ๐Ÿ”„ No interference with system files.
  • ๐Ÿ›ก๏ธ Compatible with any firmware.
  • ๐ŸŽฏ Allows you to configure control for specific tasks (for example, simultaneously pressing two buttons for a screenshot).

โŒ Deficiencies:

  • โŒ Can take up space on the screen (virtual buttons).
  • โŒ Some gestures conflict with apps (like swiping up on Instagram).

FAQ: Answers to Frequent Questions

Can I swap physical buttons (volume, power) on Redmi 8?
No, physical buttons (Volume Up/Down, Power) cannot be reassigned software without deep modification of the kernel, but their functions can be duplicated using applications like Button Mapper (for example, assign a long press on Volume Down to start the camera).
Why did the button settings reset after the MIUI update?
MIUI updates sometimes reset custom gesture and button settings. To avoid this, before updating: Take screenshots of current settings. Save profile to Button Mapper (if you use). After updating, return the settings manually.
Will the button reassignment on Redmi 8 work with custom recavery, but no root?
Partially. Some features (e.g., editing Generic.kl) require root rights, but applications like Button Mapper can work without root, but with limitations (e.g., they canโ€™t reassign hardware volume buttons).
How to return the standard layout of the buttons, if I forgot that I changed?
The method of return depends on the method of change: ๐Ÿ”„ If you have used the built-in settings MIUI โ€” Return the standard scheme to Settings โ†’ System system โ†’ Gestures. ๐Ÿ“ฑ If you changed it through Button Mapper, delete the app or reset its settings. ๐Ÿ”ง If you edited Generic.kl โ€“ restore the original file from the backup or reflash the stock firmware.
Can I reassign the Box button to Redmi 8 (if I have one)?
Xiaomi Redmi 8 It is not equipped with a Bixby hardware button (unlike some Samsung models), but if you mean the Google Assistant button (it is emulated on some firmware), it can be disabled or reassigned via a computer. ADB: adb shell pm uninstall -k --user 0 com.google.android.apps.googleassistant โš ๏ธ This will remove Google Assistant for the current user.