How to use libratbag for your mouse

Published by arifur on

libratbag is a configuration library for gaming mice. It provides a generic way to access the various features exposed by these mice and abstracts away hardware-specific and kernel-specific quirks.

Install libratbag either from package library or compile from source.

Once installed you can then use it to configure your mice. Make sure your mouse is supported. You can see the supported devices at the bottom.

Configuring libratbag

Find you mouse sudo ratbag-command list The command above will list your mice. In my case it was [c]/dev/input/event0 Logitech Gaming Mouse G502[/c]

View info about your device sudo ratbag-command info /dev/input/event0 Change [c]/dev/input/event0[/c] to what ever the output was from the [c]sudo ratbag-command list[/c] Output of ratbat-command info Device ‘Logitech Gaming Mouse G502’ Capabilities: res profile btn-key Number of buttons: 11 Profiles supported: 3 Profile 0 (active) Resolutions: 0: 600dpi @ 500Hz 1: 800dpi @ 500Hz (active) (default) 2: 1000dpi @ 500Hz 3: 1200dpi @ 500Hz 4: 1600dpi @ 500Hz Button: 0 type unknown is mapped to ‘button 1’ Button: 1 type unknown is mapped to ‘button 2’ Button: 2 type unknown is mapped to ‘button 3’ Button: 3 type unknown is mapped to ‘button 4’ Button: 4 type unknown is mapped to ‘button 5’ Button: 5 type unknown is mapped to ‘resolution alternate’ Button: 6 type unknown is mapped to ‘resolution down’ Button: 7 type unknown is mapped to ‘resolution up’ Button: 8 type unknown is mapped to ‘profile cycle up’ Button: 9 type unknown is mapped to ‘wheel right’ Button: 10 type unknown is mapped to ‘wheel left’ Profile 1 Resolutions: 0: 800dpi @ 500Hz 1: 1400dpi @ 500Hz 2: 1600dpi @ 500Hz (default) 3: 2000dpi @ 500Hz 4: 2800dpi @ 500Hz Button: 0 type unknown is mapped to ‘button 1’ Button: 1 type unknown is mapped to ‘button 2’ Button: 2 type unknown is mapped to ‘button 3’ Button: 3 type unknown is mapped to ‘button 4’ Button: 4 type unknown is mapped to ‘button 5’ Button: 5 type unknown is mapped to ‘resolution alternate’ Button: 6 type unknown is mapped to ‘resolution down’ Button: 7 type unknown is mapped to ‘resolution up’ Button: 8 type unknown is mapped to ‘profile cycle up’ Button: 9 type unknown is mapped to ‘wheel right’ Button: 10 type unknown is mapped to ‘wheel left’ Profile 2 Resolutions: 0: 800dpi @ 500Hz (default) 1: <disabled> 2: <disabled> 3: <disabled> 4: <disabled> Button: 0 type unknown is mapped to ‘button 1’ Button: 1 type unknown is mapped to ‘button 2’ Button: 2 type unknown is mapped to ‘button 3’ Button: 3 type unknown is mapped to ‘button 4’ Button: 4 type unknown is mapped to ‘button 5’ Button: 5 type unknown is mapped to ‘secondary mode’ Button: 6 type unknown is mapped to ‘KEY_C’ Button: 7 type unknown is mapped to ‘KEY_V’ Button: 8 type unknown is mapped to ‘profile cycle up’ Button: 9 type unknown is mapped to ‘wheel right’ Button: 10 type unknown is mapped to ‘wheel left’

Set DPI ratbag-command dpi set 800 /dev/input/event0 Change DPI of a Different Profile ratbag-command profile 1 resolution 3 dpi set 800 /dev/input/event0 The command above will change the DPI of the fourth settings of the second profile.

Creating Hot Keys ratbag-command profile 0 button 4 set action special doubleclick The command above will change the action of the fifth button of the first profile to doubleclick

Supported Devices Etekcity Scroll 6E

  • Etekcity Scroll Alpha
  • Logitech G9
  • Logitech G100s
  • Logitech G300
  • Logitech G303
  • Logitech [G500s]
  • Logitech G400s
  • Logitech G502
  • Logitech G600
  • Logitech G700
  • Logitech G900
  • Logitech MX Master
  • Logitech T650
  • Logitech T651
  • Logitech Wireless Touchpad
  • Razer DeathAdder Chroma
  • Razer Imperator 2012
  • Roccat Kone
Categories: Uncategorized

0 Comments

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.