KeyBridge Suite is a low-level remote typing automation toolkit for Windows. It bridges TCP network communication with low-level kernel input simulation using the Interception driver.
The system consists of two standalone components:
- Server Daemon (
sock2key): A background service that listens on TCP port8080, enumerates network interfaces, intercepts keyboard input via hardware scan codes, and executes automated keystroke injection. - Client GUI (
key2sock): A lightweight, native Win32 graphical application designed to connect to the server and transmit text payloads across the network.
- Kernel-Level Input Injection: Uses the Interception driver to inject hardware Set-1 Scan Codes directly into the OS input stream, bypassing standard
SendInputlimitations. - Hardware Hotkey Triggers: Start, stop, or resume typing tasks on-the-fly using configurable keyboard triggers (
ESCandRight Shiftby default). - Network Interface Enumeration: Automatically discovers and displays active IPv4 addresses (Ethernet, Wi-Fi, VPNs, Loopback) on startup using Windows IP Helper (
iphlpapi). - Resumable Typing Buffer: Tracks typed characters with an atomic cursor (
written_index), allowing the user to pause and resume long texts without restarting from the beginning. - Pure Win32 GUI: Minimal footprint client with zero external UI runtime dependencies and CLI support for specifying the server IP.
| Flag | Description |
|---|---|
--set-key |
Interactively capture and configure custom trigger keys for Start and Resume. |
--disable-key |
Prevents the configured trigger keys from being forwarded to the operating system when pressed. |
| Flag | Description |
|---|---|
--host ipaddress |
Server address (this can be VPN or LAN). |
- OS: Windows 10 / 11 (64-bit recommended)
- Compiler: MinGW-w64 (
g++with C++20 support) - Driver: Interception Driver installed on the server machine.
Ensure g++ is in your system PATH. Run the following commands from the root of the project:
g++ main.cpp ItServerSocket.cpp Logger.cpp -o server.exe -std=c++20 -L. -linterception -liphlpapi -lws2_32g++ client.cpp -o client.exe -std=c++20 -lws2_32 -lshell32 -mwindows(The -mwindows flag ensures no background console window appears when launching the GUI).
If the server terminates abruptly (e.g., via forced exit or unhandled thread termination), the C++ runtime raises:
terminate called without an active exception
Why this happens:
- The Interception driver hook remains attached to the operating system's input stream because
interception_destroy_context()was not reached during the unexpected shutdown. - While the crashed process is still releasing handles, or until the program is fully closed, physical keyboard keystrokes may be missed, swallowed, or misinterpreted.
Resolution:
- Ensure the server process is completely closed (check Task Manager for any lingering
server.exeinstances and kill them). - If the keyboard remains unresponsive or acts erratically, unplug and replug the keyboard, or restart the Interception driver service.
- Always shut down the server gracefully using
Ctrl + Cso the application can clean up the driver context properly.