Rockr90
Rockr90

Reputation: 35

How to modify Keyboard interrupt (under Windows XP) from a C++ Program?

Now, this solution will only work under old C DOS compilers. But what we intend to do is to make a close or similar solution to this by using any modern C/C++ compiler under Windows XP ! What i have first thought of is modifying the Keyboard ISR so that it masks the fifth bit of any entered character to turn it uppercase ! But i do not know how exactly to do this. Second, I wanted to create a Win32 console program to either do the same solution (but to no avail) or make a windows-compatible solution, still i do not know which functions to use ! Third I thought to make a windows program that modifies the ISR directly to suit my needs ! and i'm still looking for how to do this !

So please, If you could help me out on this, I would greatly appreciate it !

Thank you in advance !

(I'm using Windows XP on intel X86 with mingw-GCC compiler.)

Upvotes: 1

Views: 2856

Answers (2)

Hans Passant
Hans Passant

Reputation: 942050

How soon do you plan to graduate? Hopefully you'll have time, Windows doesn't work this way anymore. You'll need to write a keyboard filter driver using the WDK. It comes with a sample implementation in the src\input\kbfiltr directory. You can't use the tools you're familiar with, the WDK includes a compiler and a kernel debugger. Available at no cost, go here to get started.

Upvotes: 1

jmucchiello
jmucchiello

Reputation: 18984

You can't get access to the Keyboard ISR unless you write a Ring 0 device driver. You are better off investigating the Windows Hook APIs. These accomplish the same thing.

Start here: http://msdn.microsoft.com/en-us/library/ms644990%28v=VS.85%29.aspx

Upvotes: 2

Related Questions