Skip to content

Commit 7c70ea7

Browse files
committed
feat(device) Added initial support of the Prime+ (1038:182C) mouse (#201)
1 parent 24b8f2d commit 7c70ea7

File tree

9 files changed

+791
-19
lines changed

9 files changed

+791
-19
lines changed

README.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,9 @@ Changelog
5454

5555
* **[NEXT]** (changes on ``master`` that have not been released yet):
5656

57-
* feat(device) Added support of the Rival 5 (1038:183C) device (@Saltblob, @nonoo, @flozz, #165, #268)
58-
* feat(device) Added support of the Rival 5 Destiny Edition (1038:183E) device (@flozz)
57+
* feat(device) Added support of the Rival 5 (1038:183C) mouse (@Saltblob, @nonoo, @flozz, #165, #268)
58+
* feat(device) Added support of the Rival 5 Destiny Edition (1038:183E) mouse (@flozz)
59+
* feat(device) Added initial support of the Prime+ (1038:182C) mouse (@BenJamesAndo, @flozz, #201)
5960
* fix(debug): Fixed a crash when getting hidapi version without having setuptools installed (@flozz)
6061
* misc(standalone): Added a standalone build for Linux (@flozz)
6162
* misc(standalone): Added a standalone build for Windows (@flozz, #231)

doc/devices/images/prime_plus_buttons.svg

Lines changed: 453 additions & 0 deletions
Loading

doc/devices/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Supported Devices
1616
./kinzuv2.rst
1717
./prime.rst
1818
./prime_mini.rst
19+
./prime_plus.rst
1920
./prime_wireless.rst
2021
./rival3.rst
2122
./rival3_gen2.rst

doc/devices/prime.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
SteelSeries Prime
2-
===================
2+
=================
33

44

55
Supported Models
@@ -13,8 +13,8 @@ Missing Features
1313

1414
The following feature are currently not supported by Rivalcfg:
1515

16-
* Button mapping
1716
* Advanced color / illumination configurations
17+
* Button bindings for mouse wheel (scroll)
1818

1919

2020
Command-Line Usage

doc/devices/prime_plus.rst

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
SteelSeries Prime+
2+
==================
3+
4+
5+
Supported Models
6+
----------------
7+
8+
.. rivalcfg_device_family:: prime_plus
9+
10+
11+
Missing Features
12+
----------------
13+
14+
The following feature are currently not supported by Rivalcfg:
15+
16+
* OLED screen under the mouse
17+
* Lift-off distance
18+
* Advanced color / illumination configurations
19+
* Button bindings for mouse wheel (scroll)
20+
21+
22+
Command-Line Usage
23+
------------------
24+
25+
.. rivalcfg_device_cli:: prime_plus
26+
27+
28+
Sensitivity (DPI)
29+
-----------------
30+
31+
This mouse supports up to 5 sensitivity presets. You can define them like this:
32+
33+
::
34+
35+
rivalcfg --sensitivity 800 # one preset
36+
rivalcfg --sensitivity 800,1600 # two presets
37+
38+
You can switch preset using the button under the mouse wheel.
39+
40+
.. NOTE::
41+
42+
When you set the sensitivity through the CLI, the selected preset always
43+
back to the first one.
44+
45+
46+
.. NOTE:: From Python API, you can pass an ``int``, a ``tuple`` or a ``list``
47+
as parameter. You are also able to change the currently selected preset::
48+
49+
mouse.sensitivity(800)
50+
mouse.sensitivity("800, 1600")
51+
mouse.sensitivity([800, 1600])
52+
# select the second preset (1600 dpi)
53+
mouse.sensitivity([800, 1600, 2000, 4000], selected_preset=2)
54+
55+
56+
Colors
57+
------
58+
59+
This mouse supports colors. Various formats are supported.
60+
61+
.. include:: ./_colors.rst
62+
63+
64+
Buttons
65+
-------
66+
67+
.. figure:: ./images/prime_plus_buttons.svg
68+
:alt: Prime+ buttons schema
69+
70+
.. include:: ./_buttons.rst
71+
72+
73+
Python API
74+
----------
75+
76+
TODO

rivalcfg/devices/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,7 @@ def _generate_profiles():
229229
kinzuv2,
230230
prime,
231231
prime_mini,
232+
prime_plus,
232233
prime_wireless_wired,
233234
prime_wireless_wireless,
234235
rival3,

rivalcfg/devices/prime.py

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -60,22 +60,14 @@
6060
"report_type": usbhid.HID_REPORT_TYPE_OUTPUT,
6161
"command": [0x62, 0x01],
6262
"command_suffix": [
63-
0x00,
64-
0x00,
65-
0x00,
66-
0x00,
67-
0x00,
68-
0x00,
69-
0x00,
70-
0x00,
71-
0x00,
72-
0x00,
73-
0x00,
74-
0x00,
75-
0x00,
76-
0x00,
77-
0x00,
63+
# fmt: off
64+
0x00, 0x00, 0x00,
65+
0x00, 0x00, 0x00,
66+
0x00, 0x00, 0x00,
67+
0x00, 0x00, 0x00,
68+
0x00, 0x00, 0x00,
7869
0xFF,
70+
# fmt: on
7971
],
8072
"value_type": "rgbcolor",
8173
"default": "#FF5200",

rivalcfg/devices/prime_plus.py

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
from .. import usbhid
2+
3+
profile = {
4+
"name": "SteelSeries Prime+",
5+
"models": [
6+
{
7+
"name": "SteelSeries Prime+",
8+
"vendor_id": 0x1038,
9+
"product_id": 0x182C,
10+
"endpoint": 0,
11+
},
12+
],
13+
"settings": {
14+
"sensitivity": {
15+
"label": "Sensitivity presets",
16+
"description": "Set sensitivity preset (DPI)",
17+
"cli": ["-s", "--sensitivity"],
18+
"report_type": usbhid.HID_REPORT_TYPE_OUTPUT,
19+
"command": [0x61],
20+
"value_type": "multidpi_range",
21+
"input_range": [50, 18000, 50],
22+
"output_range": [1, 0x0168, 1],
23+
"dpi_length_byte": 2,
24+
"count_mode": "number",
25+
"first_preset": 0,
26+
"max_preset_count": 5,
27+
"default": "400, 800, 1200, 2400, 3200",
28+
},
29+
"polling_rate": {
30+
"label": "Polling rate",
31+
"description": "Set polling rate (Hz)",
32+
"cli": ["-p", "--polling-rate"],
33+
"report_type": usbhid.HID_REPORT_TYPE_OUTPUT,
34+
"command": [0x5D],
35+
"value_type": "choice",
36+
"choices": {
37+
125: 0x04,
38+
250: 0x03,
39+
500: 0x02,
40+
1000: 0x01,
41+
},
42+
"default": 1000,
43+
},
44+
"color": {
45+
"label": "Wheel LED color",
46+
"description": "Set the color of the wheel LED",
47+
"cli": ["-c", "--color"],
48+
"report_type": usbhid.HID_REPORT_TYPE_OUTPUT,
49+
"command": [0x62, 0x01],
50+
"command_suffix": [
51+
# fmt: off
52+
0x00, 0x00, 0x00,
53+
0x00, 0x00, 0x00,
54+
0x00, 0x00, 0x00,
55+
0x00, 0x00, 0x00,
56+
0x00, 0x00, 0x00,
57+
0xFF,
58+
# fmt: on
59+
],
60+
"value_type": "rgbcolor",
61+
"default": "#FF5200",
62+
},
63+
"led_brightness": {
64+
"label": "Wheel LED brightness",
65+
"description": "Set the brightness of the wheel LED",
66+
"cli": ["-l", "--led-brightness"],
67+
"report_type": usbhid.HID_REPORT_TYPE_OUTPUT,
68+
"command": [0x5F],
69+
"value_type": "range",
70+
"input_range": [0, 256, 1],
71+
"output_range": [0, 256, 1],
72+
"range_length_byte": 2,
73+
"default": 256,
74+
},
75+
"buttons_mapping": {
76+
"label": "Buttons mapping",
77+
"description": "Set the mapping of the buttons",
78+
"cli": ["-b", "--buttons"],
79+
"report_type": usbhid.HID_REPORT_TYPE_OUTPUT,
80+
"command": [0x5B],
81+
"value_type": "buttons",
82+
# fmt: off
83+
"buttons": {
84+
"Button1": {"id": 0x01, "offset": 0x00, "default": "button1"},
85+
"Button2": {"id": 0x02, "offset": 0x05, "default": "button2"},
86+
"Button3": {"id": 0x03, "offset": 0x0A, "default": "button3"},
87+
"Button4": {"id": 0x04, "offset": 0x0F, "default": "button4"},
88+
"Button5": {"id": 0x05, "offset": 0x14, "default": "button5"},
89+
"Button6": {"id": 0x06, "offset": 0x19, "default": "dpi"},
90+
},
91+
"button_field_length": 5,
92+
"button_disable": 0x00,
93+
"button_keyboard": 0x51,
94+
"button_multimedia": 0x61,
95+
"button_dpi_switch": 0x30,
96+
"button_scroll_up": 0x31,
97+
"button_scroll_down": 0x32,
98+
# fmt: on
99+
"default": "buttons(button1=button1; button2=button2; button3=button3; button4=button4; button5=button5; button6=dpi; layout=qwerty)",
100+
},
101+
},
102+
"save_command": {
103+
"report_type": usbhid.HID_REPORT_TYPE_OUTPUT,
104+
"command": [0x59],
105+
},
106+
}

0 commit comments

Comments
 (0)