An SOCD script recreated using AHK built to simulate hardware SOCD via AutoHotkey v2
NAI is a personal concept/identity created by Ncoder and is not a registered trademark or company.
An AutoHotkey v2 script that implements SOCD (Simultaneous Opposite Cardinal Direction) cleaning for keyboard input.
Designed to provide consistent and predictable movement behavior in games and applications that rely on directional input.
- SOCD input resolution (hardware-style behavior)
- Unified and split-lane input routing
- Snap-Tap style input prioritization
- Absolute Priority Mode
- Four override resolution algorithms
- Neutralize Mode and Legacy compatibility mode
- Crash watchdog and auto-recovery
- RAM state persistence
- SafeMode vs Unchained Mode
- Engine overclock pipeline
- Input rate-limit protection
- Real-time WASD HUD
- Physical vs Logical input layers
- Latency profiler with sub-millisecond precision
- Adjustable latency overlay
- ULTRA debug HUD mode
- Gradient RGB OSD
- Ncoder Mode (experimental UI behavior)
- Drag-and-drop HUD positioning
- Integrated crash testing lab
- Multiple crash simulation types
- Crash history logging and rotation
- Windows 10/11
- AutoHotkey v2.x
Download AutoHotkey v2 from:
https://www.autohotkey.com/
- Get a release from https://github.com/Ncoder-official/Snaptivity/releases
- Unzip the zip file
- Run
Compiled\Snaptivity.ziporSnaptivity.ahkbased on your needs - The script will create a
configfolder, insideSnaptivity.iniand aCorefolder - Comply with the on-screen instructions to set the script ready (first time only)
- Press the SOCD key to toggle and the menu key to open the settings menu
This app is unsigned, so Windows may (I literally can't get it to show it so it's an actual may like ACTUAL MAY I tried downloading through internet still may) show a blue “Protected your PC” screen. Click More info → Run anyway. The source code is available and clean. You can compile the ahk script itself if you don't trust the exe.
This script resolves opposite directional inputs such as:
| Input | Output |
|---|---|
| A + D | Neutral / priority-based resolution |
| W + S | Neutral / priority-based resolution |
(Exact behavior depends on your configured mode.)
Use this for:
- Fighting games
- Grid-based movement games
- Competitive keyboard input testing
- Custom control systems
Do NOT use this script in competitive online games such as:
- Valorant
- CS:GO / CS2
These games may consider SOCD behavior as unauthorized input modification.
The triple-character input issue has been fully fixed in the default input system.
SOCD-AHK now correctly processes directional key events without causing duplicated or multiplied characters while typing.
In normal mode:
- Textboxes and typing fields work as expected
- Only single characters are produced
- No more input cloning, no more keyboard chaos
However…
A Legacy Input Mode toggle is available for compatibility and testing purposes.
When Legacy Input Mode is enabled:
- The old input behavior is restored partially
- Directional key handling follows the original system
- Typing in textboxes may produce triple characters instead of the original double characters
This is intentional.
Legacy mode exists for:
- Backward compatibility
- Debugging
- Testing previous SOCD logic
- Summoning the ancient bugs (optional) 🐉⌨️
If you see triple characters:
You are not experiencing a bug.
You have activated Legacy Input Mode.
Switch back to normal mode to return to stable, single-character typing.
The SOCD-AHK script includes a built-in control panel that allows full configuration of all SOCD behavior in real time.
All changes are saved automatically when the window is closed.
Sets the main hotkey that enables or disables the SOCD system.
This key controls whether the script is actively modifying input.
Sets the hotkey used to open the SOCD Control Panel.
Allows quick access to settings without restarting the script.
Allows repositioning and resizing of the WASD HUD overlay.
Useful for:
- Debugging
- Screen recording
- Personal layout preference
Disables Windows tray notifications generated by the script.
Recommended for:
- Recording
- Testing
- Reduced distraction
- Not being "the guy that queued 50000 traytips and cant open the tray to disable the script"
Reduces input lag by capturing physical keys for SOCD detection instead of logically checking IsDown
- TRULY-SNAPPY: Enables
EngineOverclock()alongside snappy mode to gain maximum performance trading stability - ON: More Arcade-style feel on input may introduce lag on Weak Single-Core CPUs try compiling script or disablind it
- OFF: More intent based detection system generally not recommended for pro play
Note: I was wrong Snappy Input mode has more effect than compiling it. But compiling on weaker hardware is still recommended.
Implements hardware-style SOCD locking behavior.
When enabled:
- Once a direction wins, the opposite direction is locked out
- The locked direction becomes active only after releasing and re-pressing
This closely mimics real SOCD hardware behavior.
Processes vertical (W/S) and horizontal (A/D) inputs independently.
When enabled:
- Vertical and horizontal lanes use separate SOCD resolvers
- Prevents interference between movement axes
- Improves consistency in grid-based and 3D movement systems
| W | ||
| A | S | D |
Displays a visual overlay showing:
- Raw key inputs
- Active SOCD state
- Final resolved direction
Useful for:
- Debugging
- Validation
- Demonstrations
It now has modes try it and also figure out an easter egg I know you can.
Click to reveal easter egg
Press W, A, S and D at the same time!
Override Mode controls how the script resolves opposite directions when both are pressed.
Instead of neutralizing or locking, it overrides one input with another based on a defined rule.
Think of it as “which key gets authority when conflict happens.”
This mode is designed to simulate different SOCD behaviors found in real hardware controllers.
The most recently pressed direction becomes the active output.
Behavior:
- Press
A, then pressD→ output becomesD - Press
D, then pressA→ output becomesA - Releasing the active key returns control to the still-held opposite key
- Releasing both keys returns to neutral
Use cases:
- Modern fighting controllers
- Fast, responsive movement
- Natural-feeling direction changes
The first pressed direction remains active until it is released.
Behavior:
- Press
A, then pressD→ output staysA Dis ignored whileAis held- When
Ais released,Dbecomes active (if still held)
Use cases:
- Older SOCD implementations
- More stable directional control
- Prevents rapid flipping
Disables the input and neutralizes current keys state until repressed
Behavior:
- Press
A, then pressD→ output neutralizes and becomes nothing - Releasing
D→Ais still not active - Releasing both
DandAwill reset the function
Always favours a set key over the other. Unique and Customizable of all the modes so far.
Behavior: (Assuming A is the set key)
- Press
A, then pressD→Ais active andDgets neutralized - Releasing
D→Ais unchanged and still active - Releasing
Awill makeDactive
The Advanced Menu exposes low-level engine switches that directly affect how Snaptivity processes input internally.
This is not for normal usage. These options exist for testing, debugging, stress experiments, and engine behavior research.
If the main menu is “user mode”, the Advanced Menu is developer mode.
Entering this menu means:
- Safety systems can be bypassed
- Engine stability can drop
- Input behavior can become unpredictable
- Crashes are no longer “bugs”, they are expected results
Use with awareness. Use with intention. Use with chaos. 🧠💀
Enables the old physical input routing pipeline.
Behavior:
- Physical keyboard input is no longer fully blocked
- The engine partially loses authority over key flow
- Typing may produce triple characters
- Input desync is possible
- SOCD logic becomes less deterministic
Purpose:
- Backward compatibility
- Debugging legacy behavior
- Reproducing old bugs
- Testing unsafe pipelines
- Or chaos
This mode is intentionally unstable.
Enables real-time measurement of Snaptivity’s internal execution latency.
When enabled:
- Each Send operation is timed using high-resolution (
QPC_Now) counters - A latency HUD appears under the WASD overlay
- You can see:
- Last execution time
- Average execution time
- Number of samples
Purpose:
- Measure real engine performance
- Compare Normal vs Snappy vs Truly Snappy
- Detect spikes and instability
This measures engine latency, not network or game latency.
SafeMode enables the engine’s protection systems.
When enabled:
- Input burst limits are active
- Crash watchdog is active
- RAM state saving is enabled
- Auto-restart on crash is enabled
- Rate limiting prevents runaway Send storms
- Unstable with many inputs for now
This is the default and future recommended mode. consider turning it off if you see StuckKeys that bypass checkstuck keys
Provides direct access to controlled crash types for testing engine recovery.
Available crash types include:
- Soft exception
- Hard process termination
- Infinite loop freeze
- Stack overflow
- Memory exhaustion
- Invalid DLL calls
- Timer storms
- Self-destruct & respawn
Purpose:
- Validate watchdog behavior
- Test crash recovery
- Stress the restart pipeline
- Validate RAM state restoration
This is not a bug feature.
This is an engine validation system.
All settings are saved automatically when the control panel is closed.
All user-adjustable settings are stored in:
config\Snaptivity.ini
Restarting is not nessecary unless changing the ahk script itself
Note: This README is intentionally kept technical and minimal.
The author is significantly more chaotic in real life.
This project is licensed under the Snaptivity License.
See the LICENSE file for full terms.
Summary:
- Free to use, modify, and share
- Attribution required
- Commercial use is forbidden
This software is provided as is, without warranty of any kind.
Use at your own risk.
Created by Ncoder
2026



