This page provides an introduction to keyboard scan codes and
explains how escaped scan codes work.
Scan Code Mapper for Windows
Windows 2000 and Windows XP include a new Scan Code Mapper, which
provides a method that allows for mapping of keyboard scan codes
without having to go through the “tedious process” of writing a
kernel-level filter driver that can sometimes lead to severe
problems if errors exist in the driver.