Quote: Originally Posted by
god_of_cpu 
Heres the keyboard hook program I was talking about earlier. Its actually two programs a DLL that contains the hook and a tray application that uses it. The main program does not have any of the logic in it to replace the numbers input with letters, but all that you should have to do to is add that logic and clean up some of the code a bit and it will compile fine.
Right now all the program does is replace whatever key you pressed with a '0' when the scroll lock key is toggled on, when its not toggled on, the keyboard works normally.
The real magic to this program happens in the OnKeyPress function in TrayApp.cpp. To make this program work as a phone input thing, you woudl simply have to replace the line iNewKey = '0'; with the logic for whatever key should be output. Just set iNewKey = 0; if you don't want to return anything for a key press, but are simply just count it. The wParam parameter of the OnKeyPress function contains the virtual key code of key that was pressed and it should return the key that should be replaced. The extra logic in the function is to make sure that the same keycode is returned for the keyup and for the keydown messages.
I don't have time to write this program myself, but I will answer any questions about the code.
You could also use the Kbhook.DLL from visual basic. To use it from VB or any language, just call SetGetMsgHook(hWnd, 0,0); where hWnd is a handle to your window. Then just look for the message with the value of WM_USER + 1068 when you recieve this message, you should process it just like it is processed in the OnKeyPress function in TrayApp.cpp
You should also call KillGetMsgHook from the dll when the program exits.
Souce for the dll can be found under kbhook folder. Run TrayApp.exe to see the program run. Just type stuff and if numlock is on it will be a 0.
http://www.mp3car.com/vbulletin/atta...nekeyboard.zip
Still there God? Or did someone else do the work on the plate served by him? Maybe even with T9?
I downloaded the code and was quite ready to do it myself, but I could not open the project files. I've got VC++ and VB 6.0. Project file seems to have extension vcproj! Is this .NET or something?
As I said, I am quite happy to do the work if someone can help me get the IDE going.
This is exactly the thing I need. Then I can input text everywhere with my phone, or a numeric keyboard.
B-O