Saturday, April 20, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 721  / 1 Year ago, fri, february 17, 2023, 1:42:41

Can I change setting so that the the mouse double-clicks by holding down the primary mouse button? I do not want hover-click.


More From » mouse

 Answers
0

It's easy if you're willing to modify one little line in the source ;)




  • Get the mousetweaks source (apt-get source mousetweaks)

  • Get its build dependencies (sudo apt-get build-dep mousetweaks and then sudo apt-get install build-essential dpkg-dev fakeroot)

  • Inside the file mousetweaks-3.4.1/src/mt-main.c, around line 375 (may differ for you) find this bit:




    static void
    mt_main_do_secondary_click (MtData *mt)
    {
    mt->ssc_finished = FALSE;
    mt_main_generate_button_event (mt, 3, CLICK, CurrentTime);
    }

  • Change part in parentheses in the bolded line to (mt, 1, DOUBLE_CLICK, 40)




    • This modifies the code so that the "simulated secondary click" becomes a "simulated primary double click" instead ;)


  • From within the mousetweaks-3.4.1 directory, run dpkg-source --commit, and name your patch anything (it doesn't matter)


  • Then run dpkg-buildpackage -us -uc and wait for a bit...

  • You will find the appropriate mousetweaks*.deb file in the parent directory. Install it with sudo dpkg -i, enable the "simulated secondary click option, set the time, and enjoy! (note: the double-click occurs when you release the held button...)


  • Please add in the comments if you have any problem modifying/building the package.



[#37544] Friday, February 17, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
epypian

Total Points: 130
Total Questions: 111
Total Answers: 113

Location: Romania
Member since Mon, Jun 6, 2022
2 Years ago
;