Skip to content
mh2nPublic
forked from nomadstar/m913-ctl

About

Linux configuration tool for the Redragon M913 Impact Elite wireless mouse

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Latest commit

 

History

25 Commits

Folders and files

Repository files navigation

m913-ctl

Linux configuration tool for the Redragon M913 Impact Elite wireless mouse.

Reverse-engineered from USB captures of the official Redragon Windows software. No Windows required.

Supported hardware

Two hardware revisions of the M913 ship under the same name. Both are supported and auto-detected:

Revision Wireless Wired
Original (Areson) 25a7:fa07 25a7:fa08
Newer (Compx, tri-mode) 3554:f55d 3554:f55e

The Compx revision differs in a few ways — see Compx hardware notes below.

Features

  • Button remapping — all 16 buttons (12 side + left/right/middle/fire)
  • Key combinations — modifier+key (ctrl+c), multi-key (a+b, max 3 keys)
  • Multimedia keys — play, next, prev, stop, volume, mute, email, calculator, browser controls
  • Fire button — configurable speed and repeat count
  • DPI profiles — 5 slots (Areson: 100–16000 in steps of 100; Compx: steps of 50)
  • LED — Areson: off/steady/respiration/rainbow modes; Compx: per-DPI-stage RGB color
  • Polling rate — 125, 250, 500, or 1000 Hz
  • Config files — INI format for saving and sharing configurations

GUI

If you prefer a visual interface over the command line, you can use m913-ctl-gui by brunofin.

Note: This is a graphical wrapper and requires m913-ctl to be installed from this repository first. The GUI uses this CLI tool as its backend to communicate with the mouse.

Installation

Arch Linux (AUR)

yay -S m913-ctl
# or: paru -S m913-ctl

The udev rule is installed automatically. After installation, replug the mouse receiver (or run sudo udevadm trigger) for the rule to take effect.

Pre-built binary

Download the latest m913-ctl from Releases, then:

chmod +x m913-ctl
sudo mv m913-ctl /usr/local/bin/

Also download 99-m913.rules from the same release and install it for non-root USB access:

sudo mv 99-m913.rules /usr/lib/udev/rules.d/
sudo udevadm control --reload-rules
sudo udevadm trigger

Build from source

Requires: Linux, libusb 1.0, CMake 3.15+, C++17 compiler (GCC 7+ or Clang 5+).

sudo apt install libusb-1.0-0-dev cmake build-essential  # Debian/Ubuntu
sudo pacman -S libusb cmake                               # Arch

cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr
cmake --build build
sudo cmake --install build

Usage

Command line

# Remap buttons — all remapped buttons must be in one command
m913-ctl --button side1=ctrl+1 --button side4=ctrl+4

# Set DPI
m913-ctl --dpi 1=800 --dpi 2=1600 --dpi 3=3200

# Set LED
m913-ctl --led steady
m913-ctl --led respiration
m913-ctl --led rainbow
m913-ctl --led off

# Set polling rate
m913-ctl --polling-rate 1000

# Apply config file
m913-ctl --config examples/example.ini

# List all valid action names
m913-ctl --list-actions

Note: Each invocation sends a complete button mapping to the mouse — buttons not mentioned are reset to their defaults. To remap multiple buttons, pass all --button flags in a single command. For a full persistent setup, use a config file.

Config file

[mouse]
polling_rate=1000

[dpi]
dpi1=400
dpi2=800
dpi3=1600
dpi4=3200
dpi5=6400

[led]
mode=steady
color=ff0000
brightness=255
speed=3

[buttons]
button_left=left
button_right=right
button_middle=middle
button_fire=fire:58:3
button_side1=ctrl+c
button_side2=ctrl+v
button_side3=media_play
button_side4=www_back

See examples/example.ini for a complete example.

Button names

Name Physical button
left Left click
right Right click
middle Scroll wheel click
fire Fire button (near left click)
side1–side12 12 side buttons

Action reference

Mouse actions

left right middle forward backward

DPI controls

dpi+ dpi- dpi-cycle

Special

led_toggle three_click polling_switch none

Fire button

  • fire — default fire (hardware auto-repeat)
  • fire:speed:times — custom speed (3–255, lower=faster) and repeat count (0–3)

Note: The minimum usable speed depends on your OS debounce threshold. Very low values (e.g. speed=3) may cause all clicks to register as one. Start around speed=25 and tune down until clicks stop being detected.

Multimedia

media_play media_player media_next media_prev media_stop media_vol_up media_vol_down media_mute media_email media_calc media_computer media_home media_search www_forward www_back www_stop www_refresh www_favorites

Keyboard keys

All standard keys: a–z, 0–9, f1–f24, enter, space, tab, backspace, esc, delete, insert, home, end, pageup, pagedown, arrow keys, numpad keys, etc.

Key combinations

  • Modifier + key: ctrl+c, shift+f4, alt+f4, ctrl+shift+z
  • Multi-key (max 3): a+b, a+b+c
  • Modifiers: ctrl, shift, alt, super (or ctrl_l, ctrl_r, shift_l, etc.)

LED settings

These apply to the original (Areson) hardware. For the Compx revision, see below.

Parameter Range Modes
mode off, steady, respiration, rainbow —
color Hex RGB (ff0000 = red) steady, respiration
brightness 0–255 (10 hardware levels) steady
speed 1–5 (1=slowest, 5=fastest) respiration

Compx hardware notes

The newer Compx revision (3554:f55d / 3554:f55e) is auto-detected and uses the same commands, with a few differences:

  • DPI steps are 50 (e.g. 400, 450, 500), not 100.
  • LED is per DPI stage — there are no global modes. Each DPI stage has its own RGB color, set with dpiN_color in the [dpi] section. 000000 turns that stage's LED off. The [led] section, if present, applies one color (or off) to every active stage; per-stage dpiN_color overrides it.
[dpi]
dpi1=400
dpi1_color=ff0000
dpi2=800
dpi2_color=0000ff
dpi2_enable=0      ; collapse to a single active stage (top-down only)

See examples/example_compx.ini for a complete example.

Diagnostics

m913-ctl --probe          # show USB interfaces and endpoints
m913-ctl --listen         # listen for mouse packets (Ctrl+C to stop)
m913-ctl --raw-send HEX   # send raw packet for debugging

Acknowledgments

Protocol knowledge derived from mouse_m908 by dokutan.

License

GPL-3.0 — see LICENSE.

About

Linux configuration tool for the Redragon M913 Impact Elite wireless mouse

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages