Skip to content

cssvb94/MaurusX.Net

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MaurusX.Net

A .NET library and CLI for configuring the Genius/KYE Maurus X gaming mouse (USB VID_0458 / PID_014C) without needing the stock Windows-only DTCfg.exe/mousehid.exe tools installed.

The mouse works as a standard HID pointing device out of the box — no driver required. Separately, the stock Windows software talks to an undocumented vendor-defined HID interface to configure DPI, polling rate, and LED behavior. That protocol isn't published anywhere, so this project reverse-engineered it from live USB captures and by decompiling the stock mousehid.exe, and reimplements it directly.

Status: DPI, LED, polling rate confirmed working on real hardware

Verified by physically testing against real hardware: LED intensity/pulsation changes take effect correctly, DPI changes take effect correctly (confirmed via observable cursor-speed difference), and normal mouse clicking is unaffected. Lift-off distance is implemented from a confirmed wire format but this particular unit's firmware cleanly rejects it (fails with a Win32 error, not a corruption) — likely unsupported on this hardware/firmware revision.

An earlier version of this library caused mouse clicks to stop registering after any settings change, because it bundled every setting into one "commit" sequence that included command bytes belonging exclusively to the (unimplemented) button/macro-table write. That's fixed now — see Known limitations for what changed.

Still sensible precautions when testing:

  • Keep the original DTCfg.exe installed and reachable, in case of an unexpected issue with a setting not yet exercised.
  • mousehid.exe/trayicon.exe run continuously in the background by default and periodically resync their own cached state — for the most predictable testing, close them first (they'll relaunch themselves via Windows' normal mechanisms if needed).

What works

  • DPI stages — read/write all 8 stage slots per profile (enable flag + DPI value in 100dpi increments), with independent X/Y DPI support (matching the stock UI's "Enable X-Y DPI" option; defaults to mirroring X into Y when not specified). Stages 7-8 are always force-enabled by the firmware regardless of their toggle (confirmed from the decompiled code).
  • Sensitivity — a per-profile multiplier that rescales the DPI-stage table (effective_dpi = floor(dpi * sensitivity / 10)), matching the stock software's "Sensitivity" slider exactly (confirmed directly from its decompiled source).
  • Polling rate — global, 250/500/1000 Hz.
  • LED intensity & pulsation speed — per profile, 4-option enums each.
  • Lift-off distance — per profile, 5 levels; wire format confirmed from decompiled code even though no UI exposes it in this build. Not confirmed to work on all hardware (see Status above).

What doesn't work / isn't implemented

  • Button remapping and macros — not attempted. This is a separate, independent operation in the real app (confirmed via decompilation) involving a ~127-entry table write and multi-second EEPROM commit delays; it needs its own dedicated reverse-engineering pass. Deliberately never bundled with the settings above (see Known limitations).
  • LED color — the vendor config tool exposes intensity/pulsation but no color picker was found in this build's UI, so the color-setting wire format is unknown.
  • Angle snappingconfig.ini from the stock software has a field for this, but no UI control exposes it in this build and it hasn't been reverse-engineered.
  • Mouse Speed / Double-Click Speed / Scroll Speed — confirmed to be plain Windows OS settings (SystemParametersInfo), not sent to the mouse at all. Deliberately out of scope: this library only implements settings the mouse hardware itself understands.
  • Linux — not yet ported. The HID transport uses HidSharp, which supports Linux hidraw, but this hasn't been tested there, and the Windows-specific HidD_SetOutputReport P/Invoke workaround (for the DPI-table interface) will need a Linux equivalent.
  • Reading live settings from the device — every observed USB capture showed the stock software only ever writes to the mouse; it never reads settings back. This library does the same: status/GetProfile reflect the last state this tool wrote (persisted locally as JSON), not a live read of the hardware.

Known limitations

Earlier, this library sent every setting change as one bundled "commit profile" sequence, including command sub-ids 0x03/0x04/0x05. Decompiling the real mousehid.exe (see local working notes for the full investigation) showed those three sub-ids belong exclusively to the button/macro-table commit — 0x05 in particular triggers the device to expect an immediate ~123-entry table rewrite (very likely including left-click's function mapping), and if that rewrite never arrives, the button table is left in a broken state. That's what caused clicks to stop registering. The real app treats LED, DPI, and polling-rate changes as completely independent, lightweight operations, each with its own small delay pattern, and never touches 0x03/0x04/0x05 for any of them. This library now matches that structure exactly, and the failure mode is gone in testing.

Lift-off distance still lacks full confidence — it rejects cleanly on this test unit (see Status), so the wire format may only apply to a different hardware revision.

Usage

Running the CLI with no arguments (or with --help) prints full usage, including every subcommand and an example for each. Every subcommand also supports its own --help (e.g. set led --help), which lists all accepted values for enum-like switches (--intensity, --pulsation, the polling-rate argument) and an example line for each switch.

dotnet run --project src/MaurusX.Cli -- list-devices
dotnet run --project src/MaurusX.Cli -- status
dotnet run --project src/MaurusX.Cli -- status --profile 1
dotnet run --project src/MaurusX.Cli -- set dpi --profile 1 --stage 1 --dpi 1600
dotnet run --project src/MaurusX.Cli -- set dpi --profile 1 --stage 1 --dpi 1600 --dpi-y 1200
dotnet run --project src/MaurusX.Cli -- set polling-rate 500
dotnet run --project src/MaurusX.Cli -- set led --profile 1 --intensity high --pulsation slow
dotnet run --project src/MaurusX.Cli -- set sensitivity --profile 1 --value 10
dotnet run --project src/MaurusX.Cli -- set lift-off --profile 1 --level 3

Command reference

Full --help output for every command, including all accepted values for enum-like switches. Run MaurusX.Cli <command> --help yourself for the same output.

MaurusX.Cli --help
Description:
  MaurusX CLI - configure the Genius/KYE Maurus X gaming mouse

  Examples:
    MaurusX.Cli list-devices
    MaurusX.Cli status
    MaurusX.Cli status --profile 1
    MaurusX.Cli set dpi --profile 1 --stage 1 --dpi 1600
    MaurusX.Cli set polling-rate 500
    MaurusX.Cli set led --profile 1 --intensity high --pulsation slow
    MaurusX.Cli set sensitivity --profile 1 --value 10
    MaurusX.Cli set lift-off --profile 1 --level 3

  Run any command with --help to see its own options and examples,
  e.g. 'MaurusX.Cli set dpi --help'.

Usage:
  MaurusX.Cli [command] [options]

Options:
  -?, -h, --help  Show help and usage information
  --version       Show version information

Commands:
  list-devices  Check whether the Maurus X vendor configuration interface is reachable

                Example:
                  MaurusX.Cli list-devices
  status        Show last-known settings (see docs: this reflects our own writes, not a live device read)

                Examples:
                  MaurusX.Cli status
                  MaurusX.Cli status --profile 1
  set           Change a mouse setting and send it to the device

                Subcommands: dpi, polling-rate, led, sensitivity, lift-off
                Run 'MaurusX.Cli set <subcommand> --help' for its options and examples.
MaurusX.Cli list-devices --help
Description:
  Check whether the Maurus X vendor configuration interface is reachable

  Example:
    MaurusX.Cli list-devices

Usage:
  MaurusX.Cli list-devices [options]

Options:
  -?, -h, --help  Show help and usage information
MaurusX.Cli status --help
Description:
  Show last-known settings (see docs: this reflects our own writes, not a live device read)

  Examples:
    MaurusX.Cli status
    MaurusX.Cli status --profile 1

Usage:
  MaurusX.Cli status [options]

Options:
  --profile <profile>  Profile 1-5 (omit to show all), e.g. --profile 1
  -?, -h, --help       Show help and usage information
MaurusX.Cli set --help
Description:
  Change a mouse setting and send it to the device

  Subcommands: dpi, polling-rate, led, sensitivity, lift-off
  Run 'MaurusX.Cli set <subcommand> --help' for its options and examples.

Usage:
  MaurusX.Cli set [command] [options]

Options:
  -?, -h, --help  Show help and usage information

Commands:
  dpi                          Set one DPI-stage slot for a profile

                               Examples:
                                 MaurusX.Cli set dpi --profile 1 --stage 1 --dpi 1600
                                 MaurusX.Cli set dpi --profile 1 --stage 1 --dpi 1600 --dpi-y 1200
                                 MaurusX.Cli set dpi --profile 2 --stage 3 --dpi 2400 --enabled false
  polling-rate <1000|250|500>  Set the (global) polling rate

                               Examples:
                                 MaurusX.Cli set polling-rate 1000
                                 MaurusX.Cli set polling-rate 500
                                 MaurusX.Cli set polling-rate 250
  led                          Set LED intensity and/or pulsation speed for a profile

                               Examples:
                                 MaurusX.Cli set led --profile 1 --intensity high --pulsation slow
                                 MaurusX.Cli set led --profile 1 --intensity off
                                 MaurusX.Cli set led --profile 2 --pulsation fast
  sensitivity                  Set the sensitivity multiplier for a profile (rescales its DPI-stage table)

                               Examples:
                                 MaurusX.Cli set sensitivity --profile 1 --value 10
                                 MaurusX.Cli set sensitivity --profile 2 --value 8
  lift-off                     Set lift-off distance for a profile (no UI in the stock app, but the wire format is
                               confirmed from mousehid.exe; this may be rejected on some hardware/firmware revisions)

                               Example:
                                 MaurusX.Cli set lift-off --profile 1 --level 3
MaurusX.Cli set dpi --help
Description:
  Set one DPI-stage slot for a profile

  Examples:
    MaurusX.Cli set dpi --profile 1 --stage 1 --dpi 1600
    MaurusX.Cli set dpi --profile 1 --stage 1 --dpi 1600 --dpi-y 1200
    MaurusX.Cli set dpi --profile 2 --stage 3 --dpi 2400 --enabled false

Usage:
  MaurusX.Cli set dpi [options]

Options:
  --profile <profile>         Profile 1-5, e.g. --profile 1 (default: 1) [default: 1]
  --stage <stage> (REQUIRED)  DPI stage slot 1-8, e.g. --stage 1
  --dpi <dpi> (REQUIRED)      DPI value for X (and Y, unless --dpi-y is given), e.g. --dpi 1600
  --dpi-y <dpi-y>             Independent Y-axis DPI value, e.g. --dpi-y 1200 (omit to mirror --dpi, matching 'Enable X-Y DPI' off)
  --enabled                   Enable this stage, e.g. --enabled false (default: true) [default: true]
  -?, -h, --help              Show help and usage information
MaurusX.Cli set polling-rate --help
Description:
  Set the (global) polling rate

  Examples:
    MaurusX.Cli set polling-rate 1000
    MaurusX.Cli set polling-rate 500
    MaurusX.Cli set polling-rate 250

Usage:
  MaurusX.Cli set polling-rate <hz> [options]

Arguments:
  <1000|250|500>  1000, 500, or 250, e.g. 500

Options:
  -?, -h, --help  Show help and usage information
MaurusX.Cli set led --help
Description:
  Set LED intensity and/or pulsation speed for a profile

  Examples:
    MaurusX.Cli set led --profile 1 --intensity high --pulsation slow
    MaurusX.Cli set led --profile 1 --intensity off
    MaurusX.Cli set led --profile 2 --pulsation fast

Usage:
  MaurusX.Cli set led [options]

Options:
  --profile <profile>                    Profile 1-5, e.g. --profile 1 (default: 1) [default: 1]
  --intensity <high|low|middle|off>      off, low, middle, high, e.g. --intensity high (omit to leave unchanged)
  --pulsation <fast|middle|slow|steady>  steady, slow, middle, fast, e.g. --pulsation slow (omit to leave unchanged)
  -?, -h, --help                         Show help and usage information
MaurusX.Cli set sensitivity --help
Description:
  Set the sensitivity multiplier for a profile (rescales its DPI-stage table)

  Examples:
    MaurusX.Cli set sensitivity --profile 1 --value 10
    MaurusX.Cli set sensitivity --profile 2 --value 8

Usage:
  MaurusX.Cli set sensitivity [options]

Options:
  --profile <profile>         Profile 1-5, e.g. --profile 1 (default: 1) [default: 1]
  --value <value> (REQUIRED)  1-10 (10 = 100%), e.g. --value 8
  -?, -h, --help              Show help and usage information
MaurusX.Cli set lift-off --help
Description:
  Set lift-off distance for a profile (no UI in the stock app, but the wire format is
  confirmed from mousehid.exe; this may be rejected on some hardware/firmware revisions)

  Example:
    MaurusX.Cli set lift-off --profile 1 --level 3

Usage:
  MaurusX.Cli set lift-off [options]

Options:
  --profile <profile>         Profile 1-5, e.g. --profile 1 (default: 1) [default: 1]
  --level <level> (REQUIRED)  1-5, e.g. --level 3
  -?, -h, --help              Show help and usage information

Using the library

using MaurusX.Protocol;

using var device = MaurusXDevice.TryOpen();
if (device is null)
{
    Console.WriteLine("Mouse not found.");
    return;
}

device.SetLed(profile: 1, LedPulsation.Slow, LedIntensity.High);
device.SetDpiStages(profile: 1, device.GetProfile(1).DpiStages);

Building

Requires the .NET 10 SDK.

dotnet build
dotnet test

Project layout

src/MaurusX.Protocol/    platform-agnostic library (HID transport + wire protocol)
src/MaurusX.Cli/         command-line interface
tests/MaurusX.Protocol.Tests/   golden-value tests against captured/decompiled protocol data

License

GNU General Public License v3.0.

About

C# dotnet implementation of the Maurus X mouse protocol and simple CLI console application

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages