[Q] Enable trackpad button on G2 to wake up / get to the unlock screen? - G2 and Desire Z Q&A, Help & Troubleshooting

Sorry if this has already been described, I couldn't find a G2-specific method by searching.
I'm using the pre-rooted OTA 2.3.4 ROM. I would like to allow the unlock screen to appear when pressing the trackpad button. So basically instead of (or in addition to) the power button, I want to wake the device in a somewhat similar fashion like the Home button does it on the iPhone.
I found some threads explaining how to do this on the Desire, and tried it on my G2 but it doesn't work.
I used the method described in this post.
There is also this thread, dealing with the same thing.
Used a terminal app and getevent to see what event belongs to the trackpad button, and it appears it is (almost) the same as described in the first linked post. In my case, it was a pair of
Code:
/dev/input/event7: 0001 0110 000000001
/dev/input/event7: 0001 0110 000000000
for each button press. Same key code (hex 0110, decimal 272) like in that single post.
event7 belongs to the same curcial-oj device, because in the beginning of the getevent list, I have
Code:
add device 2: /dev/input/event7
name: "curcial-oj"
There was no curcial-oj.kl file in /system/usr/keylayout/ so I created one manually and pushed it using recovery and adb. The file content is
Code:
key 272 DPAD_CENTER WAKE_DROPPED
But this doesn't enable trackpad wake.
The new file is there where it's supposed to be.
I also thought WAKE_DROPPED is kinda strange so I tried it with just WAKE instead. No go.
Also, when I looked into the other .kl files in that directory, the button DPAD_CENTER had the code 232 assigned in them, so I tried using that as well. No joy.
What am I doing wrong? Did anyone get this trackpad wake working on the G2?
Thanks.

The best and easier way to get trackpad wake on your g2 is to flash a custom rom
Almost all roms have this option
Sent from my G2 via XDA running MexDroidMod PreGhostChilli

Related

new key combo - bugreports - trackball and vol up

I know there is a thread here somewhere listing all the key combos but google isn't my friend today and i cant find it
anyway as mentioned here from the cyanogenmod wiki, the same method for the passion works on my desire.
from this page
You can use a magic key combination to create a bugreport file in /sdcard/bugreports. It will get you all the running processes, logcat, and more, and dump it to your SD card as /sdcard/bugreports/bugreport-xxxxxx where xxxxxx is the timestamp of the dump. this can also be started by the command on the phones shell "bugreport"
Trackball + Volume Up
The phone will vibrate once, then it will vibrate three times to acknowledge that it is complete.
Click to expand...
Click to collapse

[MOD] Key Remapper - Requires Root [WIFI/3G]

If you are like me you are not happy with the power button placement. I modded a few files that will allow any bluetooth keyboard to wake the screen from sleep. Very handy when the Xoom is docked. Requires Reboot.
Modded Files
Push the files via adb to /system/usr/keylayout/
Example:
adb remount
adb push Generic.kl /system/usr/keylayout/Generic.kl
adb reboot
Apple Keyboard (Vendor_05ac_Product_0239.kl) - Wake with eject key
Generic Keyboard (Generic.kl) - Wake with F1
Motorola Keyboard (Vendor_22b8_Product_093d.kl) - Wake with right ctrl key (Not Tested - Sorry do not have one)
Note:
After the keyboard and the Xoom have been asleep for a while, there may be a delay before the Xoom wakes. Bluetooth devices sleep to save power and it takes about 15-30 seconds to wake and sync again.
Thorough Explanation of Key Remapping:
Better explanation of this is here.
Getting back to default:
If you want to return things to default, download the default files and adb push them back to the Xoom.
Sweet! I'm going to give this a try later. Thanks!
Works great with the Motorola BT Keyboard...
edit: I did remap it back to the default CTRL_RIGHT and instead used the unmapped "reserved" key on the keyboard. It is the 4th key from the top right with 3 lines. Since this key is unused, it seemed more appropriate for now. It is key 226 in the mapping.
@triadX1
Sent from my Xoom using XDA App
Maybe someone in this thread can help me. I posted in other threads but nobody replied. I bought a generic BT keyboard with Apple keys. To remap the keys I downloaded a program to get the scancodes for each key and modified the Generic.kl. It di not change anything. The question is now, is there a way to name the .kl file like the other 3 already present, i.e. with a manufacturer-specific name? How else will HC know which file to use when the BT keyboard is connected? I hope I got my point across...Thanks everyone!
[sent with Xooming Android technology]
Just a heads-up: I have what must be an older version of the Apple Keyboard (bought in '97); the VID:DID are 05AC:022C :
Code:
apple 0005:05AC:022C.0001: input,hidraw0: BLUETOOTH HID v1.36 Keyboard [Apple Wireless Keyboard] on 40:FC:89:27:62:5C
I just copied your Vendor_05ac_Product_0239.kl to Vendor_05ac_Product_022c.kl and it works fine. Thanks for the mod!
funnycreature said:
is there a way to name the .kl file like the other 3 already present, i.e. with a manufacturer-specific name? How else will HC know which file to use when the BT keyboard is connected?
Click to expand...
Click to collapse
Can you get the Vendor ID/Device ID from the Keyboard?
"adb shell dmesg" once it's connected should be able to tell you. After that, it's just a matter of naming the file as such. For example a device with VID:DID 1234:ABCD would be named Vendor_1234_Product_abcd.kl .
HTH!
it was easy i just edited one file one line next to menu i put wake
Sent from my Xoom using XDA App
system/ust/keylayout/ and vrdb ....093 something then r/w then right click to edit text and scroll to 125 where it says MENU and make it look like this MENU WAKE and reboot and your good menu key is now wake one press wakes and two presses unlocks
Sent from my Xoom using XDA App
kcrudup said:
Can you get the Vendor ID/Device ID from the Keyboard?
"adb shell dmesg" once it's connected should be able to tell you. After that, it's just a matter of naming the file as such. For example a device with VID:DID 1234:ABCD would be named Vendor_1234_Product_abcd.kl .
HTH!
Click to expand...
Click to collapse
I found out that the generic keyboard uses the Apple layout. I want to post a How-to soon but I have very little time lately Thanks for the info though; how would I find the information? I tried connecting the keyboard to my laptop via BT and opened the device manager. Is there any property that shows the VID:DID?
I'm curious as to why the key 226 isn't being used when there's actually no key used to open the app menu. I would have assumed the key used for menu (two keys to the right of the spacebar) would be used for the app menu and the unused key (three horizontal lines) would've been for the menu since most apps I've seen with the on-screen menu looks the same. Plus the icon for the Apps menu actually looks like what is on the Menu key for the keyboard.
What would I need to add to the keyboard file to make a key open the application menu? After looking over the keymaps in the file I couldn't see any key on the keyboard that would open the app menu.
Use 226 for whatever
You can remap 226 to be menu if you want, but i don't know the command to open the app "drawer" on honeycomb.
Just like they said above, the file you want to edit is in
/system/usr/keylayout/
I use root explorer because it lets me edit easily as well. If you want to do it the way i do just follow the steps below:
1- Mount R/W when you get in the folder
2- Long hold on "Vendor_22b8_Product_093d.kl"
3- Select "Open in Text Editor"
4- Scroll all the way to the bottom where it says 226 and edit the line to read
key 226 MENU​ (3 spaces between 226 and MENU)
if you simply want it to be another Menu key. (Before editing, it says unused or tbd or something, just erase all of that )
Alternatively try:
key 226 MENU WAKE​if you also want it to wake up your tablet.
Personally, I edited key 125 to wake up the tablet as described above, and put
key 226 POWER​so that i could also lock the screen, thus using the otherwise useless key.
As a sidenote, Root Explorer *should* automatically make a backup for you when you edit the keylayout file, but doing one manually (aka: copy and paste somewhere else on your sdcard) is always a smart move.
Good Luck!
kcrudup said:
Can you get the Vendor ID/Device ID from the Keyboard?
"adb shell dmesg" once it's connected should be able to tell you. After that, it's just a matter of naming the file as such. For example a device with VID:DID 1234:ABCD would be named Vendor_1234_Product_abcd.kl .
HTH!
Click to expand...
Click to collapse
I tried this command and I get a "error: device not found" message. I am using my droid 1 and the blueputdroid app to use my hard keyboard as a bluetooth one. The keyboard works... I just would like to map some things out to open the app drawer and such. Thank you in advance for any help
Sent from my Droid using Tapatalk
That error means adb can't find your xoom. Make sure you have USB debugging enabled
sangreal06 said:
That error means adb can't find your xoom. Make sure you have USB debugging enabled
Click to expand...
Click to collapse
Hmm I have tried it from the zoom itself with a terminal app as well as from the PC and have made sure debugging is running and have gotten the same result each time :/
Sent from my Xoom using Tapatalk
This requires root. I am assuming those having trouble have rooted their phones and have the moto drivers installed on their PC. If adb devices does not show your device then try running the following:
adb kill-sever
adb start-server
adb devices
See if the device shows up now. I am calling these commands from my memory so I could be wrong about the wording. Running adb /? will give you a list of command line switches.
Sent from my Xoom using XDA Premium App
B Dizzle said:
This requires root. I am assuming those having trouble have rooted their phones and have the moto drivers installed on their PC. If adb devices does not show your device then try running the following:
adb kill-sever
adb start-server
adb devices
See if the device shows up now. I am calling these commands from my memory so I could be wrong about the wording. Running adb /? will give you a list of command line switches.
Sent from my Xoom using XDA Premium App
Click to expand...
Click to collapse
Hmm it STILL doesn't see it. I know I am an unlocked and rooted xoom. I am running rooted apps just fine and browsing all my system files just fine on the computer with Droid explorer. I just can't get it to see my device in adb. Any ideas?
Sent from my Xoom using Tapatalk
Does anyone here have 3.1? I updated to 3.1 which removed the customized file I replaced for the zoom keyboard, but I read in another thread where a person talked with a rep (i'm thinking from either moto or vzw) about the update stating that the update included "Additional shortcut key support for Bluetooth keyboard".
The file I used was from 3.0 and since I didn't know this at the time, I didn't back it up first. I know...it was stupid not to do so, but whatever lol
If anyone could pull the new 3.1 keyboard layout file for the motorola keyboard and post it, that would be great.
SPIDERTECH said:
Does anyone here have 3.1? I updated to 3.1 which removed the customized file I replaced for the zoom keyboard, but I read in another thread where a person talked with a rep (i'm thinking from either moto or vzw) about the update stating that the update included "Additional shortcut key support for Bluetooth keyboard".
The file I used was from 3.0 and since I didn't know this at the time, I didn't back it up first. I know...it was stupid not to do so, but whatever lol
If anyone could pull the new 3.1 keyboard layout file for the motorola keyboard and post it, that would be great.
Click to expand...
Click to collapse
Anyone able to pull this file for me? It's the Vendor_22b8_Product_093d.kl
SPIDERTECH said:
Anyone able to pull this file for me? It's the Vendor_22b8_Product_093d.kl
Click to expand...
Click to collapse
Here ya go http://db.tt/9fAD3NS
Sent from my Xoom using Tapatalk
ruvort said:
Here ya go http://db.tt/9fAD3NS
Sent from my Xoom using Tapatalk
Click to expand...
Click to collapse
Thanks for that. It looks like the 226 key is STILL not being used. I'm curious now as to what the additional shortcuts were supposed to be.

[Q] home key wake up

After installing sphinx rom v2 on my e988 i can't wake up my screen by pressing home button any one know how to enable it again ?
mhd.abbas.94 said:
After installing sphinx rom v2 on my e988 i can't wake up my screen by pressing home button any one know how to enable it again ?
Click to expand...
Click to collapse
This will only work if the option was removed from the keylayout, so let's see if the option is there or not:
Use a root file manager and go to System/usr/keylayout
Edit the file "gk-kaypad-8064.kl" (how you edit the file depends on the file manager you are using, so I can't give you exact steps as to how to do this)
You should see stuff like:
key 114 volume_down
key 115 volume_up
etc
look at key 172:
If it was disabled from waking the phone, it will say:
key 172 HOME
If it has the option to wake the phone it should say:
key 172 HOME WAKE
-If it's like this already, then I can't help you further because the button is already set to wake the phone, so something else in the rom is preventing it from working.
-If it isn't already like this, then just add the WAKE (in all caps) part to it after a space and save the file. Make sure the permissions are still 644 (rw-r--r--) after saving. Reboot. Test and hopefully it should work. Again, if not, I can't help you any more because something else is preventing it from working.
BTW, I don't use Sphinx, but I actually hate the Home button waking my phone, so I always disable it after rooting. So I basically just remove the WAKE part.
spexwood said:
This will only work if the option was removed from the keylayout, so let's see if the option is there or not:
Use a root file manager and go to System/usr/keylayout
Edit the file "gk-kaypad-8064.kl" (how you edit the file depends on the file manager you are using, so I can't give you exact steps as to how to do this)
You should see stuff like:
key 114 volume_down
key 115 volume_up
etc
look at key 172:
If it was disabled from waking the phone, it will say:
key 172 HOME
If it has the option to wake the phone it should say:
key 172 HOME WAKE
-If it's like this already, then I can't help you further because the button is already set to wake the phone, so something else in the rom is preventing it from working.
-If it isn't already like this, then just add the WAKE (in all caps) part to it after a space and save the file. Make sure the permissions are still 644 (rw-r--r--) after saving. Reboot. Test and hopefully it should work. Again, if not, I can't help you any more because something else is preventing it from working.
BTW, I don't use Sphinx, but I actually hate the Home button waking my phone, so I always disable it after rooting. So I basically just remove the WAKE part.
Click to expand...
Click to collapse
Thanks a lot man
Does someone has another solution?
i got the same problem but in my file allready was written "WAKE".

[Guide] Disable hard navigation keys (not onscreen buttons)

I have seen a bunch of posts regarding the capacitive buttons and on screen navigation buttons. Love them or hate them, this is how you can turn them off.
I will leave that up to you on how to get onscreen Navy buttons.
As for turning off the capacitive buttons this is how I did it.
1.To eneble onscreen buttons follow this thread http://forum.xda-developers.com/redmi-1s/themes-apps/how-to-onscreen-buttons-redmi-1s-t2950455
2. Download a root file explorer. Root Browser Lite --> http://goo.gl/b9ISW This is what I will use.
3.Load up Root Browser and navigate to system>usr>keylayout. We will be looking for a file called "ft5x06.kl".
4. Select it and hit "Open as..." then "Text file" then "RB Text Editor"
5. Now we see this:
key 139VIRTUAL
key 158 VIRTUAL
key 102 HOME
key 217 SEARCH
All you have to do is option out the keys you don't want to work with a #. So if you are like me and think the home button is fine, it will look like this.
#key 139VIRTUAL
#key 158 VIRTUAL
key 102 HOME
key 217 SEARCH
6. When you have the ones you want optioned out just tap the little disk icon in the top right. It will ask for root rights, grant it, saved.
7. Now just reboot and DONE!
Tested on
1. Redmi 1s(miui, Validus, Pa, mokee,cm11 ROMs)
Sent from my HM 1S using Tapatalk
Hit thanks if this post helped you[emoji106]
Nice guide, works with CM11 too, only the file for editing is different:
/system/usr/keylayout/ft5x06.kl
Don't remember to backup the original file before editing!
philip_petev said:
Nice guide, works with CM11 too, only the file for editing is different:
/system/usr/keylayout/ft5x06.kl
Don't remember to backup the original file before editing!
Click to expand...
Click to collapse
Thanks bro OP updated....:thumbup:
Sent from my HM 1S using Tapatalk
Thanks
It worked awesome on Mokee ROM history version
thanks for useful tips. its a pain operating non backlit capacitive button

How To Guide How to remap "assistant" button! [ROOT REQUIRED]

it seems that while adding non-remappable assistant buttons is a growing trend, solutions aren't easy to find, however the solution is real simple, you just have to modify the keymap file...
I successfully managed to get the button detected by flashing XperiaGAButtonRemap through magisk, and I'm pretty sure the same solution works for a bunch of other phones also, it even has code that should allow flashing through custom recoveries also.
all you have to do is "install from storage" in magisk manager, select the zip, and reboot.​
what that zip does, is it adds /system/vendor/usr/keylayout/gpio-keys.kl (overriding /system/usr/keylayout/gpio-keys.kl because /vendor has higher priority) and replaces the ASSISTANT key with PROG_BLUE, which is a dummy key, you can remap that with any remapper app or module, or you could edit the zip, and change it directly to something like CAMERA, if that's all you want.
here's what the file will look afterwards, if you're curious:
key 115 VOLUME_UP
key 114 VOLUME_DOWN
key 102 HOME
key 528 FOCUS
key 766 CAMERA
key 457 PROG_BLUE
the original file has copyright notice for The Linux Foundation, from 2013, but all other keys map the same, so it's highly likely most phones (at least the AOSP-adjacent ones) just have hooks for the ASSISTANT key, but still rely on the universal keymap file
thanks a lot!worked just fine,
big ups!!!
Hello, sorry for the question, does this work on Android 12?
SHANOA_zasha said:
Hello, sorry for the question, does this work on Android 12?
Click to expand...
Click to collapse
I've just tested and yes it works in A12

Categories

Resources