A4Tech x7 Mouse - remap DPI Button! (models A4Tech F4, A4Tech X-710BK)

Post your working scripts, libraries and tools
Posts: 4
Joined: 14 Jun 2018, 05:44

A4Tech x7 Mouse - remap DPI Button! (models A4Tech F4, A4Tech X-710BK)

14 Jun 2018, 07:12

You can't rebind DPI Button in Oscar Mouse Editor. I searched far and wide for complete AHK solution, but I got only topic where people ask the same question, without answers. Well, no more! Solution is here!

Tested and works with A4Tech F4, A4Tech X-710BK (old and new versions with rectangular sensor hole and circular hole). For any other A4Tech x7 mouse (or other version of the same model), you need to modify the code.

YOU STILL NEED OSCAR! You need to disable all DPI modes except the first one, and change first mode's DPI to match your preference. That way, clicking DPI button won't change your mouse's DPI.
You can also disable default triple click button action in Oscar, if that's what you want.

Code: [Select all] [Expand] [Download] (a4techBtn6and7.ahk)GeSHi © Codebox Plus

How to install:
1) Go here, right click on "Download", and select "Save object as...". Save AHKHID.ahk to preferred folder.
2) Save code from above codebox in same folder, file extension must be ".ahk".
3) Double click on saved file (from step 2)

How to remap:
By default it remaps DPI button to Home key. You can change it in ON_BTN_DPISHIFT part of code.

How to add your own a4tech x7 mouse model:
1) Download Example 1 and Example 2 from this topic and save them to same folder you saved AHKHID.ahk
2) Open both files with your editor and add #include AHKHID.ahk as a first line. Save both files.
3) Execute Example1.ahk and Example2.ahk by doubleclicking them.
4) Refer to this screenshot to figure out needed variables.
5) Copypaste Model a4tech F4 block after ;insert here block for your own mouse model, then change variables to the ones you figured out at step 4). You need to change VendorID, ProductID, VersionNumber, btnDataByte, DPIModeDataByte, flagBtnDPIShift.
6) Done

Feel free to ask here if you have any difficulties.

Return to “Scripts and Functions”

Who is online

Users browsing this forum: No registered users and 16 guests