-
-
Notifications
You must be signed in to change notification settings - Fork 169
Help
Don't panic! You still have your normal keyboard on your phone. The keyboard built-in to Key Mapper, which is called the "Key Mapper Basic Input Method", has no GUI/buttons. You can install the Key Mapper GUI Keyboard to get a proper keyboard which can perform Key Mapper actions.
This is why the built-in one isn't a usable keyboard...
I originally made the app so I could map the keys on my Bluetooth keyboard to the correct characters since it was made for an iPad. A limitation of Android is an app can only input characters and keys if it is the SELECTED input method, which is why the Key Mapper keyboard needs to be chosen to use the KeyEvent and Text actions. I didn't design it to have an on-screen keyboard since I would be using the physical keyboard anyway. But after many requests and complaints I will implement the AOSP keyboard into the Key Mapper keyboard. This is also why there are a few settings controlling when to show the keyboard, since I wanted to make switching between the on-screen keyboard and the Key Mapper keyboard as simple as possible.
Give the app Do Not Disturb access in your device settings. At the top of the homescreen in the Key Mapper app there is a "Fix" button to do this.
If your device is rooted, Key Mapper can grant itself the permission by enabling the "Key Mapper has root permissions" toggle in the settings.
If your device is not rooted you may have to do the following...
- Enable developer options on your device by going to device Settings -> About Phone and tapping Build Number many times until it says you've enabled developer options. The location of the Build Number may vary between devices.
- Enable USB Debugging in developer options and plug your device into your PC.
- Download the Android SDK platform tools from here and unzip it.
- Open a terminal/command prompt in the unzipped folder.
- Type
adb devices
and your device should show up in the list after you click the prompt on your phone to allow USB debugging from your PC.
If you just need the accessibility service, e.g. to swap touch buttons, fix it with:
- To add KeyMapper to the List of the enabled accessibility providers, type
adb shell settings put secure ENABLED_ACCESSIBILITY_SERVICES io.github.sds100.keymapper/io.github.sds100.keymapper.service.MyAccessibilityService
.
If you need more features of KeyMapper, you may grant KeyMapper an entire set of the permissions (Settings.Secure).
- Type
adb shell pm grant io.github.sds100.keymapper android.permission.WRITE_SECURE_SETTINGS
. You can now choose the Key Mapper keyboard without going into the Android settings. If you haven't done step A. proceed with fixing the accessibility service.
For CI builds the package name is io.github.sds100.keymapper.ci
.
More features which rely on this set of permission will come in the future. 😀
These permissions persist across reboots but need to be granted after reinstalling the app.
- Disable all battery and memory optimisation features on your device! Consult https://dontkillmyapp.com for how to fix this for each device.
- Try REBOOTING!
- If you have made sure they are enabled and they have a trigger, restart the accessibility service by turning it off and on again (help below). If none of these solve your problem, report an issue (bottom of this page).
Open the Key Mapper app and click “Fix”, where it says, “the accessibility service must be enabled”. If that doesn’t work…
- Open your device Settings app.
- Find and open the “Accessibility” section. On some devices it might not be on the main screen and is sometimes under “System”.
- Click the Key Mapper listing.
- Press the switch to enable the Key Mapper accessibility service.
If there isn't an Accessibility settings page on your device, follow the instructions on this page to give the app WRITE_SECURE_SETTINGS permission.
Disable all battery and memory optimisation features on your device. If you have a Xiaomi device enable "no battery restrictions" for this app. Consult https://dontkillmyapp.com for how to fix this for each device.
Many Bluetooth devices (like headphones) don't work unfortunately. Bluetooth keyboards work most of the time.
Samsung Dex doesn't allow apps with a 3rd party keyboard to open while in Dex mode. You can still configure key maps while out of Dex mode and your key maps which don't require a Key Mapper keyboard will still work in Dex mode.
You have probably enabled the app's device administrator in your device's settings. To uninstall the app, you must turn it OFF. The location of the device admin settings page varies widely on devices but on skins close to stock-Android it is under "Security" -> "Device admin apps".
The Key Mapper keyboard must be enabled in your device settings and chosen as the active keyboard.
Open the Key Mapper app and click "Fix" where it says, "the keyboard must be enabled". If that doesn't work…
- Open your device Settings app.
- Find and open the “Languages and Input” section. On some devices it might not be on the main screen and is sometimes under “System”.
- Click on a Key Mapper keyboard to enable the keyboard. The toggle may be hidden under sub-menus on some devices.
- Click on the “Choose keyboard” (“Choose input method” on older devices) notification. Or you can click "Choose Keyboard" by opening the menu at the bottom of the home screen within the app.
- Click on a Key Mapper keyboard.
Change the active keyboard as described above to your preferred keyboard.
On Android 8.1 and newer, ROOT permission is required since Google has blocked the ability for apps to open the input method picker outside of the app. Therefore, this feature is not available on these newer devices. If your device isn’t rooted, Use the Android system's “Change keyboard” notification instead by tapping somewhere you can type and pressing the notification in the notification drawer. If your version of Android doesn't show a notification then there might be an icon in your navigation bar.
Volume increases to max/minimum when pressing power and the respective volume button when the phone is off
This seems to be a bug with accessibility services on Android Pie and newer for some devices. It happens with the Macrodroid app as well when you only enable their accessibility service which filters keyevents. I tested Key Mapper with no code in the onKeyEvent function in the accessibility service and it still happens. I've tested it on a rooted OOS Android 10 OnePlus 6T, rooted stock Android Pie custom ROM on the OnePlus 6t, non-rooted OOS Android 10 OnePlus 7 Pro. It doesn't seem to happen with Android 10 on the Pixel 2.
Not all the Joy Con buttons are visible to accessibility services. There isn't anything the developer can do.
We tested the app on SwitchRoot Android and this is what works...
- ZL (Button L2)
- L (Button L1)
- - (Select)
- + (Start)
- Left analog stick button (unknown keycode 0)
- ZR (Button R2)
- R (Button R1)
- X (Button X)
- Y (Button Y)
- B (Button B)
- A (Button A)
- Home (Home)
- Volume up (Vol up)
- Volume down (Vol down)
- Screenshot button
- All D-Pad buttons (used by OS)
- Both analog sticks (used by OS)
- Right analog stick button
- SR and SL (left joycon)
- SR and SL (right joycon)
- Power button
This feature only works on rooted devices and Key Mapper version 2.1.0+. Let the developer know about any keys you would also like to be supported.
- Volume Up
- Volume Down
- Headset button
The preferred way is to create a Github issue. If you can't do that then leave a review on the Google Play store or go to the XDA thread, Discord server linked in the README and About activity. 😀
Head over to the Discord server and someone will probably help you! If you don't have Discord, politely email the developer at [email protected].