Playing with Root and Keymapping - Samsung Captivate Glide

I was thinking since we have root and we have a Hardware Keyboard it would be nice to actually have a Hardware button for the Camera.
So I started Searching around on how to do it. I found an application that claimed to be able to do it called "buttonremapper". Unfortunately this program only sees the Menu and back button. 2 buttons I do not wish to remap.
I did find a program called Keynrtracker on XDA that allows me to see the ID's of every button pressed including the Hardware buttons.
I researched a little more and found where the Key mapping files are located:
"system/usr/keylayout"
In here, there are many files that have to do with the keyboard. I found the one to modify is the:
"STMPE_keypad.kl"
this file has all the keys and I simply wanted to change the Search button from the keypad to bring up the Camera so I did this:
key 217 CAMERA WAKE_DROPPED
where previously 217 was:
key 217 SEARCH WAKE_DROPPED
"Wake dropped" is to tell the button to wake up if asleep or not.
Make sure you backup before have root and save. Reboot to load changes.
Well it now works I have a Hardware Camera button. One thing I noticed is I have to Hard press the button and hold not just click. Anyone know why? Added benefit is once the camera app is open, it also takes pictures by pressing on that same button.
JB

nice ^__^

It sounds like you re-mapped long press search, which normally goes to google search, which is why you may have to hold it down longer. Does a short press bring up the normal search menu?

Nardholio said:
It sounds like you re-mapped long press search, which normally goes to google search, which is why you may have to hold it down longer. Does a short press bring up the normal search menu?
Click to expand...
Click to collapse
Short press on its own does nothing. Pressing it with any other key does a normal search.

dudejb said:
I was thinking since we have root and we have a Hardware Keyboard it would be nice to actually have a Hardware button for the Camera.
JB
Click to expand...
Click to collapse
I'm assuming, you want to have it set as a 1 key touch operation instead of setting it up in quick launch configuration like Search + C.
pics can be taken using the OK button by default.

clockwork58 said:
I'm assuming, you want to have it set as a 1 key touch operation instead of setting it up in quick launch configuration like Search + C.
pics can be taken using the OK button by default.
Click to expand...
Click to collapse
Agreed 1 touch I also like the ability of knowing I can change any key on the keyboard like that useless "www.com"button.
Sent from my SAMSUNG-SGH-I927R using xda app-developers app

Related

Repurposing the volume up/down buttons?

i really miss hardware scroll buttons.
on the rhodium there are two little side buttons for adjusting the volume. i'd really like to repurpose these as scroll up/down. For example, to work inside a browser. Unfortunately, there is no standard option (i can find) to redefine the purpose of these buttons.
i'm hoping there's another way. eg registry hack etc.
thanks for any help,
Use AEBPlus
I am doing exactly the same thing with my Volume Up/Volume Down, I've turned them into arrow keys. The lack of these is my biggest annoyance with the TP2.
That said, I have noticed a little flakiness - most of the time they work fine, but sometimes I hit them and they don't scroll as I expect. Then a moment later they start working.
Anyway, it's much better than not having them re-assigned.
Incidentally, AEBPlus has a cool feature where you can tell it not to remap the Volume keys when you're on a call, so they can still be used then.
Thanks for the tip, i'll give it a go!
AEBPlus works? I'll try it. heard from another TP2 user that it caused his device to freeze up resulting in a hard reset...
Putra said:
AEBPlus works? I'll try it. heard from another TP2 user that it caused his device to freeze up resulting in a hard reset...
Click to expand...
Click to collapse
Been OK for me so far
Yes, AEB Plus works (no hard reset), but I can only add the windows button. The <-- (back) button does not work when mapped using AEB Plus.
Also, if you're using the JBed Midlet manager, the arrow keys automatically scroll up and down. It works well with Opera Mini.
AEB plus does nothing for me... i just have a list of buttons I can't do anythign with, a giant memory leak and crashing.
julienrl said:
AEB plus does nothing for me... i just have a list of buttons I can't do anythign with, a giant memory leak and crashing.
Click to expand...
Click to collapse
Yeah there appears to be no way to open an entry from the list using touch alone - must be a bug.
Highlight one of the buttons in the list, flip out your keyboard and then press enter/return. It will open the Edit menu where you can assign that button to something.
tjobbins said:
Yeah there appears to be no way to open an entry from the list using touch alone - must be a bug.
Highlight one of the buttons in the list, flip out your keyboard and then press enter/return. It will open the Edit menu where you can assign that button to something.
Click to expand...
Click to collapse
ahhhhhhhhhhhhhhhhhhhhhh! lol, I was wondering why people were talking so much about an app that does nothing
Did you guys install to main memory? I had no problems with AEB Plus on my 1.19.707.2 ROM.
I could assign the vol up/down keys and could also add the windows key. It is a bit tricky using the windows key as the first press brings up the programs tab.
I added the back key also, but couldn't get it to work. I didn't touch the send and end keys.
BTW, I used AEBPlus v2661
Putra said:
Did you guys install to main memory? I had no problems with AEB Plus on my 1.19.707.2 ROM.
I could assign the vol up/down keys and could also add the windows key. It is a bit tricky using the windows key as the first press brings up the programs tab.
I added the back key also, but couldn't get it to work. I didn't touch the send and end keys.
BTW, I used AEBPlus v2661
Click to expand...
Click to collapse
This all is my biggest concern upgrading from a Tilt.. I REALLY like hardware buttons, and make extensive use of AEButtonPLus as it is...
tjobbins said:
Yeah there appears to be no way to open an entry from the list using touch alone - must be a bug.
Highlight one of the buttons in the list, flip out your keyboard and then press enter/return. It will open the Edit menu where you can assign that button to something.
Click to expand...
Click to collapse
Press the entry in the list and keep holding for a few seconds more.
I've been using it since I had my touch hd and it works perfectly and I haven't found it to cause any issues.
Personally i assign one volume button to a task switcher (spb ms3 task manager) which makes multi-tasking far easier. You can then map double clicking to the original volume functions and even long hold to something else useful such as comm manager.
Awesome Tip. AEBplus Confirmed to be working fine on TP2 from T-Mobile (still stock rom for now). I made the volume buttons map to up and down like suggested but also made a long hold for volume up do "enter/activate" and a long hold for down do rotate the display.
my phone (telus rom) keeps getting screwed up when I install AEBplus and gets back to normal when I undo it.

Menu key to unlock

When I turn on my phone from standby I am surprised to find that to unlock the phone, ad well as wiping down I can also press the menu key.
Is this normal? It seems to override the whole protection which wiping provides.
Can the menu key option be disabled?
yes it is normal. All Android phones do this as this was the standard on earlier Android phones.
Some people prefer it to swiping. I am one of those people.
I know of no way to disable it, but it has been covered quite a few times in the sapphire and Hero forums. I'd also check in the nexus forums as well.
Hope you find what you're looking for.
Ok. Thanks for the clarification.
oh i didnt know that, ... so if you put it in your pocket and the menu button got pressed by accident that it would be unlocked, .. hmm ... not very cool
irkan said:
oh i didnt know that, ... so if you put it in your pocket and the menu button got pressed by accident that it would be unlocked, .. hmm ... not very cool
Click to expand...
Click to collapse
You need to press power button before to wake up the phone, and, after that, press menu button... I think it won't happened so many times...
Please correct me if i'm wrong, but i thought you cannot "accidently" press the Touchscreen of the Desire because it is not responsive to something unorganic?!
exactly.
But as has been said, you would have to press the power button, and then press the menu button.
And anyway, I've had my Hero since August, and that unlocks with two presses of the menu button which is easier to do in a pocket and its never happened to me so far.....
Is there an app/widget to just simply lauch the lock screen?
Aha. Very good point about the organic pointer requirement. That should stop most of the accidents.
fooXeh said:
Please correct me if i'm wrong, but i thought you cannot "accidently" press the Touchscreen of the Desire because it is not responsive to something unorganic?!
Click to expand...
Click to collapse
XDAgeek said:
Aha. Very good point about the organic pointer requirement. That should stop most of the accidents.
Click to expand...
Click to collapse
the screen receives only organic requests, ... but not the menu button!
if you turn off the display from above and put it in your pocket than this doesnt matter, because its very hard to "accidentally" press the power button in the first place.
but am talking about what if you left the screen, just locked the device and put it in your pocket, ... if you pressed the menu button accidentally than you can keep pressing search, back, menu, home buttons accidentally while in your pocket
irkan said:
but am talking about what if you left the screen, just locked the device and put it in your pocket, ... if you pressed the menu button accidentally than you can keep pressing search, back, menu, home buttons accidentally while in your pocket
Click to expand...
Click to collapse
How can you lock the screen and not need to hit power to wake it up?
mhewitson said:
How can you lock the screen and not need to hit power to wake it up?
Click to expand...
Click to collapse
That's what I've been trying to find out too!
O and O said:
That's what I've been trying to find out too!
Click to expand...
Click to collapse
Why on earth would you want to do that?
Because would like the display to time out but without me having to press the button but I also want it to be locked.
O and O said:
Because would like the display to time out but without me having to press the button but I also want it to be locked.
Click to expand...
Click to collapse
Why though?
Don't get me wrong I'm not having a go at you but how hard is it to press an extra button or to just let it timeout.
i also think that it would be great if we could press any harfware key to wake up the device... i think thats a great feature on hd2.
mr.vandalay said:
i also think that it would be great if we could press any harfware key to wake up the device... i think thats a great feature on hd2.
Click to expand...
Click to collapse
I agree 100%. My hands aren't that big and it can be annoying at times having to stretch my index finger all the way to the top. Would be so much better it it could be done with my thumb (using one of the bottom hard keys).
I'm not moaning, just voicing my opinion.
I love this phone too much for it to be an issue.
Yep, I want it to be like on my Hero.
is there some progress on the situation above?
yes there is
http://forum.xda-developers.com/showthread.php?t=683902
basically you do it like this
enter recovery
adb-nilezon shell mount /system
adb-nilezon pull /system/usr/keylayout/bravo-keypad.kl c:\
edit bravo-keypad.kl to your liking --> loacted in c:\ on your comp
adb-nilezon push c:\bravo-keypad.kl /system/usr/keylayout/bravo-keypad.kl
adb-nilezon shell reboot
if you edit bravo-keypad.kl like this (add WAKE_DROPPED on key 139) than when you press menu button you'll wake up your device, you can assign back, home or search key for this... the choice is yours
Code:
key 102 HOME
key 139 MENU WAKE_DROPPED
key 158 BACK
key 217 SEARCH
key 107 ENDCALL WAKE_DROPPED
key 116 POWER WAKE_DROPPED
key 115 VOLUME_UP WAKE
key 114 VOLUME_DOWN WAKE

[Q] Can you wake up/unlock Xoom with keyboard?

Was thinking of ordering one, curious how unlocking the Xoom worked with the keyboard. Thanks!
I just checked and no, you cannot unlock with the keyboard. You can switch the screen on duration to fit your needs.
Sent from my Xoom using XDA Premium App
Actually, yes you can. if you have a keyboard with the "menu" key (usually on the right side of the keyboard near the Ctrl+Alt keys) it will work. I tried it last night and from sleep, one press takes to the unlock screen, one more unlocks the Xoom. Even without the Motorola Android specific keyboard, I found a lot of amazing shortcuts on a normal keyboard, do a google search, there are a lot, from opening Gmail/the browser to composing e-mails, etc. Just typing on the home screen brings up the search, which is great, and you can navigate most things, including going between home screens with the arrow keys. It convinced me that using the Xoom as a mini laptop replacement is relatively possible.
Hmmm, I tried every key on the moto keyboard and it will not wake it. Interesting that a generic keyboard would have that function.
I really do like the official keyboard however, I wish there was some way to map some of the keys. Its not really optimized for 3.0. Some of they keys do nothing and I haven't found a way to access the app drawer. A bit disappointing.
I think you modify the keylayout file so the button you want to wake has the "WAKE" attribute.
any idea on how to modify the keylayout on the motorola BT keyboard?
Half-way there
Actually, you can bypass the lock screen by hitting the "settings" button (or whatever it is called) 2 keys to the right from your spacebar on the Moto keyboard. However, I still can't get it to actually wake via a keypress.
Edit the /system/usr/keylayout/Vendor_22b8_Product_093d.kl file, assuming you are rooted.
On line 99, add the word WAKE beside MENU like this:
key 125 MENU WAKE
Save it and reboot. Be sure to make a backup of this file first in case you have any issues. Press Menu button once to bring it out of sleep and a second time to unlock it.
Thanks. I'm actually not rooted. Maybe I'll give that a try as well...
this worked perfectly! thanks very much
I have gotten my Xoom to wake up by pressing and holding the power button on the keyboard. It doesnt always work. It seems to depend of if the keyboard is awake itself. I have gotten them apps menu to open using the keyboard as well - its not an easy task. It depends on your ability to navigate to the top line on the home screen. Pressing enter will allow you to see if you have selected the top line (the top line is the row with the apps button, text and voice search, and the plus button). I can press alt+tab to select row, and then can cycle through the 4 options using tab. It is really hard to know which option you are on since it does not highlight as you cycle through. You simply press enter when you think you have it right. I think its much easier to just start typing the name of the app you wish to use and allow the xoom to search for it.
anthony_m_king said:
Edit the /system/usr/keylayout/Vendor_22b8_Product_093d.kl file, assuming you are rooted.
Click to expand...
Click to collapse
Is there any way to find out what file will be used for a keyboard? I bought a generic BT keyboard from eBay that has lots of Apple-specific keys. I wanted to remap them to take advantage of Android commands. I got the scancodes for each key and modified the Generic.kl file. In this file, however, it recommends to create a separate file for each device but I have no idea how I would make HC aware to use the specific file. Any ideas?

[Q] Strange HW-Keyboard behavior

Hi,
im using the i927 with OsiMood-Rom.
Today its the second time, that my hardware keyboard behaves a bit strange:
- When I press "e" the Email App opens
- When I press "b" the browser opens
First time I got it "repaired" with a reboot, for now a re-open of the keyboard helped.
What is going on there?
That is not a weird behaviour but a feature. It's called "Quick Launch" and is started by pressing and holding the search button on hw keyboard plus any key in the hw keyboard. the "E" key is the default for email (press "Search" + "E" = Email), you can modify this in settings > applications > quick launch
Thanks, I mentioned that it's something like this but I didn't know what other button activates the shortcut or where to disable it
Roeni said:
Thanks, I mentioned that it's something like this but I didn't know what other button activates the shortcut or where to disable it
Click to expand...
Click to collapse
Like me, you might be using the "Search" button (either soft/hardware keys) to launch apps a lot.....most of the time, I end up pressing search plus the first character of an app i want to launch that results in pressing the two keys almost at the same time. That is how I accidentally discovered it....
I was like searching the "Email app" then I accidentally pressed the "E" key while the "Search" key is pressed then I went "How did this thing know that I want to launch Email?"
Press your search key again on your keyboard it is stuck. Happened to me once or twice. Quick launch is launching your short cuts that are programmed because it thinks you are hitting a 2 key combination. (Search and E)

hardware button long press remapping

messing around with the (how to enable soft touch keys) mod I found how to remap the hardware buttons to my liking... I was able to remap the home button to search and back, but I've found that whatever happens 1 line of code makes the button's 3 functions go with it... when I made it search pressing it brought up search, long pressing it brought up voice search and double pressing did nothing. I even tried making the menu button into home and all it's functions came with it, double pressing the menu button brought up s voice and long pressing it brought the task manager.
I guess my question is this: since the code tells a button what it's called where are the functions of these names stored? I can change the home key "key 172" to "SEARCH" but I haven't been able to find which file figures out what to do when a button labeled "SEARCH" is pressed, double pressed, or held...
I know s voice knows how to edit this file since it has control over double trapping home. and android system knows how to edit it too since every android "including our phone" asks to select a default action when long pressing a "SEARCH" button
my ultimate goal is reconfiguring a button to bring up Google now (which I love) without undoing the original button function (say making double tap home or long pressing menu bring up Google now). I'm also sure others would benefit from knowing how to do this kind of stuff namely people who want a camera button or a search button
any help would be appreciated
Sent from my SPH-L900 using xda app-developers app

Categories

Resources