Hello.
Been messing around with this for a few days, trying to enable the navbar since i often accidentally press the capacitive buttons.
I've tried the qemu.hw.mainkeys=0 together with a few Substratum navbar themes since I've read that the build.prop could work but render the navbar almost transparent.
So, anyone with any working solution on stock Oreo + Magisk? Not interested in any custom ROMs again, so please no such suggestions.
IzaacJ said:
Hello.
Been messing around with this for a few days, trying to enable the navbar since i often accidentally press the capacitive buttons.
I've tried the qemu.hw.mainkeys=0 together with a few Substratum navbar themes since I've read that the build.prop could work but render the navbar almost transparent.
So, anyone with any working solution on stock Oreo + Magisk? Not interested in any custom ROMs again, so please no such suggestions.
Click to expand...
Click to collapse
To disable soft keys open "Root Explorer" go to System/USR/Keylayout/Generic.kl go to key 158 and 254 and add # as first char like this:
#key 158 BACK
#key 254 APP_SWITCH
superuserman- said:
To disable soft keys open "Root Explorer" go to System/USR/Keylayout/Generic.kl go to key 158 and 254 and add # as first char like this:
#key 158 BACK
#key 254 APP_SWITCH
Click to expand...
Click to collapse
Thanks. Won't dare to try that out until I've managed to get the navbar to show up.
Sent from my Samsung Galaxy S7 Edge using XDA Labs
Related
I've been searching/researching this topic for a while, and finally was able to get this working tonight. What follows is the result of my hard work, and some advice that was provided to me by some other members (credited later). This tutorial is designed to show how to change from the standard QWERTY layout to another of your choosing, be it AZERTY or Dvorak (as was my case) or perhaps even another.
I originally wanted to remap my bluetooth keyboard from QWERTY to Dvorak but couldn't find an easy way to do this. What follows is simple if you follow the directions step by step, but you'll want to be careful with how you do this.
Tools:
-Root Explorer
-A text editor (such as Notepad in Windows)
Once you have paired your bluetooth keyboard to your tablet, a keyboard layout file will be created in the /system/usr/keylayout/ folder of your system.
If you are a newbie, once you open Root Explorer, click Menu > Bookmarks > Root Folder > system > usr > keylayout
(If you want to save some time later on, before you enter the keylayout folder, long press the keylayout folder and select "Add Bookmark." This will allow you to quickly get back to this folder when it is time to copy/paste our modified .kl files later on.)
This will give you access to the file/s that we will want to edit in order to remap your keyboard. You should see files like Generic.kl, qwerty.kl, and hopefully one or more files that start with "Vendor_" that also have the .kl file extension.
Next we need to determine which of these Vendor_xxxx_Product_xxxx.kl files is the appropriate one for your keyboard.
Each keyboard has a specific Vendor ID as well as Product ID. The Vendor ID can be located at this address for most popular brands of bluetooth keyboard. In my case, since I was using a Motorola keyboard, my Vendor ID is 22b8.
In the /system/usr/keylayout/ folder, find the .kl file with your Vendor ID. There should only be one .kl file for your keyboard. For me the file was named: Vendor_22b8_Product_093d.kl
Using Root Explorer, long press the Vendor_xxxx_Product_xxxx.kl file for your keyboard and select copy. Now, click Menu > Bookmarks > sdcard and click the "paste" button.
From here, copy this file to your computer using whatever method you prefer. Open your text editor (I used Notepad though many suggest Notepad++) and drag and drop the Vendor_xxxx_Product_xxxx.kl file inside.
This is what mine looked like:
# Copyright (C) 2010 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Motorola Bluetooth Wireless Keyboard.
#
key 1 BACK
key 2 1
key 3 2
key 4 3
key 5 4
key 6 5
key 7 6
key 8 7
key 9 8
key 10 9
key 11 0
key 12 MINUS
key 13 EQUALS
key 14 DEL
key 15 TAB
key 16 Q
key 17 W
key 18 E
key 19 R
key 20 T
key 21 Y
key 22 U
key 23 I
key 24 O
key 25 P
key 26 LEFT_BRACKET
key 27 RIGHT_BRACKET
key 28 ENTER
key 29 CTRL_LEFT
key 30 A
key 31 S
key 32 D
key 33 F
key 34 G
key 35 H
key 36 J
key 37 K
key 38 L
key 39 SEMICOLON
key 40 APOSTROPHE
key 41 GRAVE
key 42 SHIFT_LEFT
key 43 BACKSLASH
key 44 Z
key 45 X
key 46 C
key 47 V
key 48 B
key 49 N
key 50 M
key 51 COMMA
key 52 PERIOD
key 53 SLASH
key 54 SHIFT_RIGHT
key 56 ALT_LEFT
key 57 SPACE
key 58 CAPS_LOCK
key 59 F1
key 60 F2
key 61 F3
key 62 F4
key 63 F5
key 64 F6
key 65 F7
key 66 F8
key 67 F9
key 68 F10
key 87 F11
key 88 F12
key 97 CTRL_RIGHT
key 102 HOME
key 103 DPAD_UP
key 105 DPAD_LEFT
key 106 DPAD_RIGHT
key 107 MOVE_END
key 108 DPAD_DOWN
key 111 FORWARD_DEL
key 113 VOLUME_MUTE
key 114 VOLUME_DOWN
key 115 VOLUME_UP
key 125 MENU
key 127 SEARCH
key 163 MEDIA_NEXT
key 164 MEDIA_PLAY_PAUSE
key 165 MEDIA_PREVIOUS
key 166 MEDIA_STOP
# key 226 tbd reserved key
Click to expand...
Click to collapse
I highly suggest opening a second text editor window and copy/pasting everything into that for reference while editing your keys. It may also be helpful to bring up an image of the keyboard layout that you wish to map to in a separate window somewhere else.
From here, we will want to change the individual letters and symbols for each key. The general layout will look like this: key x CMD [opt]
This means that key x will perform CMD command and [opt] option.
For my case, lets say that I want to change the letter "Q" to the symbol ' (yes, that's an apostrophe)
On my QWERTY keyboard, "Q" is key 16, so my edit to the entry for key 16 will go from this:
key 16 Q
Click to expand...
Click to collapse
and will change to this
key 16 APOSTROPHE
Click to expand...
Click to collapse
My full edited list (slightly condensed to really only show the keys that were changed) looks like this:
key 1 BACK
key 2 1
key 3 2
key 4 3
key 5 4
key 6 5
key 7 6
key 8 7
key 9 8
key 10 9
key 11 0
key 12 LEFT_BRACKET
key 13 RIGHT_BRACKET
key 14 DEL
key 15 TAB
key 16 APOSTROPHE
key 17 COMMA
key 18 PERIOD
key 19 P
key 20 Y
key 21 F
key 22 G
key 23 C
key 24 R
key 25 L
key 26 SLASH
key 27 EQUALS
key 28 ENTER
key 29 CTRL_LEFT
key 30 A
key 31 O
key 32 E
key 33 U
key 34 I
key 35 D
key 36 H
key 37 T
key 38 N
key 39 S
key 40 MINUS
key 41 GRAVE
key 42 SHIFT_LEFT
key 43 BACKSLASH
key 44 SEMICOLON
key 45 Q
key 46 J
key 47 K
key 48 X
key 49 B
key 50 M
key 51 W
key 52 V
key 53 Z
key 54 SHIFT_RIGHT
Click to expand...
Click to collapse
It's important to note that the other keys (1-15 and 55 onwards) are still there, I chose not to include them since they were not changed. If you delete the entries for these keys, you'll have half of a keyboard where the buttons don't do anything.
From here, once you are done editing your re-mapped keyboard, save the file in your text editor and copy it back to your sd card. Now, open Root Explorer and go back to the /system/usr/keylayout/ folder and delete your Vendor_xxxx_Product_xxxx_.kl file. If you do not, this will not work and you will have to replace your modded file with a copy of the original to fix the fact that your keyboard won't work at ALL anymore.
After you have deleted the .kl file, navigate back to your sd card in Root Explorer. (Newbies can Menu > Bookmarks > SD Card) Long press your modded copy of the .kl file and select "copy" from the menu that pops up. Now, Menu > Bookmarks > keylayout (or just take the long way and navigate your way there) and paste.
You are now done and can enjoy your newly re-mapped keyboard
Special thanks go to:
tkolev for writing This Tutorial for how to map usb keyboards.
Can you remap the keys that don't work on the Motorola keyboard to the Acer equivalents? I can't remember which ones right now (I'm at work), but I know some of the special function keys on top don't do anything.
i have the official german acer bluetooth keypboard but for some reason it wont get identified as such, means QWERTY instead of QWERTZ layout. acer support recommends to switch to xt9-mode (which for some strange reason works with german umlaute) but this surely can't be the solution.
someone knows the cause of this problem? and how to fix it on stock rom 3.2?
baldbear said:
Can you remap the keys that don't work on the Motorola keyboard to the Acer equivalents? I can't remember which ones right now (I'm at work), but I know some of the special function keys on top don't do anything.
Click to expand...
Click to collapse
Yes it is possible to re map them to execute new commands. Is there a particular function that you want it to do?
Sent from my LG-P999 using Tapatalk
uli68 said:
i have the official german acer bluetooth keypboard but for some reason it wont get identified as such, means QWERTY instead of QWERTZ layout. acer support recommends to switch to xt9-mode (which for some strange reason works with german umlaute) but this surely can't be the solution.
someone knows the cause of this problem? and how to fix it on stock rom 3.2?
Click to expand...
Click to collapse
This is possible to fix using the stock ROM as long as you have root access to the tablet. If you follow the above process, you can re map the letter keys to pretty much any configuration that you want.
Sent from my LG-P999 using Tapatalk
samstheman42 said:
This is possible to fix using the stock ROM as long as you have root access to the tablet. If you follow the above process, you can re map the letter keys to pretty much any configuration that you want.
Sent from my LG-P999 using Tapatalk
Click to expand...
Click to collapse
so a rooted device is mandatory? too bad, i had hopes i could fix this while keeping up my warranty. is there a way to get a rooted device back to factory settings?
uli68 said:
so a rooted device is mandatory? too bad, i had hopes i could fix this while keeping up my warranty. is there a way to get a rooted device back to factory settings?
Click to expand...
Click to collapse
It's actually quite easy. If you follow this post on How To Root An Acer Iconia A500 you'll find that not only can you get root access very easily, but reverting back to "factory settings" where the tablet is "unrooted" is as easy as the touch of a button. (covered later in the thread)
uli68 said:
so a rooted device is mandatory? too bad, i had hopes i could fix this while keeping up my warranty. is there a way to get a rooted device back to factory settings?
Click to expand...
Click to collapse
You can get Dvorak (and over 30 other layouts) without rooting using my app: http://www.apedroid.com/android-applications/external-keyboard-helper
Too complicated
On the mobileread forums thread=159538 there is adescription that seems much more simple to me.
Anyone knows the Vendor_xxxx_Product_xxxx file name for hp touchpad wireless keyboard?
Thanks!
Hey guys,
There have been a ton of people asking how to activate onscreen buttons and disable the capacitive buttons since CM12 builds have started rolling out. Obviously, at some point, these features will be rolled into the ROM, but until then, I figured it would be a good idea to simply present a step-by-step thread on the issue. There have been answers all over the place button nothing dedicated and centralized, so I figured I would help some guys out.
Things needed:
CM12 Build on any variety (currently K900 and bpear have "nightlies" available in development. Check em out.
Root access. Just flash SuperSU 2.16 (http://download.chainfire.eu/589/SuperSU/UPDATE-SuperSU-v2.16.zip) if you don't have it. Root is necessary.
Zip to turn of the backlights: http://www.mediafire.com/download/p385se5ia28cqab/noSoftkeyBacklight.zip (thanks @Moody for this)
1.) Activate On-Screen buttons
- Use a program such as BuildProp Editor (look it up on the Play Store) to create a new build.prop entry. Call it qemu.hw.mainkeys, and set it's value to 0. If you are doing this manually, just add the line "qemu.hw.mainkeys=0"
- Reboot.
2.) Deactivate Capacitive buttons
- Download Root Explorer or some other program that allows editing of system level files.
- Mount your system as R/W. In root explorer at least, when you get into the system, there is a button up top to do so.
- Navigate to /system/usr/keylayout. Open Generic.kl in with a text editor.
- Comment out the follow lines by inserting a pound sign (#) in front of the line:
key 158 BACK
key 172 HOME
key 139 MENU
After this, they will read:
# key 158 BACK
# key 172 HOME
# key 139 MENU
Therse are numerically ordered, shouldn't be hard to find within the document.
- Remount your system as R/O.
3.) Turn off the capacitve back lights
- Reboot into custom recovery and flash noSoftKey.zip file you downloaded earlier.
- Reboot.
That should do it! You should now have software buttons and your hardware buttons should seemingly not exist!
Any questions or comments, please leave them here.
Anyone know how to enable hardware home long press to get to Google now?
TjPhysicist said:
Anyone know how to enable hardware home long press to get to Google now?
Click to expand...
Click to collapse
https://play.google.com/store/apps/details?id=com.phoenixstudios.aiogestures&hl=en
Added to OnePlus One index thread:
[INDEX] OnePlus One Resources Compilation Roll-Up
Transmitted via Bacon
Hi there, first of all, thanks. I am having a problem where after I disabled the capacitive buttons (Step 2) the power and volume buttons are not working. Thanks in advance.
You know how to enable menu key also?
Verstuurd vanaf mijn Nexus 7 met Tapatalk
Yes any chance of getting home button long press as search? Default is the menu button doing this.
Its not working bro
Tried and followed your steps , disabling capacitive keys works but enabling on screen keys not working even after changing build.prop , also i read in some post that enabling on screen key mod will not work in cm roms is that true can any one confirm me?
i am using following rom its CM12
http://forum.xda-developers.com/oneplus-one/development/devrom-cm12-scheduled-builds-t2938372
its very stable didnt experience any glitch till now , multi user and guest account works , all the other features are working too, try it out friends.
Pure awesomeness, many thanks for this guide. I'm back to my comfort zone, onscreen for me is just more intuitive.?
BTW, how to bring back the capacitive lights? I tried to remove the script at /etc/init.d and it only bootloops after reboot.
Edit: Nvm, found it, re-flashing the ROM brings back all to the default behavior including the capacitive backlights.
kmakiki said:
3.) Turn off the capacitve back lights
- Reboot into custom recovery and flash noSoftKey.zip file you downloaded earlier.
- Reboot.
That should do it! You should now have software buttons and your hardware buttons should seemingly not exist!
Any questions or comments, please leave them here.
Click to expand...
Click to collapse
For some reason this step isn't working for me. I tried wiping cache/dalvik and it didn't fix anything
Can anyone give a screenshot of the on-screen buttons?
Is this possible to do in hydrogen OS? I love that rom, but i switch back since there is no option to turn off hardwer keys and enable software key in system?
Sent from my A0001 using Tapatalk
How to add volume button onscreen by editing buid.prop
Currently running resurrection rom on asus t00j. Anyone knows how do I get that stock rom function where you can hold the recent apps key to take a screenshot? No recent key function is here. I have xposed. Anyone knows which xposed app can do the job for me?
Since u have xposed, then gravitybox will do the trick..(download it from repository inside xposed installer app (GravityBox-LP) )
Install it, go to navigation keys actions ,scroll down to "recents key" section and assign the "take screenshot" to the long press action....
Hope it will help...let me know after trying
Hello there,
As of now, Xposed is still not supported in LOS 14.1 as stated by the person maintaining it in this recent post. Is there a way to make the hardware buttons operate inverted? Right now the left button is "BACK" and the right button is "RECENTS" without any way to change it directly from the settings menu.
I have tried editing the file
Code:
/system/usr/keylayout/Generic.kl
directly from the TWRP terminal using VI, in the following entries:
Code:
key 139 MENU --> key 139 BACK
key 158 BACK --> key 158 MENU
But even after rebooting, the changes didn't happen. I checked the Generic.kl file and the changes persisted but no change whatsoever. Has anyone tried ButtonMapper ?? The pro version allows changing the button mapping but it seems like a temporal solution rather than a permanent, more elegant one.
Thanks for any help provided!
Flogisto said:
Hello there,
As of now, Xposed is still not supported in LOS 14.1 as stated by the person maintaining it in this recent post. Is there a way to make the hardware buttons operate inverted? Right now the left button is "BACK" and the right button is "RECENTS" without any way to change it directly from the settings menu.
I have tried editing the file
Code:
/system/usr/keylayout/Generic.kl
directly from the TWRP terminal using VI, in the following entries:
Code:
key 139 MENU --> key 139 BACK
key 158 BACK --> key 158 MENU
But even after rebooting, the changes didn't happen. I checked the Generic.kl file and the changes persisted but no change whatsoever. Has anyone tried ButtonMapper ?? The pro version allows changing the button mapping but it seems like a temporal solution rather than a permanent, more elegant one.
Thanks for any help provided!
Click to expand...
Click to collapse
The free version allows swapping back and recents. It doesn't require root and is less intrusive than using xposed.
flar2 said:
The free version allows swapping back and recents. It doesn't require root and is less intrusive than using xposed.
Click to expand...
Click to collapse
The free version doesn't allow it. Just wanted to confirm if anyone tried it and does it work properly?
Thanks for the reply!
Flogisto said:
The free version doesn't allow it. Just wanted to confirm if anyone tried it and does it work properly?
Thanks for the reply!
Click to expand...
Click to collapse
You are COMPLETELY wrong, Free version Does allow Swap of the hardware keys
Just toggle when it say " Swap Back and Recents " ,will stick at boot ,but will needs to be reenable when dirty flash a new build. Been using since the first LineageOS build.
DrakenFX said:
You are COMPLETELY wrong, Free version Does allow Swap of the hardware keys
Just toggle when it say " Swap Back and Recents " ,will stick at boot ,but will needs to be reenable when dirty flash a new build. Been using since the first LineageOS build.
Click to expand...
Click to collapse
You are COMPLETELY right, my bad! Thanks for the tip and to @flar2 as well. I completely missed that option. Thanks for your work with LOS 14.1!
DrakenFX said:
You are COMPLETELY wrong, Free version Does allow Swap of the hardware keys
Just toggle when it say " Swap Back and Recents " ,will stick at boot ,but will needs to be reenable when dirty flash a new build. Been using since the first LineageOS build.
Click to expand...
Click to collapse
Just in case, this has been posted, I can confirm it works just fine. POST. The difference is that @XblackdemonX edited the Synpatics.kl file instead of Generic.kl.
Redmi Note 2, Android 5.0.2, MIUI 9.6
Need to enable original soft keys. I`ve managed to edit build.prop (qemu.hw.mainkeys=0) from TWRP terminal and sed command. Keys showed BUT don`t response.
I`ve noticed a new menu option in Settings (can`t be not quite accurate, coz I have a translation enabled) - System and Device -> Advanced -> Buttons and gestures -> Screen buttons -> Change buttons positions. And if I change positions, it changed. But buttons are stil not responding.
Are there any MORE options in build.prop, that blocks it?
UPD:
[How To] Disable Capacitative Keys and Enable Soft Keys
Just in case anyone might find this useful, I've put together the instructions I found whilst trying to do this. Finally I can take photos without accidentally bringing up the Menu or closing the Camera App! First time I've ever posted here, so be kind! This works in CM11 M6 on Samsung Galaxy...
forums.androidcentral.com
I`ve found some article, that point to /system/usr/keylayout/ directory and need to comment key 139 and key 158. But there were no such filename from article. So I`ve just tried to edit Generic.kl and It doesn`t work.