Copyright © 1996 Mark Russinovich
Last Updated: July 9, 1997

Introduction

Ctrl2cap is a VxD that hooks the Windows 95 keyboard input handler so that it can change caps-locks into controls. The Microsoft Power Toy program, TweakUI, provides identical functionality, but I've gotten several requests for Windows 95 keyboard filtering source code.

Incidentally, this ctrl2cap program is part of the Gnu-Emacs for Windows 95 package, as well as the Kermit 95 communications package, so if you examine the source you'll see that there are provisions for swapping escape and accent-grave, as well as changing the behavior of print-screen. This additional functionality was required for Kermit 95, but is disabled by default. <²Hñ*t>

Installation and Use

Install Ctrl2cap by placing the following line in the [386enh] section of System.ini:

device=<path>\ctrl2cap.vxd

where <path> represents the directory where you have placed ctrl2cap. Reboot for it to complete the installation.

Building Ctrl2cap

Ctrl2cap requires only the Windows 95 DDK to build, since its written in assembly language.

How Ctrl2cap Works

Ctrlcap just hooks the keyboard input service, VKD_Filter_Keyboard_Input, which allows it to see all keyboard input before it is processed by Windows 95. This functionality allows a VxD to change, or hide keystrokes from Wnidows, and could be used to disable certain key sequences (eg. Alt-tab, ctrl-alt-del, etc.)

More Information

For more information on VxD hooks see:
  • "Examining VxD Service Hooking" by Mark Russinovich and Bryce Cogswell, Dr. Dobb's Journal, May 1996.
Download Ctrl2cap with source (15KB)



Back to Top