PDA

View Full Version : PIE button remapper (not home page way, no more opening PIE :) )


szilamer
24th March 2007, 10:29 PM
Hi,

I found it very annoying to always close PIE after changing home page to opera.exe.
I don't know if somebody has already done it,(haven't found anything with searching) so here it is :)
And I am planning to rewrite my PIE button-> Ctrl remapper to WM6 so this was a great practice.

This program patches the already loaded keybddr.dll in memory by writing HKLM\Software\KeybPatch, PIEButton(string) value to keybddr.dll at 0x17120D4 adress.

Install :
--------
1. unzip kbpatch.zip and copy kbpatch.exe to Universal's \Windows\Startup
directory

2. Open your favourite registry editor and make KeybPatch key under
HKLM\Software.

3. Make PIEButton string value under HKLM\Software\KeybPatch with the path and executable to your new PIE button program.
For example on my Universal:
PIEButton(string) = \Program Files\Opera\opera.exe
LImitation : the length of the string must be smaller 55.
kbpatch.exe will warn you if you exceed this limit.

4. start kbpatch.exe. If everything is okay, this won't show you any notification.

5. Press PIE button
Your favourite program should start instead of PIE :)


Update ( PIE button --> Ctrl reassign howto)
---------------------------------------------------

1. Follow the above steps to install kbpatch.exe until point 2.

2. unzip simkey.zip and copy simkey.exe to Universal's
\Windows\StartUp directory

3. Make a new string value under HKLM\Software\KeybPatch.
PIEButton(string) = \Windows\StartUp\simkeys.exe

4. Change PieHomePage value under HKLM\HARDWARE\OEM\KEYBD to
the string "Ctrl"

5. Tap on kbpatch.exe
Tap on simkeys.exe (You will never have to do this again )

6. Try your new Ctrl button :D
Ctrl is sticky of course.

You can also try piectrl.cab. Just install and soft reset.

You can change PIEButton later, but to accept changes, you have to do a soft reset.

Envelope button reassign is coming soon :)

shlomki
24th March 2007, 11:26 PM
COOL! thanx!

hmm, makes me wonder, maybe now there's a way we could take control over the PIE button to map it as ALT key? (with PQz)

szilamer
25th March 2007, 01:20 PM
COOL! thanx!

hmm, makes me wonder, maybe now there's a way we could take control over the PIE button to map it as ALT key? (with PQz)

Yes, It can be done.
The solution is very keybddr.dll dependant, but it's possible.
You can't do this with PQZ unless the author modify its code.

szilamer
25th March 2007, 10:19 PM
Okay, here is the source code :
( dedicated to g0dspeed , but I paste it here, so anybody who interested can see it )


int _tmain(int argc, _TCHAR* argv[])
{
WCHAR string[55];
WCHAR origstring[]=L"\\windows\\iexplore.exe";
HRESULT res;
if((res=RegistryGetString(HKEY_LOCAL_MACHINE,L"Software\\KeybPatch",L"PIEButton",string,54))==S_OK)
{
int size=wcslen(string);
string[size+1]=(WCHAR)L"\0";
DWORD *pointer = ((DWORD *)0x17120D4);
HINSTANCE hInst =LoadLibrary(L"keybddr.dll");
if(memcmp(pointer,origstring,21*2)==0)
{
DWORD oldProtect,old1;
VirtualProtect(pointer,size*2+1,PAGE_READWRITE,&oldProtect);
memcpy(pointer,string,size*2+1);
VirtualProtect(pointer,size*2+1,oldProtect,&old1);
}
else
{
MessageBox(NULL,L"I won't do anything :)\nYou are running this thingie on a wrong OS version or keybddr.dll is already patched.",L"Error",MB_OK);
}
FreeLibrary(hInst);
}
else
{
if(res==E_INSUFFICIENT_BUFFER)
MessageBox(NULL,L"Error copying registry string value to keybddr.dll\nThe string value is too long.(Max 49 chars)",L"Error",MB_OK);
else
MessageBox(NULL,L"Error copying registry string value to keybddr.dll\nMaybe the reg.value doesn't exists or type error occured.",L"Error",MB_OK);
}
return 0;
}

g0dspeed
25th March 2007, 11:45 PM
Okay, here is the source code :
( dedicated to g0dspeed , but I paste it here, so anybody who interested can see it )


thanks a lot.

I think if kbpatch.exe could find 'windows\iexplore.exe' (by itself) start from where keybddr.dll loaded address (in keybddr.dll's file size), it worked well in any environment.

I changed value 0x17120d4 -> 0x148135c and worked at WM5-Uni O2 1.30.162 cooked ROM.

#I have only EVC4 and couldn't build new executable file so I patched oridinal kbpatch.exe...

airya
26th March 2007, 05:56 PM
szilamer, Thanks.
Is it possible also to remap MessageCenter and OK button?

Now i have "Ctrl" key with kbpatch + PQz_KEY(http://www.nicque.com/PQz/PQz_KEY.htm)

Any possible to have "Alt" key and "ESC" key at the same time?
:)

kdskamal
26th March 2007, 08:00 PM
Yeah..count my request too for remapping the messaging button :)

szilamer
26th March 2007, 09:51 PM
thanks a lot.

I think if kbpatch.exe could find 'windows\iexplore.exe' (by itself) start from where keybddr.dll loaded address (in keybddr.dll's file size), it worked well in any environment.


That's a good idea. I think I will make it, maybe in next version :)




#I have only EVC4 and couldn't build new executable file so I patched oridinal kbpatch.exe...

Evc4 is not a problem, only you have to change RegistryGetString, I think.

szilamer
26th March 2007, 09:54 PM
szilamer, Thanks.
Is it possible also to remap MessageCenter and OK button?

Now i have "Ctrl" key with kbpatch + PQz_KEY(http://www.nicque.com/PQz/PQz_KEY.htm)

Any possible to have "Alt" key and "ESC" key at the same time?
:)


Hmm, can you write me exactly how did you call pqz_key ?
( what parameters, what's your PIEButton value ? )

I haven't heard about this version of Pqz before ..

szilamer
26th March 2007, 09:56 PM
Yeah..count my request too for remapping the messaging button :)


OK, messaging button is not a problem :)
I think I can make a new version at the end of this week.

szilamer
28th March 2007, 12:08 AM
szilamer, Thanks.
Is it possible also to remap MessageCenter and OK button?

Now i have "Ctrl" key with kbpatch + PQz_KEY(http://www.nicque.com/PQz/PQz_KEY.htm)

Any possible to have "Alt" key and "ESC" key at the same time?
:)

I've tried that pqz_keys but I think it's not good for this job.
You cannot make it to send a keyup message, so you will have a stuck ctrl button. Try simkey instead :)
Or do you know a trick for pqz_keys, that I don't know ? :)

grayme
28th March 2007, 02:46 PM
I've set the IE button up to Opera as instructed which works great thanks. :)

However, am I missing something in wishing that clicking a link in a message would open up Opera rather than PIE as it still does? :o

airya
28th March 2007, 06:28 PM
I've tried that pqz_keys but I think it's not good for this job.
You cannot make it to send a keyup message, so you will have a stuck ctrl button. Try simkey instead :)
Or do you know a trick for pqz_keys, that I don't know ? :)
Yes, I got same problem with "key up" after my post. :(
I never heard about "simkey", any link?

szilamer
28th March 2007, 07:12 PM
Yes, I got same problem with "key up" after my post. :(
I never heard about "simkey", any link?

Simkey is my program :)
You can download it from the first post.
It currently accepts two type of parameters: Ctrl and Alt.
( Compiled directly for this task :) )

szilamer
28th March 2007, 07:15 PM
However, am I missing something in wishing that clicking a link in a message would open up Opera rather than PIE as it still does? :o

I don't know a good answer for this. :(
Maybe I would try to modify file associations in the registry...

airya
29th March 2007, 03:27 AM
Simkey is my program :)
You can download it from the first post.
It currently accepts two type of parameters: Ctrl and Alt.
( Compiled directly for this task :) )
Cool! thanks.

tsoifun
29th March 2007, 11:43 AM
Done as per the instructions on first page with "kbpatch". No errors, warnings but PIE button does not work at all now. Tried to put both - way to LNK file of Opera and full route to opera.exe - same result. Neither Opera starts now nor PIE. Anu suggestions?

szilamer
29th March 2007, 12:54 PM
Done as per the instructions on first page with "kbpatch". No errors, warnings but PIE button does not work at all now. Tried to put both - way to LNK file of Opera and full route to opera.exe - same result. Neither Opera starts now nor PIE. Anu suggestions?


Which ROM do you have ? WM5 or WM6 ?

grayme
29th March 2007, 03:11 PM
I don't know a good answer for this. :(
Maybe I would try to modify file associations in the registry...

Glad it is not just me with this issue, any progress? :)

Bill Gates
30th March 2007, 01:13 PM
I won't do anything :)

:( :( :(

Jwjwr... WM6 ROM WWE 2.02

And I can't copy keybddr.dll to search "iexplore.exe" string in it cause it's locked!

Went to download "ROM kitchen" ...

yj
31st October 2007, 01:04 PM
it does not work on my devices: Orange SPV M5000, no error given by KeybPatch.exe but key does still launch PIE.
WM5, ROM 1.13.52 GER, radio 1.03.00, extRom 1.13.136 GER