It sounds wonderful. Will it be a dll, which can be used from AHK, or from pure C programs?I'll deliver an updated library/driver with new samples

keyboard filter

I tried following C Codes;
But, it made Error messages, such as
""...bufferoverflowk.lib(gs_support.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function [email protected]""
VOID KbFilter_ServiceCallback( IN PDEVICE_OBJECT DeviceObject, IN PKEYBOARD_INPUT_DATA InputDataStart, IN PKEYBOARD_INPUT_DATA InputDataEnd, IN OUT PULONG InputDataConsumed ) { PDEVICE_EXTENSION devExt; switch (InputDataStart->MakeCode) { case 0x01C: // Return Keypad Enter InputDataStart->MakeCode = 0x054; break; case 0x01D: // Left Control Right Control InputDataStart->MakeCode = 0x055; break; case 0x02A: // Left Shift ????? InputDataStart->MakeCode = 0x059; break; case 0x035: // /? Keypad / InputDataStart->MakeCode = 0x05A; break; case 0x036: // Not sure Right Shift InputDataStart->MakeCode = 0x079; break; case 0x037: // Keypad * Print Screen InputDataStart->MakeCode = 0x06D; break; case 0x038: // Left Alt Right Alt InputDataStart->MakeCode = 0x062; break; case 0x047: // Keypad 7 Home InputDataStart->MakeCode = 0x063; break; case 0x048: // Keypad 8 Up InputDataStart->MakeCode = 0x06C; break; case 0x049: // Keypad 9 Page Up InputDataStart->MakeCode = 0x06E; break; case 0x04B: // Keypad 4 Left InputDataStart->MakeCode = 0x06F; break; case 0x04D: // Keypad 6 Right InputDataStart->MakeCode = 0x070; break; case 0x04F: // Keypad 1 End InputDataStart->MakeCode = 0x074; break; case 0x050: // Keypad 2 Down InputDataStart->MakeCode = 0x075; break; case 0x051: // Keypad 3 Page Down InputDataStart->MakeCode = 0x076; break; case 0x052: // Keypad 0 Insert InputDataStart->MakeCode = 0x077; break; case 0x053: // Keypad . Delete InputDataStart->MakeCode = 0x078; break; } devExt = (PDEVICE_EXTENSION) DeviceObject->DeviceExtension; (*(PSERVICE_CALLBACK_ROUTINE) devExt->UpperConnectData.ClassService)( devExt->UpperConnectData.ClassDeviceObject, InputDataStart, InputDataEnd, InputDataConsumed); }
Unfortunately I am not at all expert in this area.
So, for the first time in my life time I downloaded WDK and tried to 'build -ceZ' stuffs..
The result is disastrous..
My intention was like this.
To Use additional PS/2 keyboard with full scan code under my control.
Which means that any of the keyboard scan codes should not the same one with main keyboard scan codes.
The final goal is to use additional USB keyboard with the same purpose.

It sounds wonderful. Will it be a dll, which can be used from AHK, or from pure C programs?I'll deliver an updated library/driver with new samples
There's already a library that can be used from any .net language on my site, it uses the driver I've built. Go there, there's a sample right now, I'll post more and update the library with new functionality.


Humm..., have you read the topic in which you are?Yorick, Maybe the best use of AHK was to write a prototype of a functional part of a large program, test it, tune its user interface, and then re-write it in a compiled language, like C. This does not work with static libraries, only with dll's. Also, if your really nice library was going to be used as part of another program, the need for installing low-level drivers in the client machine not pleasant. Is there any chance to do similar things without messing with the setup of the PC's of the users?
Another thing is that I'm not planning to do anything to join my driver/library with AutoHotkey, given that it's just an alternative that requires driver installation.

Can you help me out ? I am a prince in distress.
I know the codes above are silly one, but it was what I can do best.
I used all the same file in C:\WinDDK\6001.18002\src\input\kbfiltr except the .c file (it is just patch work of others).
I posted this agony to some expert group websites in my country, nooobody was interested in.
Is it too hard to get there ? or they thought it is just waste of time to play with beginner ? I do not know.
Can you please make .sys file for me ? I guess that is all I need.
Many thanks.

Dear, Yorick !
Can you help me out ? I am a prince in distress.
I know the codes above are silly one, but it was what I can do best.
I used all the same file in C:\WinDDK\6001.18002\src\input\kbfiltr except the .c file (it is just patch work of others).
I posted this agony to some expert group websites in my country, nooobody was interested in.
Is it too hard to get there ? or they thought it is just waste of time to play with beginner ? I do not know.
Can you please make .sys file for me ? I guess that is all I need.
Many thanks.
Alas poor Hamlet, I know you.

Humm, if you are a beginner in programming in general I do not recommend starting with drivers, but if you know C and want to start with drivers it's ok. I recommend first trying to build the driver from WDK and see if it worked. If so just do little modifications on the driver. You can send me a mail to solve any doubt or you may use the drivers I've already built. See yah.

As far as I know, I need 6 files to complete building process.
kbfiltr.c (the only file I modified, I already posted in this article.)
kbfiltr.h
kbfiltr.inf
kbfiltr.rc
makefile
sources
Last 5 files are the same original ones in C:\WinDDK\6001.18002\src\input\kbfiltr directory.
I had error messages while "build"ing the kbfiltr.c file with WDK program-->
...\bufferoverflowk.lib(gs_support.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function [email protected]
...\objchk_wlh_x86\i386\kbfiltr.sys : error LNK1120: 1 unresolved externals
I am sorry, but I think there is nothing I can do any farther.
Pls help me. I feel like bounded in a nut shell.
Thanks.


Your advice was great one. Thanks Yorick !
I should have used all the contents in original kbfiltr.c file.
I used very small portion of that file and modified it and deleted all the rests. I was wrong.
As soon as I saw Your advice, I made new one.
Which has all the original contents and some of my own codes too.
Build it nicely.
It worked perfectly !!
Thanks again Yorick, I am pretty sure, you are born again !!!
And I have to try it out with two USB keyboards.
Umm......
Bye..

Thanks, Yorick !! (for Building process)
Thanks, joelhewitt !! (for DVORAK codes)
Thanks, GeomanNL !! (for Extention scan codes and this posting itself)
It works with USB Keyboards too.
And you do not have to re-boot your computer,
if you want original one, you just roll-back or update it.
(with PS/2, you have to re-boot.)
It looks like it distinguish every USB port.
I am using 32bit Vista, so someone who read this post have to make codes for 64bit version.. Sorry, It is out of my ability. hahaha....
Bye, guys...


The only thing is that soon I'll update the site with a new library that is much better and post more basic samples.
See ya.


What flags would I need to use while building the file? I am using a core 2 duo, and vista 64. Should I be compiling for amd64, or ia64 ?

please i can“t find one on the net :-(
