Skip to content

About

Microsoft-signed Windows keyboard and mouse kernel driver with the original Interception C SDK, legacy application compatibility, and a one-hour demo.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

Repository files navigation

Interception V2 - Windows Keyboard and Mouse Kernel Driver

Keyboard and mouse interception with the familiar oblitum/Interception C SDK. Capture an input, change it, and forward it to Windows using the original interception_* functions.

Interception V2 uses the keyboard/mouse input backend from Interceptor Keyboard & Mouse, with a kernel compatibility layer for the original SDK. The driver source is private; the original library and all seven sample projects are included here.

Demo: one hour per Windows boot, starting with the first successful context creation. Closing an application, reinstalling, or changing the clock does not renew this period. When it expires, interception and injection stop and physical input returns to passthrough. Restart Windows to start another demo period. For an unrestricted edition, contact titancsa on Discord.

Install

Windows 10 version 1709 or later and Windows 11, x64. Applications can be 32-bit or 64-bit. Supported sources are HID keyboard and mouse devices handled by the Interceptor keyboard/mouse backend, including compatible USB and Bluetooth HID devices. PS/2 and arbitrary vendor-specific input protocols are not covered.

Download Interception-V2.zip - Microsoft-signed driver, self-contained command line installer, x86/x64 SDK and all seven compiled sample programs with their source.

The kernel driver is signed by Microsoft Windows Hardware Compatibility Publisher. Test signing is not required.

  1. Uninstall the original Interception driver, or another Interceptor keyboard/mouse edition, and restart Windows. These editions must not share the same input devices or legacy endpoint names.

  2. Extract the Interception V2 ZIP and open Command Prompt as administrator.

  3. Run the familiar installer command:

    "command line installer\install-interception.exe" /install
  4. Restart Windows if requested. Run your application as administrator.

To uninstall:

"command line installer\install-interception.exe" /uninstall

Restart if requested to finish restoring Windows drivers and removing in-use packages. Running the installer without arguments displays its help. It refuses conflicting editions rather than overwriting their endpoints.

Use an existing application

Keep its original interception.dll. V2 implements the device endpoints and IOCTL data layout used by that DLL, including 32-bit applications on 64-bit Windows. Choose the DLL matching your application's architecture when building a new application.

The API, header, DLL filename and installer switches retain the original names. Device IDs are 1-10 for keyboards and 11-20 for mouse devices. Use interception_get_hardware_id() or the hardwareid sample to identify a source; do not assume an ID matches a particular USB port across boots.

Multiple contexts can use per-device filters and priorities. Higher precedence receives first; equal precedence follows context opening order. Forward with interception_send() to pass an input to the next matching context, then to Windows. Queues and context counts are bounded; applications must drain their queues promptly. Overflow revokes capture to restore input.

API compatibility does not guarantee compatibility with every existing application or device. Applications relying on undocumented original-driver behavior need their own validation. V2 also preserves an emergency escape: physical Ctrl+Alt+Delete revokes interception. The original cadstop sample is included for source continuity, but cannot suppress this escape in V2.

Receive, change, forward

#include "interception.h"

int main()
{
    auto context = interception_create_context();
    if (!context) return 1; // Install, elevate, and check the demo period.

    interception_set_filter(context, interception_is_keyboard,
                            INTERCEPTION_FILTER_KEY_ALL);

    InterceptionKeyStroke key{};
    while (auto device = interception_wait(context)) {
        if (interception_receive(context, device,
                reinterpret_cast<InterceptionStroke*>(&key), 1) != 1) break;

        if (key.code == 0x3A) key.code = 0x01; // Caps Lock -> Escape.
        if (interception_send(context, device,
                reinterpret_cast<const InterceptionStroke*>(&key), 1) != 1) break;
    }
    interception_destroy_context(context);
}

Link against the matching interception.lib and place interception.dll beside your EXE. Receiving removes inputs from your queue; forwarding sends them onward. An input you receive and do not forward is blocked. Always release the context when finished.

The unchanged original SDK has no V2-specific error or demo-status API. A failed context creation returns nullptr; send/receive return zero when unavailable. After expiry, a waiting context wakes so the application can leave its receive loop. Creating another context then requires a Windows restart.

Files and samples

Folder Contents
library/ Original interception.h, library implementation and resource/build files
library/x86/ and library/x64/ in the release ZIP Matching interception.dll and interception.lib
samples/ Original sample source projects and shared sample utilities
samples/x86/ and samples/x64/ in the release ZIP All seven compiled examples, with their matching DLL
tools/ Original WDK build helpers
licenses/ Original Interception license documents and V2 driver demo terms
command line installer/ in the release ZIP Self-contained install-interception.exe

The installer contains the signed keyboard/mouse packages, control endpoint and per-boot demo clock, plus its installation and recovery helpers. No separate driver files need to be copied or installed manually. The demo clock is a kernel-only component used to preserve the one-hour budget when the main driver reloads; it remains resident until Windows restarts. Setup restores Windows input drivers and removes its own packages during uninstall, finishing in-use cleanup after a restart when required.

Sample Demonstration
axes Mouse axis transformation
cadstop Original Ctrl+Alt+Delete sample; see V2 safety limitation above
caps2esc Remap Caps Lock to Escape
hardwareid Print hardware identifiers
identify Identify the keyboard or mouse producing input
mathpointer Generate mouse motion from mathematical curves
x2y Remap a keyboard key

Build the SDK and samples

Install Visual Studio 2022 with Desktop development with C++, the Windows SDK and CMake, then run:

.\Build.ps1

This builds x86 and x64 DLLs, import libraries and all seven examples into bin/SDK/. It does not compile or install a kernel driver. The original WDK 7.1 build files remain included; the added CMake build supports current Visual Studio.

Attribution and terms

The SDK, original samples and build tools are preserved from oblitum/Interception, commit 39eecbb. Their original copyrights and license documents remain in force. V2 is an independent project and is not endorsed by Francisco Lopes or Microsoft. Microsoft driver signing authenticates the package; it is not a promise of application compatibility.

The separately developed, closed-source V2 driver is a time-limited demo; see driver terms. These terms do not replace or expand rights to upstream Interception code. Commercial use of upstream assets must comply with their applicable license.

Use the software only on devices you own or are authorized to manage. It is provided as-is, without warranties, to the extent permitted by applicable law. You are responsible for your use; the authors do not authorize unlawful activity or accept responsibility for misuse. Keep a way to restart or recover the machine while testing input interception.

About

Microsoft-signed Windows keyboard and mouse kernel driver with the original Interception C SDK, legacy application compatibility, and a one-hour demo.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages