Hi,
in the past few days I was fighting with my new M720 in order to disable the side-scrolling. (I've been using a 705 since now and in the past view years left click was mapped to the wheel left tilt, middle click to the right tilt)
The problem is, that in side-scroll mode the mouse reports a button press and then an immediate release (+ motion) - so I cannot drag with this button.
I've been playing around with Solaar, I've tried to enable smooth scrolling for this mouse (with the feature HIRES_WHEEL - without any luck yet) and tried also the other features in the hope, that they are indeed the side-scrolling. Now I gave up.
Do you have any idea / further information how the side-scrolling could be disabled on this device?
I'm getting quite sure, that it has to be done (if possible) with the REPROG_CONTROLS_V4 feature, however I've no idea what I should exactly send.
The output of solaar show mouse is the following:
3: M720 Triathlon Multi-Device Mouse
Codename : M720
Kind : mouse
Wireless PID : 405E
Protocol : HID++ 4.5
Polling rate : 8 ms (125Hz)
Serial number: 20864B2E
Bootloader: BOT 34.00.B0004
Firmware: MPM 04.00.B0007
Other:
The power switch is located on the base.
Supports 33 HID++ 2.0 features:
0: ROOT {0000}
1: FEATURE SET {0001}
2: DEVICE FW VERSION {0003}
3: DEVICE NAME {0005}
4: WIRELESS DEVICE STATUS {1D4B}
5: RESET {0020}
6: unknown:0007 {0007}
7: BATTERY STATUS {1000}
8: CHANGE HOST {1814}
9: unknown:1815 {1815}
10: REPROG_CONTROLS_V4 {1B04}
11: unknown:1C00 {1C00}
12: POINTER SPEED {2205}
13: VERTICAL SCROLLING {2100}
14: DFUCONTROL 2 {00C1}
15: unknown:00C2 {00C2}
16: unknown:1803 {1803} internal, hidden
17: unknown:1806 {1806} internal, hidden
18: unknown:1805 {1805} internal, hidden
19: unknown:1813 {1813} internal, hidden
20: unknown:1830 {1830} internal, hidden
21: unknown:1861 {1861} internal, hidden
22: unknown:1890 {1890} internal, hidden
23: unknown:1891 {1891} internal, hidden
24: unknown:18A1 {18A1} internal, hidden
25: unknown:1DF3 {1DF3} internal, hidden
26: unknown:1E00 {1E00} hidden
27: unknown:1EB0 {1EB0} internal, hidden
28: unknown:18B1 {18B1} internal, hidden
29: unknown:1850 {1850} internal, hidden
30: unknown:1F03 {1F03} internal, hidden
31: unknown:18C0 {18C0} internal, hidden
32: HIRES WHEEL {2121}
Battery: 90%, discharging.
What is even more interesting, I've found the (I think) default parametrization of the mouse in the logitech options program files:
6b015.xml.txt
The xml seems to be quite repetative (the remappableids are always the same --> the controls pointing to a task) but maybe that might be the key to set the controls in the mouse.
If it'd be possible to remap the buttons I think that would solve Ticket #338 as well.
Hi @ABotond , can you do solaar show using my changes from PR #337 ? It displays additional info about how keys can be remapped using REPROG_CONTROLS_V4. This can give some hints to help you.
Hi @doctor64 ,
thank you for the idea:
The result is the following:
0: LEFT CLICK => LeftClick mse, reprogrammable
1: RIGHT CLICK => RightClick mse, reprogrammable
2: MIDDLE BUTTON => MiddleMouseButton divertable, mse, persistently divertable, reprogrammable
3: BACK AS BUTTON 4 => BackEx divertable, mse, persistently divertable, reprogrammable
4: FORWARD AS BUTTON 5 => BrowserForwardEx divertable, mse, persistently divertable, reprogrammable
5: LEFT SCROLL AS AC PAN => HorzScrollLeftSet divertable, mse, persistently divertable, reprogrammable
6: RIGHT SCROLL AS AC PAN => HorzScrollRightSet divertable, mse, persistently divertable, reprogrammable
7: unknown:00D0 => unknown:00AD divertable, mse, persistently divertable, reprogrammable
8: unknown:00D7 => unknown:00B4 divertable, virtual
Battery: 90%, discharging.
@ABotond hmm, strange. did you use updated ./bin/solaar ? I don't see group and gmask information in output. please do ./bin/solaar -dd show from directory where you clone updated version and provide the output.
@doctor64 sorry, I'm not that experienced with github, I actually didn't know how I should directly check out pull requests (now I know) so I just checked out your repository - but I was on the wrong branch. Now the right one:
Has 9 reprogrammable keys:
0: LEFT CLICK , default: LeftClick => LEFT CLICK
mse, reprogrammable, pos:0, group:1, gmask:1
1: RIGHT CLICK , default: RightClick => RIGHT CLICK
mse, reprogrammable, pos:0, group:1, gmask:1
2: MIDDLE BUTTON , default: MiddleMouseButton => MIDDLE BUTTON
divertable, mse, persistently divertable, reprogrammable, pos:0, group:2, gmask:3
3: BACK AS BUTTON 4 , default: BackEx => BACK AS BUTTON 4
divertable, mse, persistently divertable, reprogrammable, pos:0, group:2, gmask:3
4: FORWARD AS BUTTON 5 , default: BrowserForwardEx => FORWARD AS BUTTON 5
divertable, mse, persistently divertable, reprogrammable, pos:0, group:2, gmask:3
5: LEFT SCROLL AS AC PAN , default: HorzScrollLeftSet => LEFT SCROLL AS AC PAN
divertable, mse, persistently divertable, reprogrammable, pos:0, group:2, gmask:3
6: RIGHT SCROLL AS AC PAN , default: HorzScrollRightSet => RIGHT SCROLL AS AC PAN
divertable, mse, persistently divertable, reprogrammable, pos:0, group:2, gmask:3
7: unknown:00D0 , default: unknown:00AD => unknown:00D0
divertable, mse, persistently divertable, reprogrammable, pos:0, group:2, gmask:3
8: unknown:00D7 , default: unknown:00B4 => unknown:00D7
divertable, virtual, pos:0, group:3, gmask:0
@ABotond sorry for misunderstanding. So, now we can see what any key in group 2 (keys 2-7) can be reprogrammed to generate key press for any key in groups 1 and 2.
Unfortunately, currently i don't have my linux system at hand, but, tomorrow i hope i can provide hex command to reprogram scroll keys, so you can test using hidconsole.
You wish to have LEFT SCROLL to be programmed as LEFT click, RIGHT SCROLL to MIDDLE, right?
@doctor64
Yeah, exactly. Thank you in advance!!
Btw. pointer speed seems to work with M720 as well, so if your PR gets accepted I'll push the M720 stuff as well.
(Unfortunately I couldn't get the smooth scrolling to work (although I don't need it - but it could be good for others), I've tried it also with hires_wheel)
@ABotond
Here is the test commands.
Start hidcosole - ./tools/hidconsole /dev/hidrawN, N is logitech device number on your system
type
11 02 0A 30 00 5B 00 00 50 - left scroll to left button
must reply with [11 02 0A30 005B0000500000000000000000000000]
11 02 0A 30 00 5D 00 00 52 - right scroll to middle button
must reply with [11 02 0A30 005D0000520000000000000000000000]
and test by solaar show
To return back to original mapping use
11 02 0A 30 00 5B 00 00 5B
11 02 0A 30 00 5D 00 00 5D
Upd: fix typo in command
@ABotond And about smooth scrolling - you can't enable feature or it is enabled but doesn't work in Linux?
Latter is expected, because logitech smooth scrolling realization (at least for LOWRES WHELL) when enabled just send custom HID++ scroll events instead of standard HID events. Actual smooth scrolling implementation should be done in operating system.
Hi @doctor64 ,
thank you very much for your effort, unfortunately it doesnt seem to work.
This is the output of hidconsole:
.. Opening device /dev/hidraw0
.. Opened handle 3, vendor 'Logitech' product 'USB Receiver' serial None.
.. Logitech receiver detected, HID++ validation enabled.
.. Press ^C/^D to exit, or type hex bytes to write to the device.
>> ( 2.988) [20 01 0200 0000000000FF0000000000] ' \x01\x02\x00\x00\x00\x00\x00\x00\xff\x00\x00\x00\x00\x00' <--- I've made a click with the left scroll button
?? Input: 11 02 0A 30 00 5B 00 00 50
<< ( 27.790) [11 02 0A30 005B0000500000000000000000000000] '\x11\x02\n0\x00[\x00\x00P\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
>> ( 27.791) [10 02 8F0A 300900] '\x10\x02\x8f\n0\t\x00'
>> ( 33.346) [20 01 0200 0000000000FF0000000000] ' \x01\x02\x00\x00\x00\x00\x00\x00\xff\x00\x00\x00\x00\x00' <--- I've made another click with the button, the response is the same
The output of solaar is also unchanged (but the ID of the mouse is now 1, maybe that's another receiver (I've been playing around)) Does the ID of the mouse make a difference?
Unifying Receiver
Device path : /dev/hidraw0
USB id : 046d:c52b
Serial : CAC49BCA
Firmware : 12.03.B0025
Bootloader : 02.15
Other : AA.AA
Has 1 paired device(s) out of a maximum of 6.
Notifications: wireless, software present (0x000900)
Device activity counters: 1=13
1: M720 Triathlon Multi-Device Mouse
Codename : M720
Kind : mouse
Wireless PID : 405E
Protocol : HID++ 4.5
Polling rate : 8 ms (125Hz)
Serial number: 20864B2E
Bootloader: BOT 34.00.B0004
Firmware: MPM 04.00.B0007
Other:
The power switch is located on the base.
Supports 33 HID++ 2.0 features:
0: ROOT {0000}
1: FEATURE SET {0001}
2: DEVICE FW VERSION {0003}
3: DEVICE NAME {0005}
4: WIRELESS DEVICE STATUS {1D4B}
5: RESET {0020}
6: unknown:0007 {0007}
7: BATTERY STATUS {1000}
8: CHANGE HOST {1814}
9: unknown:1815 {1815}
10: REPROG CONTROLS V4 {1B04}
11: unknown:1C00 {1C00}
12: POINTER SPEED {2205}
13: VERTICAL SCROLLING {2100}
14: DFUCONTROL 2 {00C1}
15: unknown:00C2 {00C2}
16: unknown:1803 {1803} internal, hidden
17: unknown:1806 {1806} internal, hidden
18: unknown:1805 {1805} internal, hidden
19: unknown:1813 {1813} internal, hidden
20: unknown:1830 {1830} internal, hidden
21: unknown:1861 {1861} internal, hidden
22: unknown:1890 {1890} internal, hidden
23: unknown:1891 {1891} internal, hidden
24: unknown:18A1 {18A1} internal, hidden
25: unknown:1DF3 {1DF3} internal, hidden
26: unknown:1E00 {1E00} hidden
27: unknown:1EB0 {1EB0} internal, hidden
28: unknown:18B1 {18B1} internal, hidden
29: unknown:1850 {1850} internal, hidden
30: unknown:1F03 {1F03} internal, hidden
31: unknown:18C0 {18C0} internal, hidden
32: HIRES WHEEL {2121}
Has 9 reprogrammable keys:
0: LEFT CLICK , default: LeftClick => LEFT CLICK
mse, reprogrammable, pos:0, group:1, gmask:1
1: RIGHT CLICK , default: RightClick => RIGHT CLICK
mse, reprogrammable, pos:0, group:1, gmask:1
2: MIDDLE BUTTON , default: MiddleMouseButton => MIDDLE BUTTON
divertable, mse, persistently divertable, reprogrammable, pos:0, group:2, gmask:3
3: BACK AS BUTTON 4 , default: BackEx => BACK AS BUTTON 4
divertable, mse, persistently divertable, reprogrammable, pos:0, group:2, gmask:3
4: FORWARD AS BUTTON 5 , default: BrowserForwardEx => FORWARD AS BUTTON 5
divertable, mse, persistently divertable, reprogrammable, pos:0, group:2, gmask:3
5: LEFT SCROLL AS AC PAN , default: HorzScrollLeftSet => LEFT SCROLL AS AC PAN
divertable, mse, persistently divertable, reprogrammable, pos:0, group:2, gmask:3
6: RIGHT SCROLL AS AC PAN , default: HorzScrollRightSet => RIGHT SCROLL AS AC PAN
divertable, mse, persistently divertable, reprogrammable, pos:0, group:2, gmask:3
7: unknown:00D0 , default: unknown:00AD => unknown:00D0
divertable, mse, persistently divertable, reprogrammable, pos:0, group:2, gmask:3
8: unknown:00D7 , default: unknown:00B4 => unknown:00D7
divertable, virtual, pos:0, group:3, gmask:0
About smooth scrolling: yeah, I think there is just lack of OS support - but I don't like smooth scrolling anyway so that's just fine for me. ;-)
@ABotond can you provide full output of solaar -dd show? May be change 11 02 to 11 01 in commands should fix, but i can't test it - device id on my hardware is fixed
@doctor64
Thank you man!! That was it! Now I owe you a lot of beers...! :)
Anyway, I attach the solar --dd show output.
solaarddshow.txt
I assume, this redirection above has to be done everytime the mouse connects to the computer. Right?
I think so - in my eperiments i found what keys remap survive reboot from win to linux, but reset to default when you power cycle mouse by power switch.
Unfortunately, current solaar template functions not fit for keys remapping and I not a expert in gui programming, but keys remap editor in my todo list... :)
Since I just received my M720 in the mail, I can't experiment on this... but probably you can rebind the tilt keys using xbindkeys and xte.
(In Ubuntu-derived distros, xte is part of the xautomation package.)
@doctor64 So nice to found out you guys found out of stuff about M720, can you maybe share detailed info about what's needed to make the button remap work?
I don't know much about programming as well but I might be able to make a script or something for daily use, thanks!
@dic1911 Soryy, support for button remap feature still in my ToDo list. I just not have own a device there this functionality is needed :) But i promise to try implement this as fast as i have some spare time. :)
See #31 for information on a preliminary implementation of reprogrammable keys and buttons.
Closed by PR #810
Most helpful comment
@dic1911 Soryy, support for button remap feature still in my ToDo list. I just not have own a device there this functionality is needed :) But i promise to try implement this as fast as i have some spare time. :)