Key Mapper
4.5.0-foss · GitHub
More about this app
An Android app that changes what the buttons do on your devices!
Unleash your keys!
Make custom macros on your keyboard or gamepad, make on-screen buttons in any app, and unlock new functionality from your volume buttons!
Key Mapper supports a huge variety of buttons and keys:
- ALL your phone buttons (volume AND side key)
- Game controllers (D-pad, ABXY, and most others)
- Keyboards
- Mouse buttons
- Headsets and headphones
- Fingerprint sensor
Most devices are already supported, with new devices being added over time. Let us know if it's not working for you and we can prioritize your device.
Not currently supported:
- Joysticks and triggers (LT,RT) on gamepads
Not enough keys? Design your own on-screen button layouts and remap those just like real keys!
What shortcuts can I make?
With over 100 individual actions, the sky is the limit.
Build complex macros with screen taps and gestures, keyboard inputs, open apps, control media, and even send intents directly to other apps.
How much control do I have?
TRIGGERS: You decide how to trigger a key map. Long press, double press, press as many times as you like! Combine keys on different devices, and even include your on-screen buttons.
ACTIONS: Design specific macros for what you want to do. Combine over 100 actions, and choose the delay between each one. Set repeating actions to automate and speed up slow tasks.
CONSTRAINTS: You choose when key maps should run and when they shouldn't. Only need it in one specific app? Or when media is playing? On your lockscreen? Constrain your key maps for maximum control.
Links
Come say hi in our Discord community!
Read the documentation!
Translations
Contributing
There are many ways to help with this project. 😃 Check out the contributing guide in the documentation.
How Shizuku is used
Can remap buttons, run custom shell commands and toggle system radios via `sh` and system services.
This is an AI-assisted analysis of Shizuku-related usages in the app's public source code. It is best effort, so it may not catch every single usage.
How this app uses Shizuku
Key Mapper uses Shizuku to start a privileged helper that runs with shell rights and performs remapping and automation actions for key maps.
- Remap physical buttons: grab connected keyboards, gamepads and other input devices at Linux input level, read their events and rewrite or block them so pressed buttons trigger remapped keys.
- Inject key input: send remapped key and motion events into Android through the system input service when a key map triggers.
- Run shell commands: run a shell script the user types as a key map action with shell privileges, plus built in status bar and power key commands.
- Toggle wireless radios: turn WiFi, Bluetooth, NFC, mobile data, airplane mode and WiFi hotspot on or off as key map actions through system services.
- Change ringer mode: switch between normal, vibrate and silent as a key map action through the audio service.
- Stop foreground apps: force stop the current app or remove it from recents as a key map action through the activity services.
- Grant app permissions: self grant permissions such as write secure settings needed for settings and system actions through elevated system binders.
- Browse system settings: list system, secure and global settings values with elevated rights to help choose a setting action to automate.
Android APIs or commands used
IInputManager.injectInputEventIWifiManager.setWifiEnabledIBluetoothManager.enableIBluetoothManager.disableINfcAdapter.enableINfcAdapter.disableITelephony.setDataEnabledForReasonITelephony.setUserDataEnabledIConnectivityManager.setAirplaneModeIActivityManager.forceStopPackageIActivityManager.removeTaskIAudioService.setRingerModeInternalITetheringConnector.startTetheringITetheringConnector.stopTetheringIPermissionManager.grantRuntimePermissionIPackageManager.grantRuntimePermissionIContentProvider.queryshcmd statusbar expand-notificationscmd statusbar expand-settingsinput keyevent
Notable details
The same privileged helper can also be started with ADB or root, and standard shell command actions can run without elevated rights.
Changelog
What's new for version 4.5.0-foss
• Group constraints with their own AND/OR logic • New vibrate action with custom duration or haptic effects • Cycle enabled keyboards action • Notification constraint • Turn off, duplicate and rename actions • Many other bug fixes and improvements
📖 View the complete changelog at: http://keymapper.app/changelog
Permissions
33 permissions requested
Sources
2 sources
Sources
2 sources

