[Q][DEV]Remapping G button to action? - LG Optimus Black

Hi guys.
I have a question. How (if it's even possible) can i assign any action to G buttonn. For example: i want to record voice thru Easy audio recorder free, just by pressing the G button, and then stop recording by pressing it again, just like with the widget. Please help, cause it's werry important for me. Thanks.
Edit: now i noticed there is similar thread, but not for specific action, only for camera or screen on/off.
Send from LG-P970 via Tapatalk 2

the related file is located at /system/usr/keylayout/TWL4030_Keypad.kl
it's the "key 95"
I don't know extended cmds (for launching external apps etc...), so my help will over here

Well...
Ilko said:
the related file is located at /system/usr/keylayout/TWL4030_Keypad.kl
it's the "key 95"
I don't know extended cmds (for launching external apps etc...), so my help will over here
Click to expand...
Click to collapse
Well yes, that's what i knew. It was in the other giudes and threads. I've alredy done it. But the point is, how to tell android that he have to do this and then do this...
This is question for devs, cause i dont know if it's even possible. But maybe, when a look at the lines, there are (IMO) in some of them multiple commands like
Code:
key 259 TESTMODE_UNLOCK WAKE
It's also at vole buttons, they have thiers volume functions and also wake functions (if it's enabled in system settings i think)...
I'll take a look at this and tell u what i found
Edit: Well, i found this guide -> How to Remap Hardkey Actions || Custom App Launching
Down there is some idea that should be tested, it's good for start. But (if i got it right) this metod need compiling from source, and that is over my abillities :/ ... now. Is here someone who can test it? it will b nice make this work
Sorry for my bad english

Related

Reassign the side OK button on Tilt?

Hi,
I've successfully re-mapped the PTT button by following the instructions from this forum. I imagine the same procedure would apply to the small OK button immediately below the jog-wheel, but I don't know where to start. Of course, the button is not present in the Settings/Buttons applet - that would have been too easy.
First, how to disassociate it from its present function (Start Menu/OK)? And once disassociated, what is the button code to enter in the registry?
I tried aebplus, and it sort of works - but the start menu still comes up on the first keypress if invoked in the Today screen.
Any ideas on how to re-map this otherwise useless key?
Thanks,
Mike.
mpd said:
Hi,
I've successfully re-mapped the PTT button by following the instructions from this forum. I imagine the same procedure would apply to the small OK button immediately below the jog-wheel, but I don't know where to start. Of course, the button is not present in the Settings/Buttons applet - that would have been too easy.
First, how to disassociate it from its present function (Start Menu/OK)? And once disassociated, what is the button code to enter in the registry?
I tried aebplus, and it sort of works - but the start menu still comes up on the first keypress if invoked in the Today screen.
Any ideas on how to re-map this otherwise useless key?
Thanks,
Mike.
Click to expand...
Click to collapse
yes, i would like to find this out as well because i have PTT assigned to comm manager and voice recorder but now i need one toggle between vibe and ring...would be nice to use this ok button i thing its pretty useless since there is anothe ok button on the front...TIA...
me too!
I also need to change the side "ok" button. Anybody have a solution?
Hello! Care if I do a quick search FOR YOU since you do not want to?
http://forum.xda-developers.com/showthread.php?t=277639
http://forum.xda-developers.com/showthread.php?t=286658
http://forum.xda-developers.com/showthread.php?t=274644
http://forum.xda-developers.com/showthread.php?t=336438
You sound like a jerk for posting that I did not search when the reply prior to mine was 6 months ago.
Did you even read the thread? None of the links you posted had instructions/advice on how to remap the side "ok" button.
grizzley said:
Hello! Care if I do a quick search FOR YOU since you do not want to?
http://forum.xda-developers.com/showthread.php?t=277639
http://forum.xda-developers.com/showthread.php?t=286658
http://forum.xda-developers.com/showthread.php?t=274644
http://forum.xda-developers.com/showthread.php?t=336438
Click to expand...
Click to collapse
yes i was about to say. non of them have steps or even telling you anything related to how to get it.
all it says is people trying it matter and they failed.
if there was no solutiion you should have just said no solution, it would have saved you time searching all that and also us bashing you
the 4th link does have some good information, lemme just quote from it
Bellfazar said:
The side "ok" button is a tough one because it has multiple functions. In programs, explorer windows, and settings it acts as an OK button but when you're at the today screen it acts as a Start Menu button. I kinda get the feeling we're not going to be able to change this for a while. Not until someone releases a keymapper specifically for the Kaiser.
Click to expand...
Click to collapse
strikeIII said:
even with the 8525 nobody has been able to re-map the ok button...it's still the biggest mystery, hehe....but now that they eliminated one button on the Tilt we really do need the ability to remap the ok button now...
Click to expand...
Click to collapse
Deathace said:
I have the side OK button remapped in spb pocket plus v4 under the buttons menu in settings and the only thing you have to do is take focus off the start menu then it works as expected.
Russ
Click to expand...
Click to collapse
It's really easy with help of AE Button Plus.
You can pretty much map any hardware key on your device with this great app.
I have it setup to be able to copy and paste by using the sliding keyboard and pressing Window Key + C to copy and Window Key + V to paste among other cool shortcuts.
Cheers!
RayanMX
Rayan said:
It's really easy with help of AE Button Plus.
You can pretty much map any hardware key on your device with this great app.
I have it setup to be able to copy and paste by using the sliding keyboard and pressing Window Key + C to copy and Window Key + V to paste among other cool shortcuts.
Cheers!
RayanMX
Click to expand...
Click to collapse
Thanks Rayan. I downloaded the AE Button Plus program for my AT&T Tilt, and it is working fantastic for remapping buttons. I was able to remap the side OK button to lock my phone by holding it for a few seconds. I love the way it also lets you leave the button with its default setting for one press, but create other actions for multiple presses.
By the way, the phone locking works fantastic. It allows me to answer calls, but doesn't activate any of the other phone functions until I unlock the phone. That's perfect for carrying the phone in my pocket. Also, incoming notifications don't unlock the phone, so that I won't accidentally turn-on a bunch of applications while the phone is in my pocket. The unlocking action is very simple.
I've also mapped volume up and down to a long press of the soft keys. That alleviates the need to use the stylus to select the volume button. Great.
The AE Button Plus program was what I've needed all along to customize my phone. It would've saved me a lot of time.
One other note, I downloaded the 2.6.3 version of the program, rather than the freeware version, but I haven't gotten any info on the cost. I may be disappointed in the near future if this program automatically deactivates. Do you know if I should expect a disappointment? I would pay for this program, but I'm not sure how much it's worth to me, but I saw no information on the cost. Do you know?
AFAIK there is only one version, if you want the registered version you buy a license and there's a procedure to activate it, otherwise it uses the free version with a couple features disabled and a nagscreen once in a while.

Idea for a Useful App - Anything like it?

I was curious if there is an app that will, upon pressing and holding a key such as the PTT key or end key, would subsequently end all running tasks, lock the phone, and put it in standby.
If there is such an app would anyone care to enlighten me? If not, I think there may be a market for such a thing. I could be wrong, I've been wrong before and I'm sure I'll do it again soon.
I tried searching xda with google and the xda search and didn't get lucky. Sorry otherwise.
I must confess that would be very useful. Not being a programmer i don't know if its possible or not. Any ideas anyone??
I have not come across such a function and all I have been looking for is a utility that will allow another button to put my tilt into standby (I find it a little difficult feeling the power button w/o looking)!
perhaps we should ask WAKU (creator of wktask) to see if he can import that excellent software into buttons. He has all functions available thru wktask such as closeall/suspend and he can add lock easily. he hasn't updated as frequently anymore perhaps more people should donate
Ill email him, to see if hes willing to do it!
I, too, have asked about this type of functionality. I'd love to hit the power button or the PTT button and have it close all apps (except for those in an exception list) and put the phone in standby.
The last time I asked about this the best reply was someone suggesting that perhaps a mortscript could be written to do it. I never looked further into it.
its possible, but i have never maked programs for ppc =/.. if someone has an idea, or if it is like c/c++ i can..
I use the excellent and free AE Button Plus.
I have a triple press of the ok button place the phone in standby.
(I have a double press of the ok button launch S2U2 to lock the phone and turn off the display but leave the GPS running)
pjam
Its definitely possible. All the individual components have already been done: You can remap the PTT button, , some 3rd party task managers have "end all" features, and software like S2U2 can easily lock your phone. Perhaps you could rig some sort of script to run them all, or find someone to program up a less jerry-rigged version. I don't think that the app would be all that popular, maybe the script is the best way to go.
I am fairly certain I can do this with an action sender & using one of the keyboard driver shortcuts (Short_Power.lnk). I will have a go at compiling a small actions send proggie & seeing if I can compile the kill arguments into it. I can definitely get you into suspend or stand-by, it's the killing of everything else that getting me. So far I can't get both functions into the same key press.
ekw said:
perhaps we should ask WAKU (creator of wktask) to see if he can import that excellent software into buttons. He has all functions available thru wktask such as closeall/suspend and he can add lock easily. he hasn't updated as frequently anymore perhaps more people should donate
Ill email him, to see if hes willing to do it!
Click to expand...
Click to collapse
The latest wKTask is pretty recent...as of 1/9/2008. here is the link:
http://soft.photoracer.net/docs/wktask_en.html

lost my camera button

I know i need to use the search button and i did. installed igo8 gps software and now i lost the camera button. I press the camera button and the gps software comes up. i looked into the "buttons setting" and it won't call up there to assign it back to camera. read somewhere to link the camera.exe from windows, but i can't figure out how to *.lnk a file. any help will be appreciated!!
I got the same problem, and also iGO8 ! So you narrowed it down to that causing the button to disappear? Hmmmm, by me the button does absolutely nothing! Hope someone knows how to solve this problem....
Keep me posted!
We must be asking a question that absolutely no one here on XDA can answer!!!! Have me managed to baffle their minds???
on my kaiser (details in my signature) button 5 has the camera assigned to it.
Does Camera show up more than 1 time in Settings -> Buttons? If so, try them all until one sticks.
You can also edit the registry to point Button 5 back to the camera. I don't have the keys in front of me, but if nobody posts them before I get home, I will.
NotATreoFan said:
Does Camera show up more than 1 time in Settings -> Buttons? If so, try them all until one sticks.
You can also edit the registry to point Button 5 back to the camera. I don't have the keys in front of me, but if nobody posts them before I get home, I will.
Click to expand...
Click to collapse
Hi:
I too am having this problem. I have searched and searched, but can't find the settings for button 5. When I look at reg it seems to be pointing to GPS (I too use iGo). Correct camera settings would REALLY be appreciated.
Thanks!
EDIT: Nevermind. Even though settings...buttons doesn't show button 5 (instead it says GPS), If I map GPS (in buttons) to camera that seemed to work.

Rewrite button driver

I was wondering, would it be feasible to rewrite the button driver to customize the X1 buttons? I mean even higher level than a key hook. Key hooks are annoying because they interfere with other apps that want to set key hooks. Hot keys are useful, but another application can come along and steal your hotkey. I want to modify the X1 buttons at a much higher level.
One thing for instance about the panel button i have always wanted to know. The panel manager sends out button code 0x00EA. Even if this event is suppressed by a key hook, the panel manager still opens. So I wonder what part of the OS is responsible for this? Is there a button driver dll that can be overwritten? Is the button driver built into the OEMXipKernel (but possibly overwrite-able at the ROM cooking level)?
Basically I want to know if it is possible to rewrite the button driver that actually detects the hardware interrupts from the keyboard/buttons and sends key press events to the OS. Does anyone know if this is possible? People have rewritten/modified things such as the battery and even display drivers. Is this in the same category?
yes there is keboard dll
keypad.dll it "supports" panel manager button, ok, arrows & everything else...
if U could write something like thi, it would be great... i think... I'm maniac of very useful Xperia buttons (there is no other device like sex1, which has so many buttons on front panel... ! it's just great !)
giving users possibility to bind actions (win lock, new process, win key, esc, ok, OK/Close, back, home, etc... to any ! button would be great !), swapping, changing them, different actions for different screens ... GREAT !! I can see !!
I was thinking long time ago about doing such of thing but has no idea how to modify existing keypad.dll (no such great programmer skills) or create new one but in "low level type" ... (interfacing hardware ? :/ noooo idea... ! )
If You'd like my help i could create advanced GUI Configurator of program...
cichy3000 said:
yes there is keboard dll
keypad.dll it "supports" panel manager button, ok, arrows & everything else...
if U could write something like thi, it would be great... i think... I'm maniac of very useful Xperia buttons (there is no other device like sex1, which has so many buttons on front panel... ! it's just great !)
giving users possibility to bind actions (win lock, new process, win key, esc, ok, OK/Close, back, home, etc... to any ! button would be great !), swapping, changing them, different actions for different screens ... GREAT !! I can see !!
I was thinking long time ago about doing such of thing but has no idea how to modify existing keypad.dll (no such great programmer skills) or create new one but in "low level type" ... (interfacing hardware ? :/ noooo idea... ! )
If You'd like my help i could create advanced GUI Configurator of program...
Click to expand...
Click to collapse
Yes it really annoys me that manufacturers dont like to let you modify buttons anymore. I wrote X1BC to modify the buttons but I am tired of higher level methods of trapping keys. I want to go straight to the source.
Let me start taking a look at keypad.dll. I see in my ROM kitchen that it exists as a file (not a module) in OEM drivers. I want to see what the effect of cooking a ROM without it is. Also I will look at references to it in the registry and try to examine dll exports (going to google for software to do this; any free PE analyzers?).
So keypad.dll imports coredll.dll and ossvcs.dll. It exports KBD_Close, KBD_Deinit, KBD_IOControl, KBD_Init, KBD_Open, KBD_PowerDown, and KBD_PowerUp. I dont know what parameters those functions should take though. I want to write a keypad.dll and replace the old one to see when these functions are called.
Found this:
http://read.pudn.com/downloads120/sourcecode/embed/511498/HID/CLIENTS/KBDHID/kbd.cpp__.htm
i cross my fingers... thats sounds great... maybe you can little inspire from X2 keyboard layout maybe dll...
Well.. I dont have an X2 to test that with. :-/
Before I can start experimenting with overwriting the keyboard driver, I need to know how to properly sign drivers. I know that without being signed properly a driver will cause the device not to boot. Can someone tell me how I sign my home cooked driver?
*edit*
Well, keypad.dll doesnt seem to be the low level *driver*. Its just a service. Found this by searching keypad.dll into my kitchen:
Code:
[HKEY_LOCAL_MACHINE\Services\Keypad]
"Prefix"="KBD"
"Dll"="keypad.dll"
"Index"=dword:1
"Order"=dword:15
"Flags"=dword:00010000 ; DEVFLAGS_TRUSTEDCALLERONLY
"DisableKeyLight"=dword:0
"DisableGhostKeyDetect"=dword:0
"ActionDebounceTimeout"=dword:64 ; 100ms
So perhaps my dll doesnt need to signed. I dont even need to replace the old dll. Just point it to my own dll. I just changed "Dll"= to something else and rebooted. Device boots just fine but now the buttons do nothing. Good sign .
some time ago I've accidentally replaced HTC Diamond keypad.dll with Xperia's one (well... i didn't know that with cab that I made, was included keypad.dll didn't notice that ) ... the only issue that came after this change was "no keyboard effect", after I installed one more time the dll but with the right one... the issue gone ...
Just as interesting for what's new? Sorry for my curiosity ... Thank you
I have only done basic experimentation so far. First changed keypad.dll to something else in the registry (something that didnt exist) and as expected the buttons stopped working. I have written a dll to replace it that exports the same functions and made it log every time a function is called. I get attached to many processes and receive some calls to KBD_Init and KBD_IOControl. Nothing in particular corresponds with when a button is pushed yet, but that is probably because I need to respond to KBD_Init by initializing the keyboard. Have not been able to work on it for a while but hopefully I will next week, as I am on winter break from school. Thanks for your interest!
Jon
so we have (via Dependency Walker ):
KBD_Close
KBD_Deinit
KBD_IOControl
KBD_Init
KBD_Open
KBD_PowerDown
KBD_PowerUp
and we don't know how to use them (what arguments to use)... so what can we do with it ? guessing parameters ?
cichy3000 said:
so we have (via Dependency Walker ):
KBD_Close
KBD_Deinit
KBD_IOControl
KBD_Init
KBD_Open
KBD_PowerDown
KBD_PowerUp
and we don't know how to use them (what arguments to use)... so what can we do with it ? guessing parameters ?
Click to expand...
Click to collapse
Look at the link in post 5. Hopefully they are the same. What I am going to do next when I have time is understand that code.
So it looks like those are just the standard exported functions necessary for a service dll. The real meat of what the dll does probably has nothing to do with them. What I need to know is how to recieve keypress info from the keyboard driver and how to inject key events into the OS. Can I just use keybd_event funtion to send key events?..
Looks like I found an answer to that. From MSDN:
http://msdn.microsoft.com/en-us/library/ms646304(VS.85).aspx
The keybd_event function synthesizes a keystroke. The system can use such a synthesized keystroke to generate a WM_KEYUP or WM_KEYDOWN message. The keyboard driver's interrupt handler calls the keybd_event function.
Is keypad.dll the interrupt handler? Or is that something else? It must be. Because if I kill the keypad service no button events get through. I dont see how missing that service would kill the keybd_event function. Off to experiment.
If keybd_event proves to be the correct way to send key events the last question is how to receive interrupts from the keyboard.
I have learned loads over the past day. I Now fully understand the role of keypad.dll it must register to receive the interrupt and use keybd_event to sent keys to the OS. Through disassembly of keypad.dll I have also learned that this role is not simple. This dll has a LOT of code. I dont think I will be able to reproduce everything it does.
I have a new idea however. All I need to do is intercept calls from keypad.dll and decide what to really send and call keybd_event myself. I still achieve the goal of catching key events before 3rd party apps. I can think of two ways to achieve this. One would be to patch keypad.dll to call my own routine instead of keybd_event. Another would by to leave the stock keypad.dll and hook the keybd_event API at runtime. While I have learned loads at how to disassemble dlls and read the assembly, I do not yet know how to modify the import table. On the flipside I do not fully know how to hook APIs. Any help? I would like to go the modify import table route as this seems infinitely simpler.
keyboard driver successfully hooked.
The most reliable button reprogrammer is under way.
Program in private beta.
http://forum.xda-developers.com/showthread.php?p=5272353

[REF][REQ]How to Remap Hardkey(button) Actions

Our Blackstone has always suffered from the fate of an UGLY sister... from not getting official WM 6.5 to Lack of Hardware windows button. i decided to start this thread so that we can find out some way to Remap Hardware Button (HOME) to Windows start......
For the 2 years i had my Blackstone i know that i hardly used this button so it would be nice to remap it to Windows button.... also we can have the added feature of removing the Start button from bottom of screen and have more HTC HD mini like sense 2.5 look for those of us who use WM 6.5.5......
Any help into this matter would be greatly appreciated.... and on other forms ppl have remaped hardware buttons like this one .... for HERO
http://forum.xda-developers.com/showthread.php?t=695936
Actually, the home button is not a hardware key. Its a part of the touchscreen. Only hardware keys are VOL up/down (pwr, rst also)
hink this is possibke
as stated the post above it isnt a real hardwarekey so its arranged by manilladesktop.dll i believe
im writing this from my phone sso cant check if its the right dll name
if its a dll you can rewrite the dll to point to start instead of home
miniterror said:
hink this is possibke
as stated the post above it isnt a real hardwarekey so its arranged by manilladesktop.dll i believe
im writing this from my phone sso cant check if its the right dll name
if its a dll you can rewrite the dll to point to start instead of home
Click to expand...
Click to collapse
ohhh that would be great chris..... i would be really gald if you can help me out... take ur time... when u have access to your pc... check if you can do something about it....
i'd be interested in the results of this...
i'd like to use the BACK key for manual rotate, and use the PICKUP button as default voice calling.
currently im using the PICKUP key for manual rotate, since this is the only button available to remap it's long-press function.
well i took a quick look but it isnt something i can arrange for you
all kind of strange numbers and stuff in there that i cant read
i still think it should be possible though if someone with more knowladge of dll files and writing them comes in help
miniterror said:
well i took a quick look but it isnt something i can arrange for you
all kind of strange numbers and stuff in there that i cant read
i still think it should be possible though if someone with more knowladge of dll files and writing them comes in help
Click to expand...
Click to collapse
well how about u ask someone like johndoe on ur thread chris..... last i remember his field of study was computers......
veehexx said:
i'd be interested in the results of this...
i'd like to use the BACK key for manual rotate, and use the PICKUP button as default voice calling.
currently im using the PICKUP key for manual rotate, since this is the only button available to remap it's long-press function.
Click to expand...
Click to collapse
yes we we once learn the art of remapping hardware keys there will be infinite possibilites to what we assign the buttons to do....

Categories

Resources