Overview
The physical three-stage alert slider found on OnePlus devices and modern customizable side keys on OPPO/Realme hardware provide tactile hardware convenience. However, stock ColorOS and OxygenOS restrict these buttons to predefined audio profiles or limited assistant triggers.
Developed by ItosEO, OplusKey is a lightweight, high-performance root module written in C++. It intercepts hardware input streams directly from kernel /dev/input/ event nodes, enabling users to rebind the alert slider and custom physical buttons to any custom shell script or system action.
Key Capabilities
- Classic Three-Stage Slider:
- Listens for slider position changes between top, middle, and bottom states.
- Automatically suppresses stock OEM audio profile switches, allowing you to repurpose the slider for custom modes (such as toggling battery saver, private mode, or orientation lock).
- Modern Multi-Action Side Keys:
- Detects complex click cadences: single click, double click, triple click, and long press.
- Ultra-Low Power C++ Architecture:
- The compiled native daemon uses non-blocking stream listening and sets its CPU thread affinity strictly to a single little/efficiency core, keeping battery consumption virtually undetectable.
Configuration & Usage
The module includes sample shell actions that you can tailor to your preferences:
- Common Actions: Toggle flashlight, turn on/off Bluetooth, switch NFC state, initiate background voice recording, or start screen recording.
- For modern customizable side buttons, set the default system setting to No Action in ColorOS/OxygenOS settings, allowing OplusKey’s native listener to handle all inputs.
Installation
- Download the latest
OplusKey-*.ziprelease from GitHub. - Flash the module in Magisk.
- Reboot your device.
- Customize your trigger actions in the module’s script directory to suit your workflow.
