[FREE] [OPEN SOURCE] Keyboard/Button Mapper [NO ADS] [4.4+] - Android Apps and Games

Hello there!
Key Mapper is an open source key mapping application, which aims to remap any combination of your keys/buttons and provide unique features.
It is currently in beta and any feedback (positive or negative) would be greatly appreciated. Please post your thoughts in the thread or send me an email.
First things first...
Downloads!
XDA Labs: https://labs.xda-developers.com/store/app/io.github.sds100.keymapper
Google Play: https://play.google.com/store/apps/details?id=io.github.sds100.keymapper
F-Droid: https://f-droid.org/en/packages/io.github.sds100.keymapper/
GitHub: https://github.com/sds100/KeyMapper/releases
Source code
https://github.com/sds100/KeyMapper
Donations
Ko-Fi: https://ko-fi.com/sethschroeder
What can be remapped?
There is NO GUARANTEE any of these buttons will work and this app isn't designed to control games. Your device's OEM/vendor can prevent them from being remapped.
ONLY HARDWARE buttons can be remapped.
• Volume buttons.
• Navigation buttons.
• Bluetooth/wired keyboards and mice connected to your device.
• Buttons on other connected devices should also work but there is no guarantee.
You can combine multiple keys to form a "trigger" and have as many triggers as you want for each action. You can make a key map only work on a long press and to vibrate as well.
What can’t be remapped?
• Pixel Active Edge
• OnePlus Alert Slider
• Power button
• Bixby button
Your key maps don't work if the screen is OFF.
What can I remap my keys to do?
Some actions will only work on rooted devices and specific Android versions.
• Open an app
• Open an app shortcut. This feature is very useful since you can tell another app to do something Key Mapper can’t. E.g If your launcher has a shortcut to open the app drawer, you can select that shortcut in this app and make any button open the app drawer.
• Go back
• Go home
• Open recents
• Open menu
• Expand notification drawer
• Expand quick settings
• Collapse status bar
• Toggle/enable/disable WiFi
• Toggle/enable/disable Bluetooth
• Toggle/enable/disable mobile data (ROOT only)
• Toggle/enable/disable NFC (ROOT only)
• Toggle Play/pause media
• Pause/play media
• Next/previous track
• Fast forward/rewind
• Volume up/down
• Increase/decrease a specific volume stream
• Cycle through and change the ringer mode
• Show the volume dialog
• Mute/unmute/toggle mute (Android 6.0+)
• Toggle/enable/disable auto-rotate
• Force portrait/landscape mode
• Switch between portrait and landscape mode
• Toggle/enable/disable auto-brightness
• Increase/decrease brightness
• Toggle/enable/disable flashlight (Android 6.0+)
• Take a screenshot (Android 9.0+)
• Open the Google Assistant
• Open camera
• Consume key event (Do nothing)
• Lock the device
• Move the cursor to the end
• Toggle/show/hide the keyboard
• Show the keyboard picker (ROOT only for Android 8.1+)
The Key Mapper input method needs to be selected for these to work and you can’t use a soft keyboard at the same time:
• Input a specific keycode
• Input a key
• Insert a block of text
More will be added. If you have any ideas, leave a comment or email the developer.
What other things can the app do?
• Option to show a persistent notification which can pause/resume your keymaps. It can also open the accessibility settings on the device to enable/disable the service. Rooted devices can start/stop the accessibility service without going into settings and just tap the notification.
• Automatically change the input method to the Key Mapper one and/or show the input method picker when a chosen Bluetooth device is connected and switch back to the old one when it is disconnected.
• Option to show a toast message whenever an action is performed.
• Option to log events and send them to the developer so it is easier to debug issues with the app.
Planned features
• Double tap to perform an action
• Remap media (i.e volume, headset) buttons when the screen is off. Android only allows apps to detect media buttons when the screen is off.
• Action to broadcast an intent with extras.
• Multiple profiles which can be activated and deactivated automatically when a Bluetooth device is connected or when you open an app.
• Integrate the AOSP keyboard into the Key Mapper input method so a soft keyboard can be used at the same time.

CHANGELOG
https://github.com/sds100/KeyMapper/blob/master/CHANGELOG.md

is it possible to remap the play / pause button of the bluetooth headset to start Assistant?where is the download?

dario2106 said:
is it possible to remap the play / pause button of the bluetooth headset to start Assistant?where is the download?
Click to expand...
Click to collapse
I haven't tried using buttons on a Bluetooth headset but I have tried using the buttons on a wired headset and it does work. Most buttons should work as long as they don't have a proprietary implementation in the Android skin you're using. E.g Bixby, Pixel Active Edge. XDA doesn't allow new members to put links in posts until they have posted 10 times for security reasons. Once I can, I will definitely put links in the description.

dario2106 said:
is it possible to remap the play / pause button of the bluetooth headset to start Assistant?where is the download?
Click to expand...
Click to collapse
https://forum.xda-developers.com/android/apps-games/app-keyboard-button-mapper-t3914005
Here is the link to the app on XDA labs

sds100 said:
I haven't tried using buttons on a Bluetooth headset but I have tried using the buttons on a wired headset and it does work. Most buttons should work as long as they don't have a proprietary implementation in the Android skin you're using. E.g Bixby, Pixel Active Edge. XDA doesn't allow new members to put links in posts until they have posted 10 times for security reasons. Once I can, I will definitely put links in the description.
Click to expand...
Click to collapse
Update: I can add links on mobile completely fine. :laugh:

Nice! Will map a button to a broadcast intent be implemented?

Droidphilev said:
Nice! Will map a button to a broadcast intent be implemented?
Click to expand...
Click to collapse
Yeah! Great idea. I've added it to the "issues" on the GitHub repo. I have exams coming up so it will probably be a couple months.

It would be great if you could add the possibility to force close the app in use! Thanks and keep up the work!

articuz said:
It would be great if you could add the possibility to force close the app in use! Thanks and keep up the work!
Click to expand...
Click to collapse
Thanks! That's now been added to the planned features. Would you say the app is stable enough to come out of beta?

New version!
1.1.0 Beta 1
Added
Setting to change the long-press delay.
Persistent notification which can pause/resume your remaps. It can also open the accessibility settings on the device to enable/disable the service. Rooted devices can start/stop the accessibility service without going into settings and just tap the notification.
Use Material Design 2 for homescreen.
Bugs Fixed
Persistent notifications wouldn't show on boot
The app would crash if using the "open google assistant" action if the Google app wasn't installed.
Prevent the accessibility service from stopping if there is a fatal exception and show a toast when it happens.

New version!
1.1.0 Beta 2
Won't immediately crash on KitKat anymore!
Bug Fixes
Persistent IME notification wouldn't automatically show when it is enabled.
App would crash if it couldn't find the device's accessibility settings page.

Feature request:
App currently conflicts if the same button is mapped twice
Example
Short press mute = play/pause
Long press mute= open notification drawer
Result:
Long press mute results in both actions being performed.
Expected result:
Long press mute key should not activate the short press mapping
Fixes:
1. Change short press so that it ONLY activates if the button is RELEASED before the long press kicks in (should be around 500ms)
(Long press delay meaning how long the key must be held before performing the function)
Long press actions should happen if the button is NOT released within that time.
2. Multi-triggers should have a flag for "in sequence" that makes them work in sequence instead simultaneously. In sequence enabled should also Grey out / disable the long press flag on the current trigger.
And you should be able to set the same trigger twice.
Example: vol up, vol up = quick settings
To do this, you'd have to make it so that short presses are only activated if the button is released before the long press delay AND there are no other key presses within 300ms of releasing it
Great app.
Thanks

Nah.uhh said:
Feature request:
App currently conflicts if the same button is mapped twice
Example
Short press mute = play/pause
Long press mute= open notification drawer
Result:
Long press mute results in both actions being performed.
Expected result:
Long press mute key should not activate the short press mapping
Fixes:
1. Change short press so that it ONLY activates if the button is RELEASED before the long press kicks in (should be around 500ms)
(Long press delay meaning how long the key must be held before performing the function)
Long press actions should happen if the button is NOT released within that time.
2. Multi-triggers should have a flag for "in sequence" that makes them work in sequence instead simultaneously. In sequence enabled should also Grey out / disable the long press flag on the current trigger.
And you should be able to set the same trigger twice.
Example: vol up, vol up = quick settings
To do this, you'd have to make it so that short presses are only activated if the button is released before the long press delay AND there are no other key presses within 300ms of releasing it
Great app.
Thanks
Click to expand...
Click to collapse
Thanks for the feedback! I'll try to implement/fix these problems. They should be relatively easy to fix (hopefully). ?

New version!
1.1.0 Beta 3
Reduced the repeat delay to 5ms
Force expand the menu on the homescreen
Made the cards on the homescreen slightly more compact
Added
Flag to vibrate and an option to force vibrate for all actions
Action which just consumes the keyevent and does nothing
Action to lock the device (ROOT only for now) and an option to lock the device securely (without root).
Bug fixes
The bottom app bar on the homescreen would overlap the list items
The app would potentially crash when trying to perform a flashlight action whilst the camera is in use in another app.
Short press actions with the same trigger as a long press action would be performed with the long press action
A keymap would still have the "Show volume dialog" flag if the action is changed to a non volume related action
The app would crash if trying to show the menu on the homescreen if it is already showing.
The accessibility service status on the homescreen wouldn't change when the service is started/stopped.

Hi,
it is possible to make it work with the Mi Box S controller? Especially with the Netflix and Live buttons, I tried the back button and it works, but not those two "special" buttons. I will be very grateful
Sent from my Lenovo TB-8704F using XDA Labs

Ja_som said:
Hi,
it is possible to make it work with the Mi Box S controller? Especially with the Netflix and Live buttons, I tried the back button and it works, but not those two "special" buttons. I will be very grateful
Sent from my Lenovo TB-8704F using XDA Labs
Click to expand...
Click to collapse
Do the other buttons also work? I'm guessing the Netflix and Live buttons don't send a standard KeyEvent which apps installed by the user can see. Xiaomi probably have some agreement with Netfix to have that button there to drive more people to Netflix which is why they don't want us changing it.

sds100 said:
Do the other buttons also work? I'm guessing the Netflix and Live buttons don't send a standard KeyEvent which apps installed by the user can see. Xiaomi probably have some agreement with Netfix to have that button there to drive more people to Netflix which is why they don't want us changing it.
Click to expand...
Click to collapse
Most buttons work, home, back, left, right, up and down are recognized propperly. OK and 'all apps' (not sure if it the right name of that button) have no name in triggers but they work. If I try to record trigger with vol. up or down, it is not recorded, it just changes the volume. The mic. button is recorded with no name, but when I try to use it to trigger the action it does nothing.
Sent from my Lenovo TB-8704F using XDA Labs

Ja_som said:
Most buttons work, home, back, left, right, up and down are recognized propperly. OK and 'all apps' (not sure if it the right name of that button) have no name in triggers but they work. If I try to record trigger with vol. up or down, it is not recorded, it just changes the volume. The mic. button is recorded with no name, but when I try to use it to trigger the action it does nothing.
Sent from my Lenovo TB-8704F using XDA Labs
Click to expand...
Click to collapse
Hmmm... I'll firstly add names to more buttons so they aren't blank. I'm sorry but I don't really know what to do. This behaviour sounds like the accessibility service is broken somehow and needs disabling and then enabling. This has happened to me before during development. But it is likely those buttons won't work. It's quite hit and miss when it comes to non-standard buttons/controllers unfortunately.

No success with Bixby button on S10

Related

[App] bxActions - Remap your Volume buttons! Skip tracks, flashlight and more!

With bxActions you can remap your Bixby and Volume buttons to any action or app you like!
Use the Bixby button launch your camera, silence the phone, take a screenshot or launch any app you like!
Skip tracks with the volume buttons even when the screen is off!
Or use your phone as a Flashlight and start it with a doubletap.
Remap as you like!
FEATURES:
Double and Long press support!
Remap the Bixby button to any action!
Remap the Volume buttons to any action!
Skip tracks with the volume buttons
Different actions when phone is locked or unlocked
High performance! No lags!
No annoying ads
ACTIONS:
Switch mute - sound profiles
Take a screenshot
Google Assistant
Fullscreen Immersive mode
Launch camera or any other app
Toggle flashlight
Switch to last app
Disable Bixby button
30+ actions in total
DOWNLOAD:
Forum download:
does it need root?
edit: nevermind
No root needed.
There are many apps that do the same. However, I guess even this one has the same problem as all others:
When the phone is in sleep mode the buttons won't work, hence, the flashlight won't shine...
As stated you need to run aod to use buttons at screen off.
I just love this app.
Will it work on other phone, besides Samsung also? Oneplus 6 in particular...It would be option I will miss the most if it wouldn't work:/ Ofcourse there is no bixby button, but can you remap volume buttons on other android devices also?
Hey,
What's up with the accessibility permissions?? Why would the app need to know what apps I am using and what I type??
n01z said:
Hey,
What's up with the accessibility permissions?? Why would the app need to know what apps I am using and what I type??
Click to expand...
Click to collapse
How else do you imagine the app can work without root?

[App] bxActions - Remap the Bixby button on S9! single, double and long press!

With bxActions you can remap the Bixby button on S9 to any action or app you like!
Use the Bixby button to mute your phone, take a screenshot, turn on flashlight or launch any app you like!
Also works on lockscreen or when the screen is completely off!
You can also disable the Bixby button if you like.
Optionally you can remap the volume buttons and Skip tracks with the volume buttons even when the screen is off!
Remap as you like!
FEATURES:
No root needed!
Zero battery consumption!
Double and Long press support!
Remap the Bixby button on S9 to any action!
Remap the Volume buttons to any action!
Skip tracks with the volume buttons
Different actions when phone is locked or unlocked
High performance! No lags!
No annoying ads
ACTIONS:
Switch mute - sound profiles
Take a screenshot
Google Assistant
Fullscreen Immersive mode
Launch camera or any other app
Toggle flashlight
Switch to last app
Disable Bixby button
30+ actions in total
BETA RELEASE GROUP:
https://www.facebook.com/groups/986579694884619/
DOWNLOAD:
Forum download:
Not tested yet.
My S9 will arrive soon for testing
work great on my G965F.thanx
Just installed and all working fine so far.
Extra control mode works perfect for doubletaps an long press.
Enjoy!
My wish for the next version ... decrease/increase brightness with the volume buttons. THX.
Does it impact battery life?
skivnit said:
Does it impact battery life?
Click to expand...
Click to collapse
You will not notice any difference
Thanks for sharing, just why does this app require that many permissions?
They are needed to allow you to launch any of that different actions (30+)
If you have questions to any permission just ask.
Jawomo said:
With bxActions you can remap the Bixby button to any action or app you like!
Use the Bixby button to mute your phone, take a screenshot, turn on flashlight or launch any app you like!
You can also disable the Bixby button if you like.
Optionally you can remap the volume buttons and Skip tracks with the volume buttons even when the screen is off!
Remap as you like!
FEATURES:
No root needed!
Zero battery consumption!
Double and Long press support!
Remap the Bixby button to any action!
Remap the Volume buttons to any action!
Skip tracks with the volume buttons
Different actions when phone is locked or unlocked
High performance! No lags!
No annoying ads
ACTIONS:
Switch mute - sound profiles
Take a screenshot
Google Assistant
Fullscreen Immersive mode
Launch camera or any other app
Toggle flashlight
Switch to last app
Disable Bixby button
30+ actions in total
TRANSLATIONS:
Transaltion are open now! You are welcome to translate bxActions into your language.
To contribute just request access over here:
https://www.localize.im/v/D8
DOWNLOAD:
Forum download:
Click to expand...
Click to collapse
I have just installed this app on my S9 plus. Great app.
Enjoy!
Doesn't work for me. I disabled everything with bixby before. I installed this app, enabled bixby voice but doesn't work. So i enabled everything of bixby again. Didn't help too. Any idea?
Black_Focus_X said:
Doesn't work for me. I disabled everything with bixby before. I installed this app, enabled bixby voice but doesn't work. So i enabled everything of bixby again. Didn't help too. Any idea?
Click to expand...
Click to collapse
You need to uninstall the app, enable bixby (only the button), and reinstall. That should do the trick.
Toss3 said:
You need to uninstall the app, enable bixby (only the button), and reinstall. That should do the trick.
Click to expand...
Click to collapse
Do you mean i only have to enable bixby voice?
Ok got it. Thanks
Love this app. Works perfectly on my 9+
Worked great on my unlocked s9+ thank you! Make sure to run the bixby setup to get flash light to work when screen is off.
Mine is having a problem with the button mapped as a Home Button when I have Nova and a few screens, when set to Home, the one in Nova marked as Home, sometimes will just go to one of the other screens rather than the Nova "Home" set one.
Installed it from play store. works very smooth and no delay.
awesome app!!!
Tried out this app last night and it caused AOD to stop working. Anybody else seeing this issue?
vintagerock said:
Tried out this app last night and it caused AOD to stop working. Anybody else seeing this issue?
Click to expand...
Click to collapse
Its a bug in Samsungs Oreo firmware.
I guess you used the Screenshot action. That causes AOD to crash. Still investigating if theres a workaround from my side.

[App] bxActions - Remap the Bixby button on S10! single, double and long press!

With bxActions you can completely remap the Bixby button on S10 to any action or app you like!
Use the Bixby button to mute your phone, take a screenshot, turn on flashlight or launch any app you like!
Also works on lockscreen or when the screen is completely off!
You can also disable the Bixby button if you like.
Optionally you can remap the volume buttons and Skip tracks with the volume buttons even when the screen is off!
NEW: Per app remapping! Use the Bixby button to take pictures in camera apps, take screenshots in browser and start flashlight when the screen is off!
FEATURES:
No root needed!
Zero battery consumption!
Double and Long press support!
Remap the Bixby button on S10 to any action!
Remap the Volume buttons to any action!
Skip tracks with the volume buttons
Different actions when phone is locked or unlocked
High performance! No lags!
No annoying ads
ACTIONS:
Switch mute - sound profiles
Take a screenshot
Google Assistant
Fullscreen Immersive mode
Launch camera or any other app
Toggle flashlight
Switch to last app
Disable Bixby button
30+ actions in total
BETA RELEASE GROUP:
https://www.facebook.com/groups/986579694884619/
DOWNLOAD:
Forum download:
But ONLY single press works, unless paid version...
You have the choice to upgrade if you feel so and contribute to development.
Can't you remap bixby button now in factory software?
Sent from my Pixel 3 XL using Tapatalk
oneandroidnut said:
Can't you remap bixby button now in factory software?
Click to expand...
Click to collapse
Yes but very limited, with bxActions you can remap single, double, long press and more and also launch actions from lockscreen.
Like toggle flashlight when the screen is off with a double tap..
Had a great experience on it with my Note 9 so I immediately installed it on my SGS10+. It's working great.
Thanks for the feedback, working also fine here on S10
Is there no option to map bixby on long press? I am using Google Assistant on tap but I'd like to be able to use bixby on long press.
Bixby starts on long press by default, or what do you mean?
Jawomo said:
Yes but very limited, with bxActions you can remap single, double, long press and more and also launch actions from lockscreen.
Like toggle flashlight when the screen is off with a double tap..
Click to expand...
Click to collapse
Awesome i will install when i get my s10 plus thanks!
Screenshot its buddy. It will go back once before taking the screen
That can happen on some apps if you use standard remapping on single press. You could take screenshot on long press, or unlock remapping over a PC and that problem will be solved.
Is it also possible to set Google assistant to it? This is not possible in stock remapping settings
MisterEvo said:
Is it also possible to set Google assistant to it? This is not possible in stock remapping settings
Click to expand...
Click to collapse
Sure thats possible
Uploaded bxActions 5.23 beta #1
Enjoy!
Uploaded bxActions 5.23 beta #2
Enjoy!
Which bixby system apps can I safely remove without losing bxActions
Is there a way to have the physical button press launch one app- say the camera for example and then when on the home screen and you swipe to the bixby home panel- have that be something different such as Google Now?
Bought the paid version and did the PC unlock. This could be very useful for testing and executing scripts on the fly. Love the app!
ultimatdan said:
Is there a way to have the physical button press launch one app- say the camera for example and then when on the home screen and you swipe to the bixby home panel- have that be something different such as Google Now?
Click to expand...
Click to collapse
Homescreen cant be modified with bxActions. Id use another launcher for this.

Can you assign more than one action to a keyEvent ?

Hi all. I have a Lenovo tablet M8 that refuses to have more than 15 volume steps from the hard buttons - Iv given up trying - nothing works. So a way round this may be to use a super simple app called - volume control. Its just a soft slider with finer control. To use it you just tap the icon then tap or drag the slider to the volume you want then it automatically disappears after 2 seconds.
Say I wanted to re-assign the actions mapped to the f6 key (this would actually be a hard button volume up / down as this works now with my cars Can to HID setup)
The first action would be to open the VC app and the second would be to increment / decrement. Can you create and script that can be assigned to a key press within Android?
Did you try xposed?
VD171 said:
Did you try xposed?
Click to expand...
Click to collapse
Thanks Ill try that.

Themes / Apps / Mods [APP][ONEUI4] Flashlight as keycombo

FlashlightAccessibilityService​
I provide here this basic app to toggle flashlight from vol up + vol down and/or power + vol up.
It uses a new feature introduced with Android 12 to toggle accessibility services from these key combos.
How to use:
Install the app.
Go to Settings app, then Accessibility, and Advanced settings.
Select your key combo, then go down and select Activate flashlight.
Enjoy!
Requirements:
Since it is an Android 12 exclusive feature, this will only work on One UI 4.
To get a proper cohesion between this app and the quick setting flashlight tile.
You should consider, but it is not mandatory, to give WRITE_SECURE_SETTINGS permission to this app.
Here it is only used to read secure settings but we need the permission as well.
To do that, two choices:
Using ADB :​adb shell pm grant com.android.flashlightaccessibilityservice android.permission.WRITE_SECURE_SETTINGS​Using terminal app (as Termux) :​pm grant com.android.flashlightaccessibilityservice android.permission.WRITE_SECURE_SETTINGS​
Changelog:
v1: Initial release
v1.1 : Drastic size reduction (removed unneeded dependencies + build optimisation)
v1.2 : Proper handling between the key combination and the quick setting torch tile
Love it mate. I used Key Mapper before to remap volume up long press to flashlight but this breaks holding vol up to raise volume and I had to tap it to raise volume. This works quite a lot better.
Shame it still doesn't work screen off tho but I guess that's impossible without root and I wanna keep my Knox + bootloader lock intact due to some software from work needing it.
Imprezzion said:
Love it mate. I used Key Mapper before to remap volume up long press to flashlight but this breaks holding vol up to raise volume and I had to tap it to raise volume. This works quite a lot better.
Shame it still doesn't work screen off tho but I guess that's impossible without root and I wanna keep my Knox + bootloader lock intact due to some software from work needing it.
Click to expand...
Click to collapse
Thanks!
Same here I leave Key Mapper since it doesn't recognize power button. Thanks Google for this accessibility feature.
Yep as well shame for screen on only. This is not in my hands btw.
In android 12 this can be done without any additional applications. It is enough to enter advanced functions, side key, double-press, open applications, select a flashlight
Sdaro said:
In android 12 this can be done without any additional applications. It is enough to enter advanced functions, side key, double-press, open applications, select a flashlight
Click to expand...
Click to collapse
That worked in 11 as well but me at least wants to keep camera on double press side key. How else should we open the camera quickly lol.
Sdaro said:
In android 12 this can be done without any additional applications. It is enough to enter advanced functions, side key, double-press, open applications, select a flashlight
Click to expand...
Click to collapse
For sure
But this way you can use anything else with double press
I'm with @Sdaro on this. I double tap my power key to turn the flashlight on/off. No external apps needed. Did it on Android 11 and still with 12.
Settings -> Advanced Features -> Side Key -> Turn on Double Press, select Open app then choose an app.
DrRyder said:
I'm with @Sdaro on this. I double tap my power key to turn the flashlight on/off. No external apps needed. Did it on Android 11 and still with 12.
Settings -> Advanced Features -> Side Key -> Turn on Double Press, select Open app then choose an app.
Click to expand...
Click to collapse
Again no doubt about that.
But this way you can use flashlight and a second quick launch like camera. Even a third one with the other accessibility key combo.
Thanks for sharing.

Categories

Resources