[Q] Remapping the external keyboard file - Thinkpad Tablet General

The Lenovo Thinkpad Tablet's keyboard folio is a neat little accessory but there is one issue that drives me nuts. (Beside the loss of the USB port). and that is that the Ctrl key also activates the menu (any menu).
So whenever one tries to do a copy and paste using the usual Ctrl + C and Ctrl + V keys, the menu (of the app you are working in) pops up.
Someone suggested to edit the Generic.kl file in /System/usr/keylayout directory and I did, but that didn't work. (Unless i did it wrong).
I'm at a loss. Would anyone have a suggestion on how to remap that key to only be a standard Ctrl and not menu key?
TS

Having the same issue.
But I'm using an external bluetooth keyboard: the logitech one, which was actually designed for the ipad.
I love it, its slim and very good quality keyboard.
Maybe some helpful links:
http://www.kandroid.org/online-pdk/guide/keymaps_keyboard_input.html
And this one has an explanation how this could be solved on a rooted thinkpad:
http://androidforums.com/ally-all-things-root/250271-re-map-key-keyboard.html

Ok, so I was able to remap some keys. Here is what I did.
The key layout files are stored in /system/usr/keylayout
The most important one seems to be Generic.kl which can be edited with a text editor, just use root explorer or the adb commands below. When I first tried my permissions were screwed up and I wrote the directions below but left them here in case they are helpful.
----------
(I edited gpio-keys.kl thinking it controlled the hard keys but it had no effect). While running the Thinkpad it seems as though I was unable to edit these files but I did get things to work using adb while booted into recovery. Here are the steps I took:
First reboot into ClockworkMod Recovery and plug in your thinkpad to your PC via USB
In CWR select Mounts and Storage then Select Mount /system (otherwise it seems adb can't access your system files)
On your computer run cmd and type adb devices (you should see a device listed, if not go check out the ADB setup guide). Now enter the following commands:
adb remount
adb pull /system/usr/keylayout/Generic.kl
This will copy the Generic.kl file to your current directory (you can see it in the command prompt, typically it is C:\Users\[Your Username]\
Browse to the file make a copy of the unedited version and save your backup somewhere and then edit Generic.kl in a txt editor (I like Notepad++)
I changed key 150 EXPLORER to say key 150 MENU, which makes the browser key open the menu instead of your web browser.
After you made your changes save it and then use the following ADB commands to push it back and set the permissions:
adb push Generic.kl /system/usr/keylayout/
adb shell
chmod 644 /system/usr/keylayout/Generic.kl
chown system.system /system/usr/keylayout/Generic.kl
exit
adb reboot
Now your keys should be remapped!

Just thought I'd add this to skip all the ADB and do it right on the tablet:
ES File Explorer (with root permission and /system writeable checked in settings)
Navigate to file, click, choose text, choose ES Note Editor, edit the file as needed, choose save when prompted.
You can change permissions with ES as well.
I like that it automatically makes a *.bak file of whatever you edit and save.

Those are the same steps I did, but it didn't work for me even after a reboot.
And although I did a backup of the existing generic.kl file, I think I may have overwritten it. So I'm going to have to go in search of a fresh one.
TS

Related

Creating apk and obex list.

Things you need:
Windows computer
Android SDK (on the root of your C:\ drive)
A phone running Android (duh)
Your SDcard inseterd into the phone
USB charge/data cable that came with the phone
A few mins of your time
The purpose of this is to show you how to create a text file listing the applications in the '/system/app' directory. This is where the apk and obex(program) files are located. There are so many in there it's nice to have a list so you can pick and choose which ones you want to remove OR move to your SDcard incase you want them later.
When I downloaded the SDK from Androids site I just extracted it and renamed it sdk and placed it in the root of my C: drive. Open a CMD window or terminal and change to 'c:\sdk\tools' directory.
With the phone powered off plug it into the computer with the USB cable. Hold the POWER button + VOL DOWN while the phone turns on. Choose RECOVERY, when it appears, with the VOL DOWN key and tap POWER. Again with VOL DOWN choose 'partition menu' and press in the OPTICAL MOUSE button. Using the VOL DOWN key you want to highlight '-mount /system' and
'-mount /sdcard' using the OPTICAL MOUSE button to choose each one so they should change to '-unmount /system' and '-unmount /sdcard'.
At this point focus your attention back to the terminal or command window that should be sitting at the 'c:\sdk\tools' prompt. Type in 'adb shell' and press enter. Leave off the ' in the command. Once it connects to your phone change directory to the '/system/app' folder by typing this out...
#cd /system/app/ <hit enter>
Now type
#ls > /sdcard/applist.log
That's it! You should now have a log file on your sdcard. It's so much easier than reading the screen and making a quick decision to remove something that might be bugging you now when you MIGHT need it later. Hope this helped someone!
Once the command is finished (it only takes a second or two) unmount the SDcard and /system folder and reboot your phone.
Snickasaurus said:
Things you need:
Windows computer
Android SDK (on the root of your C:\ drive)
A phone running Android (duh)
Your SDcard inseterd into the phone
USB charge/data cable that came with the phone
A few mins of your time
The purpose of this is to show you how to create a text file listing the applications in the '/system/app' directory. This is where the apk and obex(program) files are located. There are so many in there it's nice to have a list so you can pick and choose which ones you want to remove OR move to your SDcard incase you want them later.
When I downloaded the SDK from Androids site I just extracted it and renamed it sdk and placed it in the root of my C: drive. Open a CMD window or terminal and change to 'c:\sdk\tools' directory.
With the phone powered off plug it into the computer with the USB cable. Hold the POWER button + VOL DOWN while the phone turns on. Choose RECOVERY, when it appears, with the VOL DOWN key and tap POWER. Again with VOL DOWN choose 'partition menu' and press in the OPTICAL MOUSE button. Using the VOL DOWN key you want to highlight '-mount /system' and
'-mount /sdcard' using the OPTICAL MOUSE button to choose each one so they should change to '-unmount /system' and '-unmount /sdcard'.
At this point focus your attention back to the terminal or command window that should be sitting at the 'c:\sdk\tools' prompt. Type in 'adb shell' and press enter. Leave off the ' in the command. Once it connects to your phone change directory to the '/system/app' folder by typing this out...
#cd /system/app/
Now type
#ls > /sdcard/applist.log
That's it! You should now have a log file on your sdcard. It's so much easier than reading the screen and making a quick decision to remove something that might be bugging you now when you MIGHT need it later. Hope this helped someone!
Once the command is finished (it only takes a second or two) unmount the SDcard and /system folder and reboot your phone.
Click to expand...
Click to collapse
Very usefulfor people who like the "de-sensed" route.
Sent from my ADR6300 using XDA App
Thank you. I thought it would be useful to some. After seeing 80+ have viewed this threat I feel it may have been a waste of time but perhaps someone will learn something from it.

[Q] bash shell the hell (I can t set permiss.)

RESOLVED
Dear developers,
I need to make send hardware button work for the menu, because the long press windows make me crazy recalling the current applications instead to give me the real useful menu for the app I use.
I currently use desire on hd2. So searching in the previous posts I found that I can change /system/usr/keylayout/qwerty.kl
No way, I opened Astro, did not change and save the modifications. Then I tried to download a terminal emulator. Do not give me #, but I thought was normal reading other posts(the phone is already rooted) so I tried chown and chmod, but I do not what I have to write to do the trick of edit with ASTRO the 2 lines I need to put the menu (for the apps) in SEND hw button. Furthermore trying using $ ls -latr I discovered that the qwerty.kl is a link that refer to etc/keymap directory. So I tried to use ASTRO to edit the file but also if tell me save, there are not modification, simply the file is not edited.
resolved --> I HAD TO COPY IN SDCARD THE FILE QWERTY BEFORE to MODIFY WITH ASTRO, no need of chmod && Chown

[Q] Pushing files to read only location

Want to push a file to /system/customise/resource but i believe it is read only. What command do i use to make it read/write then push a file?
Thanks
i use root explore to push files, just mount root explorer as read/write by pressing the mount button in top right corner an if your having permission problems with the file ,you can long press on a file, go in permissions an tick the right box's

[Guide]How to disable the home key button at screen off [Root Required]

Here is a little guide on how to disable the screen from turning on in your pocket by accidentally clicking the home key. Which can set off unwanted calls/txts/homescreen changes/etc.
Perhaps there is an easier way, but this works for me, and sharing is caring
There I obtain a copy of Root Explorer, its easy for me to do. For those of you who are too cheap, scroll a bit further down this post, both methods require, obviously, root access:
I have no idea if there are free programs with the same usabilities as root explorer
Method with Root Explorer (or similar?)
Open Root Explorer
Go to /system/usr/keylayout
Click on the button ‘Mount R/W’ (upper right)
Locate, press and hold es209ra_keypad.kl file
Select ‘open in text editor’
Find this line:
key 102 HOME WAKE_DROPPED
Remove the WAKE_DROPPED, so that the end result is:
key 102 HOME
Save the file
Reboot
Done
Method without Root Explorer
You need a little understanding of adb.exe
Typ in cmd.exe:
adb pull C:\es209ra_keypad.kl /system/usr/keylayout/
Go to C:\ and open es209ra_keypad.kl in wordpad
Change:
key 102 HOME WAKE_DROPPED
to:
key 102 HOME
Save the file
Typ in cmd.exe:
adb shell
#su
#mount -o rw,remount -t yaffs2 /dev/block/mtdblock2 /system
(ONLY if you got an error, while trying to remount)
[*]Typ in adb shell:
[*]#cat /proc/mounts
[*]and search for 'system' in the mount list to check correct path for ‘/dev/block/mtdblock2 /system’. If it differs, alter the above line.
Typ in adb shell:
#exit
adb push C:\es209ra_keypad.kl /system/usr/keylayout/
Reboot your phone
This should work... if it doesn't, just leave a comment, and I'll probably try to help you.. that is, if I'm in a good mood..
I attached my es209ra_keypad.kl, just for reference purposes I guess, or for people who are too shy to pull stuff from their phone.
thanks for this!! i have been after a few key tweaks for a while!! don't suppose you have any idea how to make the back key "kill" foreground app!!
2.1 optimised 2.1.67
good idea
thanks for sharing this
[Q] Disable wakeup using home button? [SOLVED]
Use Search next time
prewed said:
[Q] Disable wakeup using home button? [SOLVED]
Use Search next time
Click to expand...
Click to collapse
Aren't you just mister friendly? Thank god we got guys like you on this forum, otherwise this place would be fun.
I did use search, so unfortunately for you. I could not find a correct guide explaining step by step how to do it WITHOUT root explorer
xx
[email protected] said:
thanks for this!! i have been after a few key tweaks for a while!! don't suppose you have any idea how to make the back key "kill" foreground app!!
2.1 optimised 2.1.67
Click to expand...
Click to collapse
no problem, ill try to find out if it is possible in 2.1, i think its in the framework though. It's already embedded in 2.2 and 2.3 (long press back), so you can try a custom ROM ?

Run Fastboot, ADB, etc. from anywhere on your PC

Had some interest in this, so I thought I'd make a quick thread about it. Not a big secret or anything, just a little time saver.
Here is how to set up your computer so that you can run a fastboot, adb, etc. command from anywhere in the file system. You will no longer have to goto the fastboot folder and the type the full file path to the file you are trying to install, push, etc. if you saved it somewhere else, or clutter up the same folder you have these important files saved in.
*These instructions are for Windows 7 (x64):
First make sure that your fastboot files, adb files, moto-fastboot files are in a folder that isn't going anywhere (give them a permanent home on your pc ).
Then do the following:
Navigate to: Control Panel -> System ->Advanced System Settings -> Advanced Tab -> Environmental Variables
Under "System variables" scroll down to the variable labeled "Path" and choose Edit.
Go to the end of the Variable Value and add a ";" (no quotes) if needed on the end of the last variable, and then add the complete file path to the location of your files (only add spaces if there are spaces in the file path). So mine would be: ....;C:\android-sdk-windows\tools
OK out of everything.
Now you can just shift + right-click in the folder you saved the file, Open command window and type the command.
*Note: If you change the location of your fastboot files, you will have to change the location in the variable path again, otherwise this wont work. Capiche?
Swiftks said:
Had some interest in this, so I thought I'd make a quick thread about it. Not a big secret or anything, just a little time saver.
Here is how to set up your computer so that you can run a fastboot, adb, etc. command from anywhere in the file system. You will no longer have to goto the fastboot folder and the type the full file path to the file you are trying to install, push, etc. if you saved it somewhere else, or clutter up the same folder you have these important files saved in.
*These instructions are for Windows 7 (x64):
First make sure that your fastboot files, adb files, moto-fastboot files are in a folder that isn't going anywhere (give them a permanent home on your pc ).
Then do the following:
Navigate to: Control Panel -> System ->Advanced System Settings -> Advanced Tab -> Environmental Variables
Under "System variables" scroll down to the variable labeled "Path" and choose Edit.
Go to the end of the Variable Value and add a ";" (no quotes) if needed on the end of the last variable, and then add the complete file path to the location of your files (only add spaces if there are spaces in the file path). So mine would be: ....;C:\android-sdk-windows\tools
OK out of everything.
Now you can just shift + right-click in the folder you saved the file, Open command window and type the command.
*Note: If you change the location of your fastboot files, you will have to change the location in the variable path again, otherwise this wont work. Capiche?
Click to expand...
Click to collapse
Thanks you as I had trouble with this for my nabi2
Swiftks said:
Now you can just shift + right-click in the folder you saved the file, Open command window and type the command.
Click to expand...
Click to collapse
It turns out you CAN learn something new every day! This is a huge timesaver. I wish I had known this years ago!
Huge thank you! I knew i could do this somehow, but havet managed to do so before. Whit this guide i managed to get it working in windows 10 enviroment.

Categories

Resources