Cobra Forum

Other Discussion and Support => Assistive Technology & Accessibility => Topic started by: kalpana on Nov 10, 2023, 04:01 AM

Title: Adjusting the mouse double-click for gtk apps
Post by: kalpana on Nov 10, 2023, 04:01 AM
A double-click with the mouse is two single clicks within a certain interval. If the interval is too short, some people may have difficulty in double-clicking.

The interval can be adjusted for gtk2 and gtk3 apps and possibly for your window manager.

For gtk2 apps:

You may have a pre-existing text file called ~/.gtkrc-2.0. It should have a line like this:
Code:
include "/home/your_login_name/.gtkrc-2.0.mine"
If such a line doesn't exist, add it at the top of the file. Save the file and exit the editor.

If you don't have ~/.gtkrc-2.0, create it with a plain text editor and only add the same line and save the file and exit the editor.

Next, create the plain text file called /home/your_login_name/.gtkrc-2.0.mine. In this file, add this single line:
Code:
gtk-double-click-time=1000
Save the file and exit the editor. What this line tells gtk2 apps is to consider two clicks within 1 sec (1000 milliseconds) as a double-click. If you don't like 1000, replace it with a lower value.

All gtk2 apps opened subsequent to editing and saving .gtkrc-2.0.mine will accept the new double-click interval.

For gtk3 apps:
See if /home/your_login_name/.config/gtk-3.0/settings.ini exists. If it doesn't exist or the gtk-3.0 folder doesn't exist, create the folder and file as needed. If settings.ini exists, add this line:
Code:
gtk-double-click-time=1000
to the end of the file using a plain text editor. Save and exit the editor.

If settings.ini doesn't exist, copy over the file of the same name from /etc/gtk-3.0 and then edit the file to have the line above.

For your window manager:
My window manager, Openbox, can be set to maximize a window by double-clicking in the title bar or to "roll up" (or shade) a window. Here too the double-click interval can be set. I would expect that other window managers have something similar.

The above obviously is user-specific. I think if one wants system-wide changes, one could edit /etc/gtk-3.0/settings.ini and /usr/share/chosen_theme/gtk-2.0/gtkrc.