init-gmouse
init-gmouse copied to clipboard
Multifunctional Button Function
Hello! Thanks for your amazing work. Now, I have a question. I have compiled the app and run
a4tech init
and now the multifunctional button is completely disabled: even pressing it in xev
window doesn't print anything to the console.
Is there any way to bind it to double clicking?
My mouse model is G10-700F.
Oh, I have'nt done this part of code - double clicking is maked as script. Well, try to set this on windows and plug off receiver, shutdown windows, plug in and boot to linux. A4Tech utility while closing sends to receiver erase command for this button.
2014/1/20 gxoptg [email protected]
Hello! Thanks for your amazing work. Now, I have a question. I have compiled the app and run
a4tech init
and now the multifunctional button is completely disabled: even pressing it in xev window doesn't print anything to the console. Is there any way to bind it to double clicking?
— Reply to this email directly or view it on GitHubhttps://github.com/Marisa-Chan/init-gmouse/issues/6 .
OK, thank you! I'll try to do it.
On 20 January 2014 13:53, Anton (Zidane) [email protected] wrote:
Oh, I have'nt done this part of code - double clicking is maked as script. Well, try to set this on windows and plug off receiver, shutdown windows, plug in and boot to linux. A4Tech utility while closing sends to receiver erase command for this button.
2014/1/20 gxoptg [email protected]
Hello! Thanks for your amazing work. Now, I have a question. I have compiled the app and run
a4tech init
and now the multifunctional button is completely disabled: even pressing it in xev window doesn't print anything to the console. Is there any way to bind it to double clicking?
— Reply to this email directly or view it on GitHub< https://github.com/Marisa-Chan/init-gmouse/issues/6> .
— Reply to this email directly or view it on GitHubhttps://github.com/Marisa-Chan/init-gmouse/issues/6#issuecomment-32753518 .
I'm trying to make the extra button work in a g9-730fx. a4tool init succeeds in disabling the url pasting, but the button stops working completely. It won't register at all on xev. The button is setup as wheel button on a windows VM, and it works fine inside.
I logged the exchange between the mouse and a4tech office shuttle software, to try to replicate it. I started logging when office shuttle boots. Previously, I had to modify a4_dongle_write to allow custom masks, wlenght and language_desc.
In the end, both office shuttle and a4tool init resulted in same packet exchange, but the button still did nothing. Even after setting the mouse correctly in a windows VM, and closing the VM to free the mouse, the button still does nothing. Checking the logs it seems every time I press the button, either on linux or windows, the keyboard sends 3 interrupt packets, with values:
Leftover Capture Data: 04832d400000400480 Leftover Capture Data: 04832d400000400480 Leftover Capture Data: 0407c95d010000f280
The mouse does not send any packages when touching the button, it's the same on linux and windows (with shuttle open). But windows seems to answer to each of those packages with a a4_btnmask_set(dev,0xFFBF).
It seems my mouse, even when correctly configured does not send a "Wheel button" usb packet, it just sends those 3 packets through the keyboard device and sends the url unless shuttle responds with ffbf.
Would I have to modify the kernel driver so that I can listen for those packets and fire the button call? How would I go about doing that? Can I set a service which listens to the USB device and presses the button without altering the connection the mouse has with the kernel?
Any information or help would be awesome, thanks!
Can you capture packets in pcap format (wireshark can do it) for moment when mouse software enable needed mouse buttons?
Sure! This is what I've got so far:
- windows-shuttle.pcap: This is the file you asked for, it contains a log of what happens when you open shuttle software, with mouse connected.
- windows-button.pcap: This log is what happens when extra button is pressed (wheel is pressed on windows).
- linux-init.pcap: This is what I got working on linux after copying the exchange with shuttle software, it looks the same to me, but maybe there's a difference somewhere.
- linux-button.pcap: This is what happens when I click the extra button on linux, after running my modified a4tool init.
Everything is inside logs.zip. There is some noise before and after the important parts, because I had to alt tab with another keyboard (device 1.8) to start and stop the logs and open shuttle software.
Also can you try to dump firmware? I will compare it with my. Did you tried interrupt "shuttle" software "deinit" on app close? - eject dongle or just detach it from VM? A4 tech software can overwrite mouse button action on every start/close of app.
Sure, I attached the firmware file.
I tried disconnecting the port, shutting down the vm with the other keyboard/mouse, and then connecting again. My mouse always does the URL when it's first connected, it's as if it has no memory at all. I also tried with a real windows install, disconnecting the dongle and restarting the computer with the hardware restart button, same result.
And after of disconnect/detach you tried do "a4tool init"? Also this mouse button continues work in windows if you "kill" shuttle software from process manager?
Firmware parts with bit comparison are not different and "a4tool init" must enable button if real profile is contained in mouse. It's may be overwritten in mouse on program exit or for this button software does not do any real programming - only software action emulation after receive some events from pressing of this button.
Hmm, try any other software with your mouse. Like 16 in one or 8 in one, because I didn't sure shuttle is doing any real programming of the button.
And after of disconnect/detach you tried do "a4tool init"?
Yes, I tried running a4tool init after connecting the mouse after disconnecting it from windows, both the "vainilla" version, and the one I modified to send same packets as office shuttle. Neither work.
Also this mouse button continues work in windows if you "kill" shuttle software from process manager?
It doesn't, the button dies as soon as office shuttle dies. I think you're right, office shuttle is not actually writing anything to the mouse. It's just listening to the usb device somehow, and scripting the button press or extra functions.
I tried 8in1 and 16in1, but they don't do anything for the extra key on my mouse, which is named Office shuttle key, and is not affected by 4th or 5th button configs. G10 multi mode software does not detect mouse (seems it asks specifically for a G10 and won't take a G9).
If the firmware is the same, could that mean that If I cheated the "multi mode" software to think it was a G10, then maybe it will load the data into the mouse? Maybe they don't support the write to mouse feature, but it's still there working.
If that's not possible, can I have the logs from when you connect your mouse on windows? Maybe I can reproduce it.
Try to google translate this post https://forum.ixbt.com/topic.cgi?id=13:46671 Hope this helps you
Yes! Thanks a lot, it's working now. I did not know about the modified software.
I downloaded the G10 editor from that link (used G10-Editor.exe, not the alternaties). I set up the mouse the way I wanted, restarted and now the button works in linux. I can disconnect and re-connect the device, and a4tool init disables the url pasting and enters into "profile mode". Profile switching also works flawlessly.
I was expecting to need a custom kernel driver or something like that. I will try to log the exchange with the mouse, and maybe add some basic profile editing.
Thanks again!
Hello. Thanks a lot. Now, I have a question! How to change the function key to the middle key? Double click instead
Unfortunately this functional does not implemented because it potential may damage firmware and too complex. But you may program it in windows(virtualbox with usb passtrough works too)
пт, 4 сент. 2020 г., 18:06 Pooya Dustdar [email protected]:
Hello. Thanks a lot. Now, I have a question! How to change the function key to the middle key? Double click instead
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Marisa-Chan/init-gmouse/issues/6#issuecomment-687078561, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADJLFOZS67BAEQYDJTPL73SEDCZ5ANCNFSM4ALL3TLQ .
Here is my case:
I had G10-810FS mouse with an RN-10B dongle. It worked perfectly. I set up my custom profiles in G10 multi mode and all the button's functions, including multifunctional (extra / dual key / office shuttle key) button, were written to the dongle, and it worked properly and fine on any PC and OS without G10 multi mode or a4tool or any other software... until i lost the dongle.
I bought another mice: G10-770H with the same dongle: RN-10B, but... The multifunctional button resets to the url open function every time (with both mice, regardless of which one). The other buttons keep their profiles.
So this RN-10B dongle is not really the same as the RN-10B dongle from the G10-810FS mouse.
In fact, I can't even find the G10-770H model on the official website... http://www.a4tech.com/driverListByCategory.aspx?keyword=g10
I will try to watch for changes in G10 Multi Mode. It's also be nice if you try to make a dump so I can check it also internal.
I don't know how to dump
But i found a strange thing:
I made 4 profiles for testing Multifunctional button in G10 Multi-mode (modified version):
- button setted to Office Double-click (from Office dropdown list)
- button setted to macro Double-click (from macro dropdown list)
- button setted to Office Triple-click (from Office dropdown list)
- button setted to macro Triple-click (from macro dropdown list)
And here is what i found:
In Windows after launch & kill G10 Multi-mode (modified version):
- Double-click doesn't works ❌️ (as expected)
- Double-click works ✅️ (as expected)
- Triple-click doesn't works ❌️ (as expected)
- Triple-click works ✅️ (as expected)
(all as expected)
In Linux after launch a4tool init
:
- Double-click doesn't works ❌️ (as expected)
- Works as single Left click ❓️
- Triple-click doesn't works ❌️ (as expected)
- Triple-click works ✅️ (as expected)
So looks like macros actually works on Linux, but there is something wrong with Double-click macro
(By the way, with the dongle from the G10-810FS mouse, that I lost, I always used Office Double-click for Multifunctional button in official G10 Multi-mode and it always worked fine on any OS without any software needed)
I found a solution!
I visually compared the two macros in macro editor: Double-click and 3XFIRE.
The key point was the Delay
time between clicks.
In the Double-click macro it was 16 Millisecond
, while in the 3XFIRE macro it was 64 Millisecond
.
Maybe due to some mouse settings in Linux the 16 Millisecond
delay didn't work.
So I tuned the Double-click macro increasing the Delay
up to 64 Millisecond
and now it works for me on Linux (via a4tool init
):
Thanks for a4tool
Hi, made a couple of install scripts, and also udev rule and systemd service.
The main is install.sh
It installs all files like specified in README.MD,
plus it calls install-udev-rules-all-in-one-file.sh
to install one more udev rule for init on replug,
plus it calls install-systemd-service-on-resume.sh
to install systemd service to init on resume state (after suspend)
plus it calls install-systemd-service-on-startup.sh
to install systemd service to init on system startup.
Other install scripts just for your choice, they are not involved.
https://fars.ee/pXCK.tar.gz
+++
+├── install.sh
+├── install scripts
+│ ├── install-daemon-in-userspace-autostart.sh
+│ ├── install-extra-button-init-udev-rule.sh
+│ ├── install-group-permission-udev-rule.sh
+│ ├── install-init-in-userspace-autostart.sh
+│ ├── install-systemd-service-on-resume.sh
+│ ├── install-udev-rules-all-in-one-file.sh
+│ └── install-udev-rules-in-separate-files.sh
+├── systemd
+│ └── run-on-resume.service
+└── udev
+ └── 11-a4tech-usb-devices.rules
+++