Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Whenever I right click in X, I almost always seem to trigger the first option in the menu unless I am thinking about what I am doing because I:

  • Mouse down; menu appears
  • Accidentally drag mouse 1-3 pixels down and/or to the right
  • Mouse up; menu item selected

Is there any way to tweak this so the menus don't trigger quite so easily? If it matters, I am using Gnome 3/Cinnamon on Gentoo Linux.

share|improve this question
3  
Just an idea: Don't hold the right button down and wait for the menu to appear etc. If you release like in a normal click, the menu stays open and you can move the mouse around, without an item being selected. (Tested with Gnome3) It's probably more of a habit, but it shouldn't be so annoying if people use it your way, with the button pressed. The old X stuff always had that behavior since the menu would vanish as soon as you release the button, no matter if an item was selected or not. –  vasquez Mar 6 '12 at 7:08
1  
@vasquez: I do, but I have a large screen (27", 2560x1440) and my mouse has a high sensitivity to help get across it. It doesn't take much to move it a few pixels, and my habits have been that I tend to click 'on the run' so to speak. I don't normally click-drag to select stuff from a menu, I come from a Windows background for GUI's. –  Matthew Scharley Mar 6 '12 at 10:40
2  
Could adjusting the GTK3 theme be an option? I.e. create a wider inner spacing of the popup (context) menu such that the outer 3 pixels of the menu do not react to clicking. GTK3 supports theming via CSS, so this might be possible (and not too difficult). –  sr_ Mar 6 '12 at 11:16
    
@sr_: Interesting idea. I'll look into it if there's not other answers by tomorrow, but don't have time tonight. –  Matthew Scharley Mar 6 '12 at 11:18
1  
Do you know what, Id love to see this answer. This annoys the crap out of me as well. –  whoami Mar 6 '12 at 14:36

5 Answers 5

The GUI theme can make a big difference here. Right now the Desktop/Workspace theme combination I use draws context menus with an inactive "border" area which I estimate to be probably about 5 pixels wide. I assume the that theme sets for other desktop environments have similar variations. You HAVE to move the pointer past this inactive area before you can (accidentally) activate an option.

share|improve this answer

I think @Johan gave good answers. One other thing to add is that you might try gconf-editor, which controls settings for Gnome. It's probably accesible under something like "System Settings", or you can start it from the terminal.

share|improve this answer
    
Thank you @hunter2 ... I have connected various USB and other pointer devices since writing that answer and it turns out most of them have vastly limited tunable options. This may be fixable by identifying the specific device, eg through a detailed driver/settings in xorg.conf. Sadly that unfortunately doesn't happen automatically on my operating system (Kubuntu 12.10) –  Johan Apr 3 '13 at 9:32

If you set the SystemSettings>Mouse (or something similar), you can modify the mouse sensitivity, the drag and drop threshold, and double click time-out.

share|improve this answer

If you are looking for a Desktop Environment agnostic solution, have a look at xinput.

To obtain the names and IDs of your known X input devices, first run

xinput --list

You will see output somethin like this:

~$ xinput --list
⎡ Virtual core pointer                          id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ SynPS/2 Synaptics TouchPad                id=11   [slave  pointer  (2)]
⎣ Virtual core keyboard                         id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ Power Button                              id=6    [slave  keyboard (3)]
    ↳ Video Bus                                 id=7    [slave  keyboard (3)]
    ↳ Sleep Button                              id=8    [slave  keyboard (3)]
    ↳ HP HD Webcam [Fixed]                      id=9    [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard              id=10   [slave  keyboard (3)]
    ↳ HP WMI hotkeys                            id=12   [slave  keyboard (3)]

Below each master device is a number of slave devices. Identify the slave device which you use by the descriptive name. I would select the Synaptics Touchpad as that is what I use, but you would select your mouse or any other pointer device that you have.

Now list the properties on that device - you may use either the device name (in quotes) or the ID

xinput --list-props DEVICE

for example

~$ xinput --list-props 11
Device 'SynPS/2 Synaptics TouchPad':
        Device Enabled (132):   1
        Coordinate Transformation Matrix (134): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
        Device Accel Profile (254):     1
        Device Accel Constant Deceleration (255):       2.500000
        Device Accel Adaptive Deceleration (256):       1.000000
        Device Accel Velocity Scaling (257):    12.500000
        Synaptics Edges (258):  1767, 5395, 1649, 4613
        Synaptics Finger (259): 25, 30, 256
        Synaptics Tap Time (260):       180
        Synaptics Tap Move (261):       239
        Synaptics Tap Durations (262):  180, 180, 100
        Synaptics ClickPad (263):       0
        Synaptics Tap FastTap (264):    0
        Synaptics Middle Button Timeout (265):  75
        Synaptics Two-Finger Pressure (266):    282
        Synaptics Two-Finger Width (267):       7
        Synaptics Scrolling Distance (268):     100, 100
        Synaptics Edge Scrolling (269): 0, 0, 0
        Synaptics Two-Finger Scrolling (270):   0, 0
        Synaptics Move Speed (271):     1.000000, 1.750000, 0.039800, 40.000000
        Synaptics Edge Motion Pressure (272):   30, 160
        Synaptics Edge Motion Speed (273):      1, 435
        Synaptics Edge Motion Always (274):     0
        Synaptics Off (275):    0
        Synaptics Locked Drags (276):   0
        Synaptics Locked Drags Timeout (277):   5000
        Synaptics Tap Action (278):     0, 0, 0, 0, 0, 0, 0
        Synaptics Click Action (279):   1, 1, 0
        Synaptics Circular Scrolling (280):     0
        Synaptics Circular Scrolling Distance (281):    0.100007
        Synaptics Circular Scrolling Trigger (282):     0
        Synaptics Circular Pad (283):   0
        Synaptics Palm Detection (284): 0
        Synaptics Palm Dimensions (285):        10, 200
        Synaptics Coasting Speed (286): 20.000000, 50.000000
        Synaptics Pressure Motion (287):        30, 160
        Synaptics Pressure Motion Factor (288): 1.000000, 1.000000
        Synaptics Resolution Detect (289):      1
        Synaptics Grab Event Device (290):      1
        Synaptics Gestures (291):       1
        Synaptics Capabilities (292):   1, 0, 1, 1, 1, 1, 1
        Synaptics Pad Resolution (293): 74, 40
        Synaptics Area (294):   0, 0, 0, 0
        Synaptics Noise Cancellation (295):     8, 8
        Device Product ID (249):        2, 7
        Device Node (250):      "/dev/input/event8"

You are going to have to play around with values on different properties. It realy depends on what options your device provides. You will need to read through the list and try to identify which ones are related to sensitivity.

Loking at my device, I notice items like Tap Time, Tap Move, FastTap etc that looks, to me, to be related to sensitivity.

Generally you will do

xinput --set-prop DEVICE PROPERTY VALUE. The man page explains it like this:

--set-prop [--type=atom|float|int] [--format=8|16|32] device property value [...] Set the property to the given value(s). If not specified, the format and type of the property are left as-is. The arguments are interpreted according to the property type.

Example

xinput --set-prop 11 261 250

This will set Device 11 Property 261 to the value of 250.

You can also use the long format, specify each property "name", eg

~$ xinput --set-prop "SynPS/2 Synaptics TouchPad" "Synaptics Off" 1

Note, the above example turns the touchpad off. Setting it back to "0" turns it back on.

share|improve this answer
    
The question is about a mouse, not a touchpad. –  Michael Hampton Feb 21 '13 at 7:54
    
@MichaelHampton There is no difference in how xinput handles the one over the other. I used the touchpad as an example since that is what I have. I will add a comment in the answer to clarify this. –  Johan Feb 21 '13 at 8:39
    
There's no difference to xinput, sure. But the mouse isn't going to have any relevant settings here. –  Michael Hampton Feb 21 '13 at 8:54
    
The point is you use xinput to adjust pointer settings. Either you don't understand what I said or I don't understand your issue. –  Johan Feb 21 '13 at 15:03

You asked about how to do this in "X" but this setting is typically controlled through a desktop environment utility. In KDE you have mouse settings. If your K-menu doesn't find it for you when you simply type "mouse" you can start it by

a) K-menu -> Computer -> System Settings -> Input Device (Under Hardware) -> Mouse

or

b) At a command prompt, in a terminal, or other Run Menu, enter the command "systemsettings" and select Input Device in the Hardware section

Look at the "Advanced Tab" in KDE Mouse Settings and adjust the Adjust the Pointer Threshold, Drag Delay Time and Drag Distance. Increase the values to make it less sensitive.

There are similar utilities in every other desktop environment I have ever used.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.