一款轻量、高效的 Windows 自动按键工具。
Sorahk is a Windows application for automating repetitive key press operations. It provides configurable input-to-output mappings with adjustable timing controls through a graphical interface. The application runs in the system tray and uses native Windows APIs for input detection and event simulation.
Platform Requirement: Windows 10 or later.
Main Interface
Main Window
Settings Dialog
Device Manager Dialog
Hid Activation DialogShow More Screenshots (4 additional)
Mouse Direction Dialog
Mouse Scroll Dialog
About Dialog
Close DialogMain Interface
Main Window
Settings Dialog
Device Manager Dialog
Hid Activation DialogShow More Screenshots (4 additional)
Device Activation Dialog 2
Settings Dialog 2
About Dialog
Close DialogDownload pre-built executables from the releases page:
sorahk-x.y.z-$target.zip - Standard build (compatible with all x86_64 CPUs)sorahk-avx2-x.y.z-$target.zip - AVX2-optimized build (Intel 2013+ / AMD 2015+ CPUs)Extract the archive and run sorahk.exe. The application will generate a default Config.toml on first launch.
Prerequisites:
Build commands:
# Clone repository
git clone https://github.com/llnut/Sorahk.git
cd Sorahk
# Standard build
cargo build --release
# AVX2-optimized build (requires AVX2 support)
# PowerShell:
$env:RUSTFLAGS="-C target-feature=+avx2"; cargo build --release
# CMD:
set RUSTFLAGS=-C target-feature=+avx2 && cargo build --release
# Auto-detect CPU features:
$env:RUSTFLAGS="-C target-cpu=native"; cargo build --release
# Output: target\release\sorahk.exeSorahk reads settings from Config.toml in the executable directory. The file is created automatically with default values on first run.
…Keyboard Keys:
A to Z0 to 9F1 to F24UP, DOWN, LEFT, RIGHT, HOME, END, PAGEUP, PAGEDOWNSPACE, RETURN, TAB, ESCAPE, BACKSPACE, DELETE, INSERTLSHIFT, RSHIFT, LCTRL, RCTRL, LALT, RALT, LWIN, RWINNUMPAD0 to NUMPAD9, MULTIPLY, ADD, SUBTRACT, DECIMAL, DIVIDESNAPSHOT, PAUSE, SCROLL, CAPITAL, NUMLOCKKey Combinations:
MODIFIER+KEY (e.g., LCTRL+C, LALT+RSHIFT+F1)Mouse:
LBUTTON, RBUTTON, MBUTTON, XBUTTON1, XBUTTON2MOUSE_UP, MOUSE_DOWN, MOUSE_LEFT, MOUSE_RIGHT, MOUSE_UP_LEFT, etc.SCROLL_UP, SCROLL_DOWNXInput Controllers:
GAMEPAD_VID_ButtonName (e.g., GAMEPAD_045E_A)A, B, X, Y, Start, Back, LB, RB, LT, RT, LS_Click, RS_ClickDPad_Up, DPad_Down, DPad_Left, DPad_RightLS_Up, LS_Down, RS_Left, RS_Right, etc.GAMEPAD_045E_LS_RightUp+ARaw Input Devices:
DEVICE_VID_PID_SERIAL_Bx.xSequence Triggers:
trigger_sequence = "Key1,Key2,Key3""DOWN,RIGHT,A")Sequence Targets:
target_keys = ["Key1", "Key2", "Key3"] with target_mode = 2For complete configuration documentation, see the example Config.toml generated on first run.
sorahk.exe to start the applicationConfig.tomlDELETE) to toggle operationWhen capturing input through the settings dialog:
Sorahk includes a test suite covering core functionality. Run tests with:
cargo testFor detailed testing information, see TESTING.md.
Sorahk has been benchmarked against AutoHotkey v2.0.19 using microsecond-precision measurements with a 5ms target interval (200 Hz). Tests were conducted using sorahk-perf-monitor, recording 1000 events per scenario.
Scenario Tool Avg Interval Rate Std Dev
Single Key (Same) A → A Sorahk v0.3.0 9.47 ms 105.55 Hz 6.69 ms
AutoHotkey v2.0.19 32.67 ms 30.61 Hz 8.21 ms
Single Key (Different) A → B Sorahk v0.3.0 12.90 ms 77.53 Hz 4.23 ms
AutoHotkey v2.0.19 32.23 ms 31.03 Hz 8.03 ms
Concurrent (3 Keys) A→1, B→2, C→3 Sorahk v0.3.0 15.63 ms 64.00 Hz 0.96 ms
AutoHotkey v2.0.19 49.13 ms 20.43 Hz 32.35 ms
Test Environment:
Bug reports and feature requests can be submitted through the issue tracker. Code contributions should follow Rust coding conventions and maintain compatibility with existing functionality.
MIT License - see the LICENSE file for details.
Built with:
暂无开放 Issues,或尚未同步最近议题。