Skip to content
Snippets Groups Projects
Unverified Commit 1194b011 authored by hendy643's avatar hendy643 Committed by Luca Weiss
Browse files

Add support for Razer Naga Left-Handed Edition

parent c3758080
Loading
......@@ -126,6 +126,7 @@ The devices below are fully feature supported by OpenRazer, which means all avai
| Razer DeathAdder V2 | 1532:0084 |
| Razer Viper Mini | 1532:008A |
| Razer DeathAdder V2 Mini | 1532:008C |
| Razer Naga Left-Handed Edition | 1532:008D |
### Mousemats
| Device | USB VID:PID |
......
......@@ -1913,6 +1913,71 @@ class RazerMambaElite(__RazerDeviceSpecialBrightnessSuspend):
self.disable_notify = False
class RazerNagaLeftHanded2020(__RazerDeviceSpecialBrightnessSuspend):
"""
Class for the Razer Naga Left Handed Edition 2020
"""
USB_VID = 0x1532
USB_PID = 0x008D
HAS_MATRIX = True
WAVE_DIRS = (1, 2)
MATRIX_DIMS = [1, 3]
DEDICATED_MACRO_KEYS = True
METHODS = ['get_device_type_mouse', 'max_dpi', 'get_dpi_xy', 'set_dpi_xy',
'get_poll_rate', 'set_poll_rate',
# Macros
'get_macros', 'delete_macro', 'add_macro',
# Logo
'get_logo_brightness', 'set_logo_brightness',
'set_logo_wave', 'set_logo_static_naga_hex_v2', 'set_logo_spectrum_naga_hex_v2', 'set_logo_none_naga_hex_v2', 'set_logo_reactive_naga_hex_v2', 'set_logo_breath_random_naga_hex_v2', 'set_logo_breath_single_naga_hex_v2', 'set_logo_breath_dual_naga_hex_v2',
# Scroll wheel
'get_scroll_brightness', 'set_scroll_brightness',
'set_scroll_wave', 'set_scroll_static_naga_hex_v2', 'set_scroll_spectrum_naga_hex_v2', 'set_scroll_none_naga_hex_v2', 'set_scroll_reactive_naga_hex_v2', 'set_scroll_breath_random_naga_hex_v2', 'set_scroll_breath_single_naga_hex_v2', 'set_scroll_breath_dual_naga_hex_v2',
# Right side = thumbgrid
'get_right_brightness', 'set_right_brightness',
'set_right_wave', 'set_right_static', 'set_right_spectrum', 'set_right_none', 'set_right_reactive', 'set_right_breath_random', 'set_right_breath_single', 'set_right_breath_dual',
# Custom frame
'set_custom_effect', 'set_key_row']
DPI_MAX = 20000
DEVICE_IMAGE = "https://rzrwarranty.s3.amazonaws.com/cee694cd7526df413008167b7566af310985321b20c57f3dc42e5cbd773f2417.png"
def _suspend_device(self):
"""
Suspend the device
Get the current brightness level, store it for later and then set the brightness to 0
"""
self.suspend_args.clear()
self.suspend_args['brightness'] = (
_da_get_logo_brightness(self),
_da_get_scroll_brightness(self),
_get_right_brightness(self))
# Todo make it context?
self.disable_notify = True
_da_set_logo_brightness(self, 0)
_da_set_scroll_brightness(self, 0)
_set_right_brightness(self, 0)
self.disable_notify = False
def _resume_device(self):
"""
Resume the device
Get the last known brightness and then set the brightness
"""
logo_brightness = self.suspend_args.get('brightness', (100, 100, 100))[0]
scroll_brightness = self.suspend_args.get('brightness', (100, 100, 100))[1]
right_row_brightness = self.suspend_args.get('brightness', (100, 100, 100))[2]
self.disable_notify = True
_da_set_logo_brightness(self, logo_brightness)
_da_set_scroll_brightness(self, scroll_brightness)
_set_right_brightness(self, right_row_brightness)
self.disable_notify = False
class RazerDeathAdder1800(__RazerDevice):
"""
Class for the Razer DeathAdder 1800
......
This diff is collapsed.
......@@ -65,6 +65,7 @@
#define USB_DEVICE_ID_RAZER_DEATHADDER_V2 0x0084
#define USB_DEVICE_ID_RAZER_VIPER_MINI 0x008A
#define USB_DEVICE_ID_RAZER_DEATHADDER_V2_MINI 0x008C
#define USB_DEVICE_ID_RAZER_NAGA_LEFT_HANDED_2020 0x008D
/* Each keyboard report has 90 bytes*/
#define RAZER_REPORT_LEN 0x5A
......
......@@ -69,6 +69,7 @@
<modalias>usb:v1532p0084d*</modalias>
<modalias>usb:v1532p008Ad*</modalias>
<modalias>usb:v1532p008Cd*</modalias>
<modalias>usb:v1532p008Dd*</modalias>
<modalias>usb:v1532p010Dd*</modalias>
<modalias>usb:v1532p010Ed*</modalias>
<modalias>usb:v1532p010Fd*</modalias>
......
......@@ -5,7 +5,7 @@ GOTO="razer_end"
LABEL="razer_vendor"
# Mice
ATTRS{idProduct}=="0013|0016|0020|0024|0025|002e|002f|0032|0034|0036|0037|0038|0039|0040|0041|0042|0043|0044|0045|0046|0048|004c|004f|0050|0053|0054|0059|005a|005b|005c|005e|0060|0062|0064|0067|006a|006b|006c|006e|006f|0070|0071|0072|0073|0078|007a|007b|007c|007d|0083|0084|008a|008c", \
ATTRS{idProduct}=="0013|0016|0020|0024|0025|002e|002f|0032|0034|0036|0037|0038|0039|0040|0041|0042|0043|0044|0045|0046|0048|004c|004f|0050|0053|0054|0059|005a|005b|005c|005e|0060|0062|0064|0067|006a|006b|006c|006e|006f|0070|0071|0072|0073|0078|007a|007b|007c|007d|0083|0084|008a|008c|008d", \
ATTRS{idVendor}=="1532", \
ENV{ID_RAZER_CHROMA}="1", ENV{RAZER_DRIVER}="razermouse"
......
[device]
dir_name = 0003:1532:008D.0001
name = Razer Naga Left-Handed Edition 2020
files = r,device_serial,XX000000008D
r,device_type,%(name)s
rw,dpi,800:800
r,firmware_version,v1.0
rw,logo_led_brightness,0
w,logo_matrix_effect_breath
w,logo_matrix_effect_none
w,logo_matrix_effect_reactive
w,logo_matrix_effect_spectrum
w,logo_matrix_effect_static
w,logo_matrix_effect_wave
w,matrix_custom_frame
w,matrix_effect_custom
rw,poll_rate,500
rw,right_led_brightness,0
w,right_matrix_effect_breath
w,right_matrix_effect_none
w,right_matrix_effect_reactive
w,right_matrix_effect_spectrum
w,right_matrix_effect_static
w,right_matrix_effect_wave
rw,scroll_led_brightness,0
w,scroll_matrix_effect_breath
w,scroll_matrix_effect_none
w,scroll_matrix_effect_reactive
w,scroll_matrix_effect_spectrum
w,scroll_matrix_effect_static
w,scroll_matrix_effect_wave
r,version,1.0.0
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment