Besides editing the .kl files, is there something else I need to do to remap the click function of the optical pad? I don't seem to have any success so far...
In both the incrediblec-keypad.kl and qwerty.kl files, the following line exists:
Code:
key 232 DPAD_CENTER WAKE_DROPPED
I have tried simply changing "DPAD_CENTER" to "CAMERA" (in both files) and then rebooting, but the phone does not behave any differently. If I use this same procedure for a different key (like Volume-Up, for example) it works perfectly. Is there something else in the framework that is preventing remapping of the optical click though?
For what it's worth, I'm running Virtuous 3.0.1... though given the fact that I can remap other keys, I'd assume it isn't a ROM issue
I tried the exact same thing. My one problem with this phone is that I can't bind something to this key. I would LOVE to get it to load the camera. I made a thread a few weeks ago, but no one responded. I was thinking making dpad_center isn't actually the right identifier for this key? BUMP!
I wish I could find a way to wake the phone up consistently with the track pad.
1967ls2 said:
I wish I could find a way to wake the phone up consistently with the track pad.
Click to expand...
Click to collapse
I second this
Sent from my Incredible using XDA App
Gahh Its Lee said:
I second this
Sent from my Incredible using XDA App
Click to expand...
Click to collapse
There's a forum dedicated to this tweak
I'm using it now
Sent from my ADR6300 using XDA App
Search optical joystick wake
Sent from my ADR6300 using Tapatalk
So no one has any solutions for mapping the camera to the optical click?
intenselyinsane said:
Search optical joystick wake
Sent from my ADR6300 using Tapatalk
Click to expand...
Click to collapse
I ran a search for "optical joystick wake" and I don't seem to be able to find the thread you are referring to.
From forum.xda-developers.com/showthread.php?t=825511[/url] it appears that key 232 is incorrect. It should be key 272.
Runawaycoder said:
From forum.xda-developers.com/showthread.php?t=825511[/url] it appears that key 232 is incorrect. It should be key 272.
Click to expand...
Click to collapse
Thank you very much! That is quite helpful. Let me try some experiments on my end and see if I can get this working now...
First off, let me offer major thanks to TheLynxy for clearing up the whole 232/272 thing: I was wondering why rebinding the optical trackpad click never did anything (I was leaving it at 232)
What I've always wanted to do with mine was map it to be a camera button. It would seem that still does not work, even now using the correct key #
If I use the following, nothing at all happens (the phone doesn't even wake up)
Code:
key 272 CAMERA WAKE
Interestingly, however, using the FOCUS command instead will wake the device, but still does not start the camera (even if the camera is already running in the background)
Code:
key 272 FOCUS WAKE
TheLynxy said:
When the phone is on, the trackpad behaves like normal, eg the active application decides what the button does.
Click to expand...
Click to collapse
This is another interesting point about the whole thing. It seems like this is a button that is really on lockdown by the phone.
So while some progress was made, I still can't get the camera functionality I wanted. Oh well.
Related
Hey all, I am an iphone convert. Recently purchased the HTC outright. Great phone. Coming from a jailbroken iphone there are a couple of features that I miss. They're not deal breakers but they are really convenient in my opinion..
I love using my phones as a media player. And although there's no equalizer on the desire, I think the quality is pretty good assuming you're using reasonable earphones.
I found an app on cydia for iphone which reassigned my volume rocker.
If I just tap the volume up or down, it changed the volume as normal.
If I hold the volume key up or down, it skipped the track forwards or backwards.
I was hopeful that a developer might see this as a good addition to the Desire and be able to emulate such a function for the volume keys.
Thanks!
Hmm i'm guessing that you don't use the stock headphones with inline controls then. I'm hoping when the device is rooted a lot of hacks should surface. I want to use the optical trackpad press to bring up the lockscreen for instance. And a flashlight app that actually uses the flash and not a bright white screen lol.
nope. Those earphones are way to large for my ears! I can't even fit the buggers in!
But I agree, being able to wake the phone with the trackpad is a must.
Here's hoping sooner rather than later
ephumuris said:
Hmm i'm guessing that you don't use the stock headphones with inline controls then. I'm hoping when the device is rooted a lot of hacks should surface. I want to use the optical trackpad press to bring up the lockscreen for instance. And a flashlight app that actually uses the flash and not a bright white screen lol.
Click to expand...
Click to collapse
drewsta_j said:
But I agree, being able to wake the phone with the trackpad is a must.
Click to expand...
Click to collapse
Grab the application "No Lock" from the market - works perfectly on my Desire.
drewsta_j said:
Hey all, I am an iphone convert.
Click to expand...
Click to collapse
drewsta_j said:
If I just tap the volume up or down, it changed the volume as normal.
If I hold the volume key up or down, it skipped the track forwards or backwards.
Click to expand...
Click to collapse
Excellent idea. There is currently application with proves key rebinding is possible without root (Tasker), unfortunately it doesn't have volume keys and I do not have time now to try implementing a solution for this.
I will personally look into this in a month (extremely busy atm) as a hobby, and hopefully the device will have been rooted by then making this definitely possible. I'm not an amazing dev., but I can hack around to make things work
Went from Dream to iphone, but Android pulled me back with the Desire.
We are all waiting for root indeed! Shouldn't take too long I reckon. It is definately a must to wake up on menu/trackpad or home key. Anyone has some ideas?
No lock also bypasses the lockpattern, too bad. And it looks as if it runs in the background and only turns off the screen. Feels like it wil drain the battery, but maybe I am mistaking.
NoLock is okay, but any key turns the screen on. This could be a pain if it's in your pocket and you accidentally press the volume keys, for instance.
When I had the tweak that allowed me to skip tracks with the volume keys, it took away most of my needs to turn the screen simply to skip tracks. This helped save the battery.
Not only that, it also helps if you are running a different application. You wouldn't need to go back to the home screen to use the widget.
Just a couple more benefits
Hi all,
My 1st post on xda
I'm no developer, and haven't coded anything since ages, but after some digging I think may be possible to implement such a feature.
According to the android developer reference on (sorry, I'm a new user so I can't post links)
KeyEvent
KeyEvent.Callback #onKeyDown
Dialog #onKeyDown
And those forums (search for this on google)
anddev org disable_volume_keys-t10191.html
google groups android developers Long-press hard volume keys
Tell me if I'm wrong, but those links indicate that it is possible to replace the behavior of a key press ("intercepting" it before it gets interpreted by the system that changes the volume setting). Then once you intercepted it, you can check if it is a normal key press (short), in which case you would still allow to "forward" the information to the system. BUT, if you detected that it is a long press, you activate the action "next track" and do not forward the volume information to the system.
Something like (syntax is nor correct, of course)
Code:
public boolean onKeyDown(int keyCode, KeyEvent event) // the way I understand this line, it will replace the default behavior of the onKeyDown routine
{
if (keyCode == KeyEvent.KEYCODE_VOLUME_DOWN // if the key pressed down is vol_down
...
if the key press is long // don't know the code for that
do the action for next track
return true; // means that you do not forward the keypress to the system
else // if the keypress is not long
return false; // you have not intercepted the keypress, so you forward it to the system
...
else return super.onKeyDown(keyCode, event); // if any other key is pressed, forward it directly
}
Any opinions on that? Is the xda forum the right place to talk about code, or are other forums more suited to discuss about that?
Interesting..
If the code looks like that I might have to take up a hobby in learning how to code. It doesn't appear to be tooo difficult at all.
It does look like you may be on the right track there Bricolo_fr..
Cheers for looking into it.
Drew.
I see a potential problem though. You'd need to know what media playback program is actually being used, and it needs to support receiving messages from other programs so that you can tell it to skip to the next track. This might even require different coding for every player program available, if they receive messages in different ways.
In other words, you could end up having to write your own media player program.
FloatingFatMan said:
I see a potential problem though. You'd need to know what media playback program is actually being used, and it needs to support receiving messages from other programs so that you can tell it to skip to the next track. This might even require different coding for every player program available, if they receive messages in different ways.
In other words, you could end up having to write your own media player program.
Click to expand...
Click to collapse
Ok, well surely there must be a simple solution?
Why can't we say create an app where you could select which media player you are using (only have a few of the main ones) then we would be able to amend the code as per which option they select before it was implemented?
drewsta_j said:
Ok, well surely there must be a simple solution?
Why can't we say create an app where you could select which media player you are using (only have a few of the main ones) then we would be able to amend the code as per which option they select before it was implemented?
Click to expand...
Click to collapse
Sure you can do that; buy you'd have to examine each of those apps, work out if they accept messages, and work out what format said messages need to actually be in.
One would hope they would implement standard interfaces, but that's all it is, a hope.
Well personally, I use the stock player. It ain't the best but it gets the job done. So if it was just created for that at least I'd be more than happy
Thanks for the comments.
FloatingFatMan you are indeed right. I didn't know that all media players don't behave the same. So not all of them accept incoming messages, and not with the same protocol? Hum...
Does that mean that widgets for media player control are only compatible with a specific media player, also?
About the code itself, do you guys think can work?
I'm quite new here, is xda a place about writing code or should we discuss that in another place where people are more used to that?
Cheers
now that the Desire can be rooted...
on the Nexus one (probably other devices too) with the cyanogenmod roms, this feature is availale. just long press vol+ or vol- and you get next/prev track
can this be done with a moded rom on the desire also? what kind of changes need to be applied to the stock rom to add this function?
Bricolo_fr said:
now that the Desire can be rooted...
on the Nexus one (probably other devices too) with the cyanogenmod roms, this feature is availale. just long press vol+ or vol- and you get next/prev track
can this be done with a moded rom on the desire also? what kind of changes need to be applied to the stock rom to add this function?
Click to expand...
Click to collapse
Agreed. am really liking forward to his feature now the phone is rooted.
ephumuris said:
Hmm i'm guessing that you don't use the stock headphones with inline controls then. I'm hoping when the device is rooted a lot of hacks should surface. I want to use the optical trackpad press to bring up the lockscreen for instance. And a flashlight app that actually uses the flash and not a bright white screen lol.
Click to expand...
Click to collapse
You can try Flashapp on the Market. I can post URL yet but you'll find it...]
Another excellent example that long press on a hardkey can be implemented without root is Quick Settings (great app btw): it can be brought up anytime, no matter what app you are running by longpressing the search key.
Did anyone ever get any further with this?
ephumuris said:
And a flashlight app that actually uses the flash and not a bright white screen lol.
Click to expand...
Click to collapse
Apologies as I know it's a bit OT for this thread, but just wanted to make sure you were aware of the LED Desire Light app (http://www.appbrain.com/app/nostovic.android.desire.ledLight) - the latest version even has a nice wee widget to put the flash on/off, but the main app also offers SOS and turning text into Morse code!!
oxygen mod - based on cyanogen has:
* Skip tracks with long press volume up/down
http://forum.xda-developers.com/showthread.php?t=829734
update: it's a cyanogen feature, so all mods based on cyanogen have this
it works with screen locked.
There's a search button and menu button but no back button on the physical keyboard. Somebody should make a mini app that acts as a back button, so we could assign 1 of our 3 keys to the app and have that functionability.
I live in very cold weather and between my fingers getting so cold the buttons wont recognize my press or wearing gloves and having to remove them to hit one of the buttons, this could be a useful app for people (me).
Also a home button app could work as well for them.
What do ya think?
Sent from my T-Mobile G2 using XDA App
+1 for this idea. I wear gloves constantly outside...
I too would like to have a physical back button. +2 to this idea! I couldn't find any easy solution to this on my own, but it would be great to have a back button mapped to the second or third quick key.
Sent from my T-Mobile G2 using XDA App
erm..might sound stupid but does the backspace key not do this already (when not in a text field).
The backspace/delete key does not do this.
I was referred to this post by fellow XDA user nomadism. He writes:
nomadism said:
"user1" "user2" "user3" are the three QuickKeys, starting from the left
Click to expand...
Click to collapse
I set it to "user3", so there won't be any accidents pressing the key.
Sent from my T-Mobile G2 using Tapatalk Pro
Cyanogenmod 6.1.0 stable + ClockworkMod 2.5.1.3 + sonnysekhon's Gingerbread theme
Well with the stock rom and a temp root, it acts like it works but then never does..says I need to reboot to take effect but when I do it doesn't work, am I doing it wrong? I had to use the first version cause the second version of the app would crash on me
collins521 said:
Well with the stock rom and a temp root, it acts like it works but then never does..says I need to reboot to take effect but when I do it doesn't work, am I doing it wrong? I had to use the first version cause the second version of the app would crash on me
Click to expand...
Click to collapse
Pretty sure you need full root / S-Off for this as the /system/usr/ files it overwrites would get reset to stock every time you reboot with temproot.
Well, yeah, it needs root. As the thread says "for full rooted devices. (NAND unlocked. Full, permanent write access to the system dir is needed)".
I'm sure you can't do this without root.
Use your nose to press the soft key, it's usually warmer than your fingers. Also convenient if your hands are full.
Guess this could help:
http://forum.xda-developers.com/showthread.php?t=850464
They got some gloves I think from isotoner, called smart touch, made specifically for touch screen phones. You should check it out.
Sent from my T-Mobile G2 using XDA App
g4rb4g3 said:
Guess this could help:
http://forum.xda-developers.com/showthread.php?t=850464
Click to expand...
Click to collapse
Thats exactly what I use. I also used this program to set "@"to DPAD_LEFT and "www" to DPAD_RIGHT. It works as an up and down button. Like a mini replacement for the trackpad. I figured if ur fingers were too cold to reach the back button, you might could use some help witht that trackpad too ; )
Standard Disclaimer: I am in no way responsible for your device ,marriage, or social life, so don't come crying to me when something happens to one or all of them. You assume all responsibility and risk.
THIS APP IS BETA:
This is a simple app I made for the A100 semi- based off the popular HideBar app by Pieter Pareit. What this app does is allow you to use the capacitive Home Button on the device (A100) to toggle the Notification Bar on/off.
HOW TO SET UP
Download the two files in the folder
Take the "gpio-keys.kl" file and move it to "/system/usr/keylayout" (make sure to make a backup of the old one before pasting)
Make sure permissions are set to RWXRWXRWX or at LEAST RW-R--R--
Now Install the downloaded APK like normal.
FILES CAN BE FOUND HERE
HOW TO USEThe gpio-keys file basically changes the home button to act as a search button (which this beta app uses) so to use the toggle, just LONG PRESS the search button and select the toggle. The first time it will ask for root permissions. I do recommend setting it as the default app. There is no app icon.
TO DO: This app is in beta, so I need you guys to let me know any bugs you find! Besides that I plan to bypass the need to use a search button.
THANKS TOO: dima_tr for, Pieter Pareit for his HideBar App , sanixk for his tutorial on how to remap hardware keys , crossix for his continued development on this device ,aznmode for letting us all know about HideBar originally , and Acer for a great tablet
Just in case
Sent from my Acer A100 using XDA Premium
What I get no thanks for initially posting the hidebar app? lol. Jk I dont think I was the first one to. Anyway, thanks for this. Will try it out when I get home!
aznmode said:
What I get no thanks for initially posting the hidebar app? lol. Jk I dont think I was the first one to. Anyway, thanks for this. Will try it out when I get home!
Click to expand...
Click to collapse
You actually were the first to post about it xD (at least that I saw) so definitely added your name.
Let me know how it works for you
Sent from my EVO 4G
I can't seem to get this working on my A10. I put the gpio-keys.kl file where it belongs. I installed the apk. Permissions are correct. I may be wrong but seems that the gpio-keys.kl from the download is identical to the one in my "/system/usr/keylayout"
this is the one I downloaded
key 136 SEARCH WAKE_DROPPED
key 139 MENU WAKE
key 102 HOME
key 158 BACK WAKE_DROPPED
key 116 POWER WAKE
key 115 VOLUME_UP WAKE_DROPPED
key 114 VOLUME_DOWN WAKE_DROPPED
this one is my backup copy from "/system/usr/keylayout"
key 136 SEARCH WAKE_DROPPED
key 139 MENU WAKE
key 102 HOME
key 158 BACK WAKE_DROPPED
key 116 POWER WAKE
key 115 VOLUME_UP WAKE_DROPPED
key 114 VOLUME_DOWN WAKE_DROPPED
am i missing something?
You have to change
key 102 HOME
to
key 102 SEARCH
simoneser said:
You have to change
key 102 HOME
to
key 102 SEARCH
Click to expand...
Click to collapse
Yes that is correct I thought I changed it to make it easier I apologize ill fix that.
Thanks simoneser
EDIT:I reuploaded the gpio-keys.kl file. Should work fine now, I apologize.
Sent from my EVO 4G
got it working
I like it so far. I'm going to check it out for a while. Thanks!
Good job! it works great. There is a typo in gpio-keys.kl though, an `s` is the first char.
eww245 said:
Good job! it works great. There is a typo in gpio-keys.kl though, an `s` is the first char.
Click to expand...
Click to collapse
Thanks for letting me know, I reuploaded a fixed version. =)
Hopefully in the next couple weeks ill have a version that doesn't need an extra gpio-keys file and just uses the home button, but that looks like it takes looking into the binding and not just android.intents so with a busy life don't hold me on the time frame
Thanks allot for making the app. Any known issues we should watch out for or things we should avoid doing with it enabled etc?
I did find an issue with using this. I was watching a video in Netflix with my taskbar hidden and the home button worked as a search button only. The long press would not work. I had no way to exit the program without restarting my tab. Any way to fix this? I'm sure there are other apps that would have this issue as well.
Sent from my A500 using xda premium
NoSudo said:
Thanks allot for making the app. Any known issues we should watch out for or things we should avoid doing with it enabled etc?
Click to expand...
Click to collapse
Well the only issue is that at the moment this does call for the search button so any app that doesn't have a need for it won't be able to launch the app.
As for the problem above (cant multiqoute on tapatalk) that's a weird issue , but it seems like it goes along with what I said above and their is no workaround until I make the app use the home button as a "home button"
Sent from my EVO 4G
will you continue to work on this to make it more functional?
thanks for the hard work put in it anyway
nunoruf said:
will you continue to work on this to make it more functional?
thanks for the hard work put in it anyway
Click to expand...
Click to collapse
Oh wow, I almost forgot about this (not in the A100 threads much)
But I suppose it's possible. I'm not very sure about ICS compatibility, but I'll take another look at this soon
Sent from my EVO 3D using Tapatalk 2
Yes, it would be amazing if you could find the time to update this to be ICS compatible!
Yes please make this ics compatible
Sent from my A100 using Tapatalk 2
Any progress on this purty please?
I don't have a comp right now so I can't work on this. Eventually though
Sent from my PG86100 using Tapatalk 2
yes ..
yes...
+1 for ICS compatibility !
Hello all! I have recently become fascinated with the app here ( http://forum.xda-developers.com/showthread.php?t=1721895 ) and now have no use for my power button. i want to remap it to do absolutely nothing just like it was broken so that my pesky brother cannot get into my phone. I went to system/usr/keylayout/tuna-gpio-keypad.kl and changed key 116 which is the power button to none but nothing happened. does anyone know what to put there to do such a thing?
I just tried deleting the key 116 and it disabled the power button but then caused PGM to stop working. Still trying to figure this out.
EDIT:Someone has to know how to do this. XDA is the smartest community Ive followed
Perhaps turn it into a camera button.
butter and jelly please...
@rbiter said:
Perhaps turn it into a camera button.
butter and jelly please...
Click to expand...
Click to collapse
When you turn it into another function lets say HOME. The swipes from the PGM application look at that key and do what said key says. so we need to find a way to add a fake key, say key 1000 with the function POWER for it to work. but Im not smart enough to do that. i downloaded the free app and decompiled it hoping to find A line of code that says look at key 116 for slide to wake but i have yet to see something like that. my theory is that if we change what it looks for in the app and then manually add that into ( system/usr/blah blah ) it should work. Sounds good to me at least. what do you think?
Bumpity bump bump! Someone must know!
^
Sent from my Galaxy Nexus using Tapatalk 2
This may turn into a rom option in the future.
[Very interested]
Sent from my Galaxy Nexus using xda premium
Ive been trying to make my home button function the same as the power button. First I made a nandroid and rebooted andthen went here--> System/usr/keylayout/generic.kl and changedkey# whatever-said-home to say POWER. rebooted and it didn't work, it worked just like normal. Then I went back and changed every key that said home to power anywhere in the keylayout directories and still, it works like normal! Any advice or knowledge to help me solve this puzzle?
Thanks!
Sent from my Kangadore 64
I'm on an aokp build BTW and I tried the button remapping app as well. Stubborn button =
Sent from my Kangadore 64
Well for starters, did you reboot?
There should be a thread in one of the US variants forums that tells you about the key layouts.
Theres also an app that will give you info on what button you just pushed.
Been a while so cant remember the name and dont know if itll be compatible, but maybe someone else does and will chime in.
Sent from my SGH-T999 using xda app-developers app
I've rebooted with every change. I tried theapp that tells you what button you pushed but it doesn't show what the power or home buttons key in as, its in the FAQ of the app I don't know what the issue is, I can change other buttons around but this one refuses to cooperate.
Sent from my Kangadore 64
mrtoast said:
I've rebooted with every change. I tried theapp that tells you what button you pushed but it doesn't show what the power or home buttons key in as, its in the FAQ of the app I don't know what the issue is, I can change other buttons around but this one refuses to cooperate.
Sent from my Kangadore 64
Click to expand...
Click to collapse
You have to edit the sec-keys.kl file to whatever you want then reboot. Generic.kl only takes effect if sec-keys.kl isn't there. So edit sec-keys.kl then reboot and you should be golden
Sent from my Galaxy Nexus using Tapatalk 2
@OP....
Got a better idea. Download apex launcher, and download screen off and lock.....
Open apex settings, behavior settings, home button...
Have it launch screen off and lock when pressed. Your phone will now turn off when you press the home button from your home screen.
Viola
@elesbb That worked like a champ! Thank you very much
Sent from my Kangadore 64
mrtoast said:
@elesbb That worked like a champ! Thank you very much
Sent from my Kangadore 64
Click to expand...
Click to collapse
Could you be specific as to what you changed exactly. I am also interested in this...... Thanks!
mrtoast said:
@elesbb That worked like a champ! Thank you very much
Sent from my Kangadore 64
Click to expand...
Click to collapse
Glad it worked!
dls5375 said:
Could you be specific as to what you changed exactly. I am also interested in this...... Thanks!
Click to expand...
Click to collapse
all they did was change what function the home button does. Look at a few posts up to see the file they changed and it's quite self explanatory, you will see a list of four buttons and their default assignments. Then you can either disable one by putting a # in front of the entire line or change them to say make the home function as a camera button.
Sent from my SGH-T999 using Tapatalk 2
elesbb said:
Glad it worked!
all they did was change what function the home button does. Look at a few posts up to see the file they changed and it's quite self explanatory, you will see a list of four buttons and their default assignments. Then you can either disable one by putting a # in front of the entire line or change them to say make the home function as a camera button.
Sent from my SGH-T999 using Tapatalk 2
Click to expand...
Click to collapse
OK, I got it....just change HOME to POWER and reboot....thanks
dls5375 said:
OK, I got it....just change HOME to POWER and reboot....thanks
Click to expand...
Click to collapse
No problem. Let us know if you run into any issues!