Hello
Since some of you guys asked about this , well there you go:
if you look inside the keyboard driver with a good disassembler (IDA Pro) you would see that you can create these link files :
Long_PTT.lnk (push to talk button+long press)
Long_End.lnk (the read key+long press)
Long_Send.lnk (the green key+long press)
Short_PTT.lnk (push to talk button)
Long_Power.lnk (Power button +long press)
Short_Power.lnk (Power button)
So basically all you need is to create these link files and put them in to windows folder. You can assign these keys to any shortcut you want
I attached one of my favorite short cuts unzip the file then put it in to your windows folder. then press Send Key for about 2 to 3 second to run the shortcut. It will bring up the wifi networks.
Have fun.
Hma4
ps:for assigning EndKey to HTC EndKey look here:
http://forum.xda-developers.com/showthread.php?t=356192
This is just great! Hats off! Now Endkey makes some sense to me...
This has to be the best trick found since I got my Tilt. THANK YOU!!!
Mine is setup as follows:
Long Send - Comm Manager
Long End - Invoke S2U2
Short PTT - PocketPlus4 Alt+Tab Switcher
Long PTT - Voice Command
I did the PTT button mappings with PP4's button enhancement instead of the lnk files mentioned above. But the other 2, which until now, have not been useable for long presses, so THANK YOU again.
While poking around in the keyboard driver, did you see a way to assign a shortcut to sliding the keyboard out? I think a HTC Action-type app for the Kaiser is not a bad idea.
Surur
ok, I feel really dense, how do you assign the keys? I don't see them listed under buttons after copying the lnk file to my \windows directory. Can this only be done when cooking a ROM? What am I missing? (I did a soft reset after the copy)
Edvard_Greig said:
ok, I feel really dense, how do you assign the keys? I don't see them listed under buttons after copying the lnk file to my \windows directory. Can this only be done when cooking a ROM? What am I missing? (I did a soft reset after the copy)
Click to expand...
Click to collapse
they won't show up there. Just try the button after you copy the lnk file to windows directory.
What I did was find the shortcuts that I want to use for the send and end button. Copy those shortcuts and rename them to the above names. Then move the shortcut into windows directory. it worked right away, no reboot needed.
Ah got it! Thanks!
OMG this is so awsome! Thank you!!
I already have the PTT button reprogrammed using the registry hack listed elsewhere. I think I will leave those as is and use this method after the next hard reset.
Dam this is realy good findings you just keep amazing me hma4 now I have to but the endkey back into my rom
Great Catch!
Thanks,
Nadavi
Would this also work with a touch dual?
Thanks
Thanks for this... this is nice.
J273 said:
Would this also work with a touch dual?
Thanks
Click to expand...
Click to collapse
it can't hurt to try, just try the Send Long shortcut, it works immediately without reboot.
How on earth do you find the shortcut codes to put in the file?
TSoma said:
How on earth do you find the shortcut codes to put in the file?
Click to expand...
Click to collapse
It's very simple ! just find a short cut from your windows folder , say AudioManager.lnk for example .. then copy it to your PC .. open a notepad , drag and drop the file to notepad , then edit the address inside the file and save it (pick one of those names i mentioned on the first post) then copy it to your windows folder and you are done !
Are there any long press hacks for the other 4 hard keys (<OK>, <Start>, etc)?
Solution using mortscript
hma4 said:
Hello
Since some of you guys asked about this , well there you go:
if you look inside the keyboard driver with a good disassembler (IDA Pro) you would see that you can create these link files :
Long_PTT.lnk (push to talk button+long press)
Long_End.lnk (the read key+long press)
Long_Send.lnk (the green key+long press)
Short_PTT.lnk (push to talk button)
Long_Power.lnk (Power button +long press)
Short_Power.lnl (Power button)
So basically all you need is to create these link files and put them in to windows folder. You can assign these keys to any shortcut you want
I attached one of my favorite short cuts unzip the file then put it in to your windows folder. then press Send Key for about 2 to 3 second to run the shortcut. It will bring up the wifi networks.
Have fun.
Hma4
ps:for assigning EndKey to HTC EndKey look here:
http://forum.xda-developers.com/showthread.php?t=356192
Click to expand...
Click to collapse
I have created small script that you can use to assigned and remove buttons using Mortscript. In order for it to work please download mortscript 4.1.0 from this website >> install it >> download attached zip and unzip in any folder of your choice and then doubleclick on that file in your device. Currntly it only work for lnk files but i will add exe file later on.
where is this attachment?
galenmd said:
Are there any long press hacks for the other 4 hard keys (<OK>, <Start>, etc)?
Click to expand...
Click to collapse
those have to be done thru registry or by use of an app like Pocket Plus 4. I know there are probably some free ones out there, but PP4 is what I use.
Thank you!!!
Any chance a Long_End.lnk can be devised that opens Wireless Manager?
I've got a little executable task switcher called AltTab that works like its name. It just cycles through the open apps/windows.
However, it didn't come with an installer and I guess this is the reason why it doesn't appear in the list when I try to assign it a button from the control panel.
Where does the Buttons panel/applet get its program list from? The registry? Which entries will I need?
take a look at this thread. i guess there are more threads regarding task swtching. just do some search
That's the thread where I found the app. This thread is not about task switching.
The problem is that the button manager in settings doesn't show the program or have a browse function. So how do I add an app without an installer to the list?
Thanks anyway.
i believe for a program to apear in list of options for button assignment it needs to be
a) a installed program
b) have a shortcut pointing to the program placed in the windows/programs folder.
since option 1 is not viable give option 2 a shot. read about this a while ago so i can be wrong.
thesire said:
i believe for a program to apear in list of options for button assignment it needs to be
a) a installed program
b) have a shortcut pointing to the program placed in the windows/programs folder.
since option 1 is not viable give option 2 a shot. read about this a while ago so i can be wrong.
Click to expand...
Click to collapse
I had pondered both of those possibilities, but a) would have required I (learn how to) make an install package and I forgot to follow up on b), but it would completely explain way there are *.lnk files for virtually every program that already exists in the Windows folder (I mean why the redundancy if keeping the Windows folder as small as possible is one of the prime factors in speedier start-up and maintaining a speedy system?)
Note:
I just tried both a shortcut and the actual executable in the windows directory, and even after a soft reset, no results.
i just don't understand. do you have problem with this program only or with button mapping in general?
did you try this:
antihrist said:
extract exe file to your device, create shortcut in start menu and then assign it to some hardware key
Click to expand...
Click to collapse
meaning:
i extracted exe file in "\Windows" folder. then i created shortcut to that file in "\Windows\Start Menu\Programs". after that i got the program in the list for button assignment.
OK, that worked.
Placing a shortcut in "\Windows\Start Menu\Programs\" does make it appear in he list of programs when assigning functions to buttons.
Thank you for your response and assistance.
KwikEMap
Version 0.2 (Beta)
To Use
======
* Install the KwikEMap.CAB on your device. (Do NOT install it on a Storage Card)
* Execute KwikEMap.exe, it will run in the background and your key mappings will be in effect. It uses about 35KB of memory and less than .5% of your CPU (while keys are being pressed only).
* Add a shortcut to KwikEMap.exe to \Windows\StartUp if you'd like the app to run each time your phone boots.
* If you execute KwikEMap.exe while it is already running, the KwikEMap Window will appear. From there, you can HIDE the application again, or QUIT and restore all key mappings to normal.
* There is also a "Show Window" keyboard shortcut you can use to open the KwikEMap window. By default, it is FN+PERIOD.
Default Key Mappings
=====================
These all can be changed in the KwikEMap.cfg file. See "Important Note", below, regarding the first 4 mappings.
Code:
FUZE Key Maps To Notes
------------- ---------- ---------------------
CALENDAR CTRL see "Important Note", below
CONTACTS TAB see "Important Note", below
EMAIL HOME see "Important Note", below
INTERNET END see "Important Note", below
SHIFT+BACK ESC
QUESTION MARK CTRL Makes a nice right CTRL key, for pressing CTRL-X, etc.
SHIFT+PERIOD ? Since we no longer have a question mark due to prev. map
FN+PERIOD KwikEMap Shows KwikEMap Window
You can use modifiers with this mappings and use multiple combinations. For example, you can press CTRL+HOME, or SHIFT-TAB.
Important Note Regarding CALENDAR, CONTACTS, EMAIL, INTERNET
=============================================================
To use these keys, you must configure the FUZE so that the normal functions of those keys are disabled. Some ROMS (Da_G's, NATF, RSW, etc) let you do this via the Buttons setting. If your ROM doesn't, this must be done by placing "null" shortcuts in specific locations. (thanks to Da_G for this information)
There is a shortcut in Program Files\KwikEMap\ called "NoButton.lnk". The shortcut basically does nothing. Simply copy this shortcut to the locations indicated to effectively disable the normal function of any of the 4 keys you'd like to use:
Code:
To Disable Copy "NoButton.lnk" as:
------------ ----------------------
CALENDAR \Windows\Start Menu\Calendar.lnk
CONTACTS \Windows\AppButtons\Contacts.lnk
EMAIL \Windows\Short_Messaging.lnk
INTERNET \Windows\Start Menu\Programs\Media Net Home.lnk
Notes:
1) To hide the start menu location links so they don't appear in the Start Menu, simply edit the files' properties and mark it as "Hidden".
2) Future versions of this app will copy these shortcuts automatically.
3) Even if those shortcuts do not currently exist on your phone, you still can (and must) disable the normal function of those keys by creating the "NoButton.lnk" shortcuts as specified if you wish to map them.
Setting up your own Mappings
============================
* See the KwikEMap.cfg file for full information and examples.
* While the KwikEMap window is open, you can press various keys and KwikEMap will show you the corresponding Key Codes and any modifiers used. You can use this to assist in setting up your own key mappings.
* The order you list the mappings matters; the first one found is what gets used. So, if you want to map WIN as CTRL, but keep WIN+PERIOD as the normal Windows Key, list WIN->CTRL first, then list CTRL+PERIOD->WIN next, and it will work. (This is because WIN has already been re-mapped to CTRL)
* The app should be smart enough to avoid cycles, so you can swap two keys. For example, you should be able to map A to B, and then also B to A, without any problems.
* Note that the FUZE's keyboard is odd; you will see that when you press the Question Mark key, for example, it actually is registering as "SHIFT+/" even though you are not pressing the SHIFT key! Keep this in mind as you set up your custom mappings.
* For now, you must QUIT and re-start the app to re-read the mappings from the .cfg file.
* A full list of Windows Mobile key codes can be found here:
http://msdn.microsoft.com/en-us/library/bb431750.aspx
Notes Regarding Specific Keys
=============================
* The WINDOWS key now should be fully mapable; i.e., it makes a good CTRL key.
* The CAPS LOCK key is partially mapable (i.e., you can map it to TAB), but there are two issues:
1) It still toggles the caps state, even when mapped
2) It never stays registered as pressed, so you cannot use it as a modifier-type key (i.e., CTRL)
* You can use the FN key as a modifier (i.e., map FN+C to CTRL+C to "cut"), but only if that key doesn't already have a FN modifier built-in. So, feel free to map a whole bunch keys like FN+A, FN+C,FN+B, etc, to whatever you want! (some examples are below)
Other Mapping Examples
======================
Use the WINDOWS key as a CTRL key, but still map WINDOWS-PERIOD to the old windows key:
5B=+00 (WIN -> CTRL)
+BE=5B (CTRL+PERIOD -> WIN)
Use CAPS LOCK as a TAB:
14=09
Use FN+A, FN+X, FN+C, FN+V for Select All, Cut, Copy, Paste, respectively:
#41=+41 (FN+A -> CTRL+A, Select All)
#58=+58 (FN+X -> CTRL+X, Cut)
#43=+43 (FN+C -> CTRL+C, Copy)
#56=+56 (FN+V -> CTRL+V, Paste)
Use WIN-UP as HOME, WIN-DOWN as END
&26=24 (WIN+UP -> HOME)
&27=23 (WIN+DOWN -> END)
=======================================
Have Fun! If all goes wrong, just soft-reset.
How does it work?
Can you tell me how this works? I'm an experienced software dev, but new to Windows Mobile programming.
Hi -- I am in the same boat as you; experienced developer, but very new to windows mobile and very rusty with C++. So, I may not be the best to learn from! but, at the core of things, we use a windows "hook" to grab keyboard messages before they are processed.
More info here:
http://msdn.microsoft.com/en-us/library/ms644990(VS.85).aspx
Hope that helps. I will also post my source code eventually.
Just try it but not working
MSG = warning Couldn't install hook... terminating
have any sugestion?
jsmith8858 said:
Here's a very simple key re-mapping app, Kwik-E-Map. Please try to forget my terrible, hacky first attempt, FuzeKeys, and don't hold that against me!
You can pretty much re-map anything except the HOME key at this point. This isn't a "hotkey" app launcher or anything fancy, just something simple to put CTRL and TAB keys on your FUZE, things like that.
Here's the scoop:
1) unzip the two files to a folder somewhere on your phone
2) run KwikEMap.exe.
That's it! It runs in the background, and currently maps the following:
CALENDAR --> CTRL
CONTACTS --> TAB
MESSAGING --> HOME
INTERNET --> END
? -- > CTRL (i.e., a nice Right-CTRL, to press CTRL-A, CTRL-Z, etc)
SHIFT-PERIOD --> ? (since we lost the ? key)
SHIFT-BACKSPACE --> ESC
4) In addition, pressing FN-PERIOD will bring up the "Kwik-E-Map" window, where you can close the application or test out some key presses to view key codes. (this key is re-mappable, see below)
It runs in the background, put a shortcut to it in your start-up if you like. It uses about 35K and I have not seen the CPU usage go above .5% (and that's when pressing all kinds of keys really quickly to see how high we can get it go!)
Don't like those key mappings? want to add more? See the key mappings in the KwikEMap.txt file. All of the info you need is there.
Final notes:
1) You can map the CAPS LOCK key to, say, TAB, but I cannot figure out how to not get it to affect the CAPS LOCK state. In other words, go ahead and map CAPS LOCK as TAB, it will work, but it will toggle capitals each time you press it. Also, CAPS LOCK always registers an "UP" event as soon as you press it, so it won't work well if you need to hold it down; e.g., to use it as a CTRL mapping.
2) You can map the windows key, but it still makes the start menu appear. You CAN map the windows key to "00" (see the .txt file) which will effectively disable the windows key normal operation (such as the start menu appearing) for any un-mapped keystrokes.
3) the order of mappings in the config file matters. If you map the "A" key to one thing, and then SHIFT-A to another, you'll never get the SHIFT-A mapping unless you list that one first.
4) to use the CALENDAR, INTERNET, etc, mappings, you need a ROM that let's you use the Buttons settings to map those keys, and map them to "Do Nothing". (most of the roms here have this feature added, I believe)
5) If you change the .txt mappings, you must stop and re-start the app.
6) If you re-execute the KwikEmap.exe file, the app's window will appear, allowing you to shut it down if you like.
7) A list of windows mobile key codes can be found here.
Everything is still in alpha test mode. The Fuze keyboard is funky, so there's no telling what will work and what won't, or what side effects you might encounter. USE AT YOUR OWN RISK. (However, the worst-case scenario is that you need to do a soft-reset to get back to normal).
Please let me know how it goes. It can and will be made more efficient, eventually, perhaps a better UI at some point, a CAB installer, etc.
Click to expand...
Click to collapse
I really think this app as potential but all i really want to to remap the the internet key to CTRL and it seems to work but it will also open the file.... example if i want to copy over pictures from a folder but the files are not next to each other i press the internet button and it will let me select three different pictures but will open them also so how do i get around that. hope i explained it correctly. thanks
irus said:
I really think this app as potential but all i really want to to remap the the internet key to CTRL and it seems to work but it will also open the file.... example if i want to copy over pictures from a folder but the files are not next to each other i press the internet button and it will let me select three different pictures but will open them also so how do i get around that. hope i explained it correctly. thanks
Click to expand...
Click to collapse
see "note #4" in my post. (which you quoted)
If you can't map those keys using the Buttons settings, then the easiest way is to map the "?" key as CTRL, and then simply map SHIFT-PERIOD (or something like that) to the Question mark. I don't think an extra keystroke for a question mark is a big deal if it gets you a nice CTRL key.
EDIT: I just re-read your post more carefully. I actually have no idea what you are asking.
jsmith8858 said:
Hi -- I am in the same boat as you; experienced developer, but very new to windows mobile and very rusty with C++. So, I may not be the best to learn from! but, at the core of things, we use a windows "hook" to grab keyboard messages before they are processed.
More info here:
http://msdn.microsoft.com/en-us/library/ms644990(VS.85).aspx
Hope that helps. I will also post my source code eventually.
Click to expand...
Click to collapse
Thanks, yes that helps. You may want to Google "Windows Mobile services.exe" - you can make this app run as a service so there isn't a window hanging around.
jsmith8858 said:
see "note #4" in my post. (which you quoted)
If you can't map those keys using the Buttons settings, then the easiest way is to map the "?" key as CTRL, and then simply map SHIFT-PERIOD (or something like that) to the Question mark. I don't think an extra keystroke for a question mark is a big deal if it gets you a nice CTRL key.
EDIT: I just re-read your post more carefully. I actually have no idea what you are asking.
Click to expand...
Click to collapse
sorry i will try to give a better example below
file1
file2
file3
file4
file5
so lets say im in total commander and i want to copy file 1, file 3, file 5 to a different directory. so i press and hold the internet button(which i have remapped as CTRL) and tap on file 1 which opens the document so i close out of the document and tap on file 3, so now file 1 and file 3 are highlighted(selected) so file 3 opens and i close out of file 3 and tap on file 5 which opens file 5 which i close out of and now i am in total commander with 3 files selected i can now tap & hold and select copy and it will copy. but i want to select the files with out them opening. i know i can change the options to double tap in total commander and that would fix the problem but i was just wondering if there might be another way. thanks hope this is better
irus said:
i know i can change the options to double tap in total commander and that would fix the problem but i was just wondering if there might be another way. thanks hope this is better
Click to expand...
Click to collapse
I think you gave yourself your own answer. I can't really give you Total Command support here in this thread, I have no idea. I just map the keys, I don't control how applications respond to them!
vizmaster said:
Just try it but not working
MSG = warning Couldn't install hook... terminating
have any sugestion?
Click to expand...
Click to collapse
hmmm, interesting. Are you using a Fuze or some other device? What ROM? Any info you can provide would be useful.
mhumphrey said:
Thanks, yes that helps. You may want to Google "Windows Mobile services.exe" - you can make this app run as a service so there isn't a window hanging around.
Click to expand...
Click to collapse
Absolutely. An item on the "to-do" list.
jsmith8858 said:
hmmm, interesting. Are you using a Fuze or some other device? What ROM? Any info you can provide would be useful.
Click to expand...
Click to collapse
I'M using a touch pro for Telus ROM 1.03.661 date 10/14/08
I tried a hard reset before still no luck
Doesn't seem to work for me. When I start the program, no window appears, and the key maps don't work, except for FN-period, which opens the window...
I'm using Rogers_Fuze_Rom_v2_2009_02_19 by digitalextremes, which is essentially RUU_Raphael_HTC_WWE_5.05.405.1_R_Radio_Signed_Raphael_52.58.25.30_1.11.25.01_Ship
I have a Fuze.
efrant said:
Doesn't seem to work for me. When I start the program, no window appears, and the key maps don't work, except for FN-period, which opens the window...
I'm using Rogers_Fuze_Rom_v2_2009_02_19 by digitalextremes, which is essentially RUU_Raphael_HTC_WWE_5.05.405.1_R_Radio_Signed_Raphael_52.58.25.30_1.11.25.01_Ship
I have a Fuze.
Click to expand...
Click to collapse
No window appears when the app starts.
Are you sure your key mappings are not working? Nothing really seems to happen for most of them, since they are keys like HOME, END, CTRL, etc -- you'd need an app open that uses those keys to see the effect.
For example, open up Word, and tell me what happens when you press the "?" key on your keyboard. Or, give me specific examples of what you tried, what you expected to happen, and what did happen instead. That info makes things much easier to troubleshoot rather than just saying things "don't work".
jsmith8858 said:
No window appears when the app starts.
Are you sure your key mappings are not working? Nothing really seems to happen for most of them, since they are keys like HOME, END, CTRL, etc -- you'd need an app open that uses those keys to see the effect.
For example, open up Word, and tell me what happens when you press the "?" key on your keyboard.
Click to expand...
Click to collapse
I'll give you an example: I open Outlook and create a new message. I then open your app via File Explorer. I click on it again and see the window (just to make sure it is open). I then type something in the body of the message, and highlight it. I push "Calendar"+B to bold it, but my calendar opens up...
efrant said:
I'll give you an example: I open Outlook and create a new message. I then open your app via File Explorer. I click on it again and see the window (just to make sure it is open). I then type something in the body of the message, and highlight it. I push "Calendar"+B to bold it, but my calendar opens up...
Click to expand...
Click to collapse
It runs in the background! It is designed to be used while the window is hidden. The app's keymappings are suspended when the window is open so it can show off the key codes and in case you have errors/problems with the mappings. Simply don't show the app's window (click HIDE if it is open already) and the key mappings should take effect.
EDIT: Also, as mentioned in the initial post, you cannot use the Calendar, Internet, etc, keys unless your ROM let's you map those keys to "None", otherwise the normal button action still occurs. So, you'd need to use ? for CTRL in that case, or define your own mappings using other keys.
jsmith8858 said:
It runs in the background! It is designed to be used while the window is hidden. The app's keymappings are suspended when the window is open so it can show off the key codes and in case you have errors/problems with the mappings. Simply don't show the app's window (click HIDE if it is open already) and the key mappings should take effect.
Click to expand...
Click to collapse
Sorry, my previous post should read as follows:
"I'll give you an example: I open Outlook and create a new message. I then open your app via File Explorer. I click on it again and see the window (just to make sure it is open). I then click on HIDE. I then type something in the body of the message, and highlight it. I push "Calendar"+B to bold it, but my calendar opens up...
efrant said:
Sorry, my previous post should read as follows:
"I'll give you an example: I open Outlook and create a new message. I then open your app via File Explorer. I click on it again and see the window (just to make sure it is open). I then click on HIDE. I then type something in the body of the message, and highlight it. I push "Calendar"+B to bold it, but my calendar opens up...
Click to expand...
Click to collapse
See the EDIT in my previous post. And, tell me what happens when you press ? (question mark) plus "B". That should do what you want. (Assuming Outlook supports CTRL+B = bold)
A good one to test that's pretty universal is CTRL-A to select All. (i.e., works in File Explorer, Word, any text control, etc)
jsmith8858 said:
See the EDIT in my previous post. And, tell me what happens when you press ? (question mark) plus "B". That should do what you want. (Assuming Outlook supports CTRL+B = bold)
A good one to test that's pretty universal is CTRL-A to select All. (i.e., works in File Explorer, Word, any text control, etc)
Click to expand...
Click to collapse
Yes, CTRL is maped correctly to the ?-key. So it actually does work. My mistake. Except for the calendar, contacts, internet, etc. keys.
It's too bad that my ROM doesn't support mapping those keys to NONE. Is this something a chef can cook in?
efrant said:
It's too bad that my ROM doesn't support mapping those keys to NONE. Is this something a chef can cook in?
Click to expand...
Click to collapse
Yeah, it must be cooked in as far as I know, drivers and system files need to be replaced or updated as far as I know. NotATreoFan's ROM and I think Da_G's have this feature. I am trying to see if I can figure out a way around this, but no luck so far. I am going to see if I can "hook into" messages sent to the Keypad.dll and figure out if that works.