1
0
forked from drath/libratbag

2545 Commits

Author SHA1 Message Date
87fe2e31c3 Delete libratbag.spec 2026-11-05 14:23:38 +01:00
ff7ec2a1e4 spec for copr 2026-11-05 14:23:30 +01:00
96c7310a6d add spec 2026-11-05 14:14:46 +01:00
villamorrd
8235b5bb60 data: add ASUS TUF Gaming M3 Gen II
Signed-off-by: villamorrd <git@villamor.ph>
2026-09-17 20:56:39 +08:00
haytham
b8d4d3ca1f data: add ASUS ROG Strix Impact III Wireless
The device enumerates as usb 0b05:1ad7 behind the Omni receiver
(0b05:1ace). The signature prefix 20, OmniSignature=20, resolves to this
file during probe. Verified on hardware: 5 profiles, 8 buttons, 1 LED,
DPI presets 400/800/1600/3200, report rate 1000 Hz, debounce 12 ms, LED
brightness 127 (50%).
2026-08-18 20:11:11 +03:00
haytham
e07d72e2a7 data: add ASUS ROG Strix Impact III
Wired model with its own usb id. The values follow the official specs
and the wireless model's protocol, but are not tested on hardware:
Leds=2 (wheel and logo) and DpiRange=100:12000@50 are inferred.
2026-08-18 20:11:11 +03:00
haytham
d93a8bc474 asus: add support for the Omni receiver and new data layouts
Mice behind an ASUS Omni receiver all enumerate with the same usb id
(0b05:1ace), so the regular bus:vid:pid DeviceMatch cannot tell models
apart. Identify the model during probe instead:

- asus-rog-omni-receiver.device is a minimal bootstrap file that only
  declares Quirks=OMNI_RECEIVER, so the asus driver gets probed on the
  receiver's hidraw nodes
- the probe queries the serial number signature (03 12 12 02) and
  matches its prefix against the OmniSignature field of the .device
  files, then re-resolves the device data for the identified usb id
- an unknown signature fails the probe with -ENODEV, which also drops
  the receiver's keyboard and media control nodes

The Strix Impact III family answers with data two bytes earlier than the
original protocol (code plus params echo instead of code plus pad), so
two quirks cover the new layouts:

- LED_V2: per-zone LED responses with data at offset 4, brightness in
  0-100
- SETTINGS_V2: settings and DPI responses with data at offset 4,
  rate/debounce/snapping as single bytes

Also write DPI values with two bytes so presets above 12850 dpi work.

Verified on a ROG Strix Impact III Wireless: identification on hidraw4,
all 5 profiles with 8 buttons, 1 LED and DPI presets 400/800/1600/3200,
report rate 1000 Hz, debounce 12 ms, LED brightness 127 (50%). Writes
round-trip and survive a ratbagd restart.
2026-08-18 20:11:11 +03:00
Ayoze Torres
1f4efda955 swig: use the Python 3 C API instead of the removed PyInt_* aliases (#1878)
src/libratbag.i calls PyInt_Check(), PyInt_AsLong() and PyInt_FromLong().
Those are Python 2 functions; they only ever worked because SWIG emitted
compatibility macros mapping them onto their PyLong_* counterparts in the
generated wrapper. SWIG 4.5.0 dropped those macros, so the generated
libratbag.c no longer compiles:

  libratbag.c: In function '_wrap_ratbag_device_get_vendor_id':
  libratbag.c:4583:17: error: implicit declaration of function
    'PyInt_FromLong'; did you mean 'PyLong_FromLong'?
  libratbag.c:4583:15: error: assignment to 'PyObject *' from 'int' makes
    pointer from integer without a cast [-Wint-conversion]

Call the PyLong_* functions directly. The bindings are generated with
swig -py3, so there is no Python 2 build to keep working, and the macros
they replace expanded to exactly these functions.

Built and verified on Arch Linux with swig 4.5.0, Python 3.14, meson 1.12.0, gcc 15: `_libratbag.so` and `_hidpp.so` link cleanly with the change and fail without it.

Co-authored-by: Jitka Plesnikova <jplesnik@redhat.com>
Signed-off-by: Stephen Kitt <skitt@debian.org>
2026-08-12 18:07:56 +00:00
John Schoenick
03afbe49f3 data: enable INDEX_OFFSET on G502 X and G502 X Wireless
f9d1574 enabled this for the G502 X PLUS, which is the RGB variant.
I can confirm the normal G502 X Wireless has this quirk.  I do not
have a base model G502 X, but comments on issue #1606 as well as logic
suggest it very likely does unless proven otherwise.
2026-07-19 16:31:01 +03:00
perfectra1n
f9d1574841 data: enable INDEX_OFFSET on the G502 X PLUS
The G502 X PLUS reports a 1-indexed active profile, so without
INDEX_OFFSET libratbag targets the wrong profile and DPI/button changes
never reach the device (the mouse boots on its first profile, reported
as index 1). It also needs the existing G502X_PLUS LED quirk, so list
both now that hidpp20 supports multiple quirks.

Verified on hardware (usb:046d:4099 via the Lightspeed receiver, Linux
7.x): the device reports active profile index 1, INDEX_OFFSET maps it to
0, and the LED still reads correctly via the G502X_PLUS slot.
2026-07-15 20:41:56 +03:00
perfectra1n
b0f2779270 hidpp20: support multiple quirks per device
The hidpp20 quirk was a single enum value, so a device could carry only
one quirk. Some devices need several at once. For example the G502 X
PLUS needs G502X_PLUS (LED in the 2nd slot) and INDEX_OFFSET (1-indexed
active profile) together, which a single field cannot express. #1799
noted this was worth adding.

Make the quirk enum combinable bit flags stored as a bitmask. The
"Quirk" key now takes a ;-separated list (like the asus driver's
"Quirks"); existing single-value device files parse the same as before.
2026-07-15 20:41:56 +03:00
thejobbitt
43f76eee67 data: add Logitech G502 X Wireless through LS dongle (046d:409f)
Add USB ID 046d:409f, the ID when connected through the LS dongle. USB ID 046d:c098 is the ID when wired.
2026-07-10 16:57:22 +00:00
Tyler
54edb7e0a2 fix: clear stale modifiers when binding keys (#1843)
Device: Logitech G502 X PLUS

Encountered an issue where re-binding keys which previously had modifiers assigned (e.g. ALT+KEY_LEFT), resulted in the modifier being retained. This small change clears modifiers before assigning new keys or macros. Keys are still able to be assigned modifiers, as assignment hasn't changed.

I didn't see a PR template, so I'm just doing my best here...

- Assigned the back button the default setting
  - Changed back button to send comma key
    - before: sent `ALT+,`
    - after: sent `,` ✔️ 
- Assigned back button to send `ALT+LEFT_ARROW`
  - Changed back button to send comma key
    - before: sent `ALT+,`
    - after: sent `,` ✔️ 
- Assigned back button to send comma key
  - Changed back button to send `ALT+,`
    - before: sent `ALT+,`
    - after: sent `ALT+,` ✔️

Closes https://github.com/libratbag/libratbag/issues/1853
Closes https://github.com/libratbag/piper/issues/835
2026-07-10 16:52:10 +00:00
winter
2fb9a701e8 data: add Glorious Model O Eternal (usb:3794:a000)
Co-authored-by: Merikei <73759842+Merikei@users.noreply.github.com>
Co-authored-by: winter <96156057+wintervoid@users.noreply.github.com>
2026-05-31 19:00:25 +03:00
rc-05
805e7fb77f feature: Add support for ASUS TUF GAMING M4 AIR
This commit adds support for the TUF GAMING M4 AIR mouse manufactured by ASUS/ASUSTek.
2026-04-25 21:27:34 +03:00
Kyoken
1e20248b6d data: add ASUS TUF Mini WL 2026-04-25 21:26:44 +03:00
Yaroslav Chvanov
d7bbed2eb1 ci: pin black and ruff versions
Avoid CI breaking on their updates.
2026-04-25 21:20:52 +03:00
Patrick Klose
874c01732a hidpp20: add quirk to fix active profile index on some devices (#1799)
* Added Quirk for G502 offset to resolve incorrect active profile being applied. Testing on G502- Hero Wireless. May be worth adding handling for multiple quirks.

* Added quirk in device files to correct offset for G502 Hero, G502-Proteus Spectrum, and G604.

* Refactored G502 Offset Quirk naming to be more broadly applicable as index offset.

* Correct typo in g502-proteus spectrum quirk value.

---------

Co-authored-by: Patrick Klose <pjklose@outlook.com>
2026-01-11 16:51:40 +00:00
Denis
c5214d2633 data: add G502 X Plus in wireless mode (usb:046d:4099) (#1728) 2025-12-14 07:10:47 +00:00
Adam Spiers
b61da30205 data: add Logitech MX Master 4 2025-11-19 22:23:19 +03:00
Kritphong Mongkhonvanit
e4184c2227 data: add ASUS ROG Keris (Wired) 2025-11-19 22:10:26 +03:00
lat9nq
78d1124c3e data: add Logitech G705 Mouse
Based on https://github.com/Nadeflore work. Thank you!
2025-05-11 12:50:04 +03:00
Sewer.
65d07ae4d1 hidpp20: add G502X Plus (Wired) Support (#1693)
* Recognize the Logitech G502X PLUS (Wired)

* Fixed: LED write functionality for G502X PLUS

Inspired by 94bd172a19

* Changed: Number of LEDs is implied by quirk set.

* Added: Extra note about single LED
2025-05-10 10:59:41 +00:00
bliepp
ca94a8a111 Additional ID for ASUS ROG Keris Wireless AimPoint (#1679) 2025-05-10 10:41:05 +00:00
Kyoken
7bdca904f5 asus: new quirks for Chakram X and other mice 2025-05-10 13:38:06 +03:00
Yaroslav Chvanov
ad6540e39b ci: upgrade Ubuntu 20 -> 24
Fixes https://github.com/libratbag/libratbag/issues/1701
2025-05-08 09:52:30 +03:00
AFCMS
df3c73e958 Bump CI Actions 2024-10-28 23:36:03 +01:00
Sebastian Fleer
dcc5def3d6 data: add an additional USB ID for Logitech MX Vertical (#1652) 2024-10-16 19:24:00 +00:00
Yaroslav Chvanov
9f4789f874 libratbag 0.18 v0.18 2024-09-24 19:00:05 +03:00
Yaroslav Chvanov
7e1c7b3c7d release.sh: use bash from PATH in shebang
Fixes NixOS.
2024-09-24 19:00:05 +03:00
Yaroslav Chvanov
3bf556fb69 ratbagd: format with ruff format 2024-09-24 18:59:58 +03:00
Odd Eirik Nes
52dff63a64 data: add an additional usb identifier for Logitech G733 2024-09-24 15:59:11 +00:00
Yaroslav Chvanov
1c9662043f ratbagctl: use correct type hint for def main
Fixes: 34217a752b ("Update ratbagctl.test")
2024-06-04 18:52:37 +03:00
Yaroslav Chvanov
6f5470249d ratbagctl: remove unused imports 2024-06-04 18:50:12 +03:00
Yaroslav Chvanov
4845cc901f ratbagctl: fix Ruff warnings 2024-06-04 18:43:32 +03:00
Yaroslav Chvanov
8444ceb638 libratbag: remove FIXME for simple key action modifiers
Macros can be used for that instead.
2024-03-05 20:07:36 +03:00
Yaroslav Chvanov
1c4ef242fc sinowealth: use existing libratbag helper for converting macro to raw 2024-03-05 20:02:53 +03:00
koliwbr
cf15a6e65d data: add support for Mad Dog GM905 2024-02-27 19:16:38 +03:00
Yaroslav Chvanov
20962d093d ratbagc: fix new Ruff lints
Broke with Ruff v0.2.

- SIM401 Use `self._devices.get(id, None)` instead of an `if` block
- SIM113 Use `enumerate()` for index variable `i` in `for` loop
- Add type hint for Ratbagd._devices
2024-02-27 19:09:23 +03:00
Yaroslav Chvanov
e31338f081 ci: update linter settings format for ruff
Fixes:
> warning: The top-level linter settings are deprecated in favour of
> their counterparts in the `lint` section`.
2024-02-27 19:08:36 +03:00
Daniel Levi-Minzi
a52ffcdb45 add rog harpe ace wireless 2024-01-18 17:03:17 -05:00
Yaroslav Chvanov
79bb107634 ratbagd: fix typo 2024-01-14 02:58:18 +03:00
Yaroslav Chvanov
21373d8c4a sinowealth: fix lift-off distance reading integer overflow
Add same safety checks for it and angle snapping setting living near it.
Also log if something else is found in those buffers.
2024-01-14 02:58:18 +03:00
Yaroslav Chvanov
6c668d1f48 sinowealth: fix typos and reformat 2024-01-14 02:52:07 +03:00
Yaroslav Chvanov
8591540d03 sinowealth: add report rate cycling key mapping 2024-01-14 02:52:06 +03:00
Yaroslav Chvanov
d62984220b driver-hidpp20: remove unused static function
Fixes warning about unused function hidpp20drv_current_profile.
Also, it looks like it was missing 'rc == 0' check at the end.
2024-01-14 02:52:06 +03:00
Yaroslav Chvanov
fbd50bc241 ratbagd-profile: cap minimum report rate to 125
Fixes the sanity check part of #1563.
2024-01-14 02:52:06 +03:00
Michał Lubas
2d7b4c10d1 Add a delay before dbus sync in ratbagctl.test 2024-01-14 02:49:18 +03:00
Michał Lubas
0204289704 meson.build: Don't pass a file to str.format 2024-01-14 02:48:08 +03:00
Michał Lubas
27b0d4a2d9 Replace removed imp module with importlib 2024-01-14 02:48:08 +03:00