Properly remapping any key on a rooted phone

Qin F21 Pro Key Remapping Guide

This is great for the qin f21 pro to add volume buttons

Complete Step-by-Step Instructions

:pushpin: What You’ll Achieve

  • Owl button → Screen lock (SLEEP)
  • D-Pad UP → Volume up
  • D-Pad DOWN → Volume down
  • (the ability to change other buttons)

:warning: Requirements

  • Rooted Qin F21 Pro
  • MT Manager installed
  • 5 minutes of time

:wrench: Part 1: Find Your Key Codes

  1. Open MT Manager
  2. Tap “Terminal” (bottom-right)
  3. Type:
    getevent -l
    
  4. Press these buttons and note their codes:
    • Owl button
    • D-Pad UP
    • D-Pad DOWN
      (Example output: KEY_UP = code 103)

:pencil: Part 2: Edit Key Files

  1. In MT Manager, navigate to:

    /system/usr/keylayout/
    
  2. Make backup copies of:

    • Generic.kl
    • mtk-tp.kl
  3. Open both files one by one

  4. Find and modify these lines (using your actual codes):

    # Owl Button (example: key 142)
    key 142   SLEEP
    
    # D-Pad UP (example: key 103) 
    key 103   VOLUME_UP
    
    # D-Pad DOWN (example: key 108)
    key 108   VOLUME_DOWN
    
  5. Save both files after editing

:counterclockwise_arrows_button: Part 3: Apply Changes

  1. Reboot your phone
  2. Test each remapped button:
    • Press Owl → Screen should lock
    • D-Pad UP/DOWN → Should adjust volume

:hammer_and_wrench: Troubleshooting

:cross_mark: Buttons not working?

  • Did you edit both files?
  • Did you use correct key codes?

:light_bulb: Pro Tip:
Keep your backup files - you can restore them if needed!

:white_check_mark: Final Checklist

  • Found correct key codes
  • Edited both .kl files
  • Saved changes
  • Rebooted device
  • Tested all remapped buttons

Enjoy your optimized Qin F21 Pro! The D-Pad now gives you perfect volume control while keeping the Owl button as a quick screen locker.

7 Likes