Scroll to navigation

RATBAG_COMMAND(1) General Commands Manual RATBAG_COMMAND(1)

NAME

ratbag-command - query or change a device's settings

SYNOPSIS

ratbag-command [OPTIONS] {COMMAND} ... /path/to/device

DESCRIPTION

The ratbag-command tool queries or changes a device's settings.

This tool usually needs to be run as root to have access to the /dev/input/eventX nodes.

OPTIONS

Print debugging output.
Print debugging output with protocol output. No guarantees are given regarding the output format when this flag is on.
Print the tool's version.
Print the help.

General Commands

List supported devices (does not take a device argument)

Device Commands

Print information about a device

Profile Commands

Print the currently active profile
Set profile N as to the active profile
Use profile N for COMMAND

Resolution Commands

Resolution commands work on the given profile, or on the active profile if none is given.

Print the currently active resolution
Set resolution N as the active resolution
Use resolution N for COMMAND

DPI Commands

DPI commands work on the given profile and resolution, or on the active resolution of the active profile if none are given.

Print the dpi value
Set the dpi value to N
Print the report rate in Hz
Set the report rate in N Hz

Button Commands

Button commands work on the given profile, or on the active profile if none is given.

Print the number of buttons
Print the button action
Set the button action to button B
Set the button action to special action S
Set the button action to the given macro

Macro syntax:

A macro is a series of key events or waiting periods. Keys must be specified in linux/input.h key names.

Press and release 'a'
+KEY_A
Press 'a'
Release 'a'
Wait 300ms

Special Commands

These commands are for testing purposes and may be removed without notice

Switch the Etekcity mouse active profile

Examples

Exit codes

0
Success
1
Unsupported feature or index out of available range
2
Commandline arguments are invalid
3
Invalid device or a command failed on the device

NOTES

There is currently no guarantees that the output format of ratbag-command will not change in the future. There should be some stability with the commands mentioned in this man page, but do not expect it to stay the same.

0.9.0