Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Disabling touchpad taps by command

  1. #1
    Join Date
    Jan 2009
    Beans
    82

    Disabling touchpad taps by command

    I would like to know how to turn off touchpad taps by command. I turn "click by tapping" off and on throughout the day, depending on what I am doing, and I would like to make it into a keyboard shortcut but I don't know the command.

    Thanks for the help

  2. #2
    Join Date
    Jan 2009
    Beans
    82

    Re: Disabling touchpad taps by command

    bump

  3. #3
    Join Date
    Aug 2008
    Location
    Jawja
    Beans
    2,486
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: Disabling touchpad taps by command

    Have you looked in the Configuration Editor? If you do not have that enabled under Applications/System Tools try opening terminal and entering:
    Code:
    gconf-editor
    From there go to apps/metacity/global-keybindings. You may be able to configure a keyboard shortcut there. I have not messed around with it much but it might do what you are wanting.

  4. #4
    Join Date
    Jan 2009
    Beans
    82

    Re: Disabling touchpad taps by command

    Nothing, thanks for the help though.

  5. #5
    Join Date
    Jan 2009
    Beans
    82

    Re: Disabling touchpad taps by command

    bump

  6. #6
    Join Date
    Oct 2008
    Beans
    3
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Disabling touchpad taps by command

    Ok, a bit of info to start with will help.

    Code:
    xinput list
    To find a list of your devices.

    For me this returns:
    Code:
    ⎡ Virtual core pointer                    	id=2	[master pointer  (3)]
    ⎜   ↳ Virtual core XTEST pointer              	id=4	[slave  pointer  (2)]
    ⎜   ↳ Wacom ISDv4 93 eraser                   	id=11	[slave  pointer  (2)]
    ⎜   ↳ Wacom ISDv4 93                          	id=12	[slave  pointer  (2)]
    ⎜   ↳ Wacom ISDv4 93                          	id=13	[slave  pointer  (2)]
    ⎜   ↳ SynPS/2 Synaptics TouchPad              	id=15	[slave  pointer  (2)]
    ⎜   ↳ Macintosh mouse button emulation        	id=16	[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)]
        ↳ Power Button                            	id=8	[slave  keyboard (3)]
        ↳ Sleep Button                            	id=9	[slave  keyboard (3)]
        ↳ AT Translated Set 2 keyboard            	id=14	[slave  keyboard (3)]
        ↳ CNF7060                                 	id=10	[slave  keyboard (3)]
    With the highlighted line being the one I want.

    Then
    Code:
    xinput list-props <device id>
    e.g.
    Code:
    xinput list-props "SynPS/2 Synaptics TouchPad"
    or
    Code:
    xinput list-props 15
    To bring up a list of properties you can set.

    For example, with my Synaptics touchpad I can issue the command:

    Code:
    xinput set-prop "SynPS/2 Synaptics TouchPad" "Synaptics Tap Time" 0
    To turn off taps, and

    Code:
    xinput set-prop "SynPS/2 Synaptics TouchPad" "Synaptics Tap Time" 180
    To restore it (based on my existing config values).

    Note: you can also replace the device names with the id.

    Code:
    xinput set-prop 15 296 0
    also worked, though I'm not sure if there is any issue with new devices added.

    Let me know if that works. Then you can write a script to detect if it's 'on' or 'off' based on that value and switch it to the other.

  7. #7
    Join Date
    Jan 2009
    Beans
    82

    Re: Disabling touchpad taps by command

    Hi, I got to list-props, then changed the tapping in the GUI from no tap clicking to tap clicking, and noticed this change in list-props


    Code:
    Synaptics Off (285):	1
    
    and
    
    Synaptics Tap Action (289):	0, 0, 0, 0, 0, 0, 0
    became

    Code:
    Synaptics Off (285):	1
    
    and
    
    Synaptics Tap Action (289):	2, 3, 0, 0, 1, 3, 2
    I tried changing it back through terminal, but nothing changed after entering
    Code:
     xinput set-prop 10 285 1
    , but the numbers after "tap action" did change.

    Nevertheless, none of the commands I tried worked.

  8. #8
    Join Date
    Jan 2009
    Beans
    82

    Re: Disabling touchpad taps by command

    I got it

    Code:
    xinput set-prop 10 289 0, 0, 0, 0, 0, 0, 0
    turns it off, and

    Code:
    xinput set-prop 10 289 2, 3, 0, 0, 1, 3, 2
    turns it back on again.

    Now, how about writing that script!

  9. #9
    Join Date
    Jan 2009
    Beans
    82

    Re: Disabling touchpad taps by command

    For the moment, I have the two separate commands set to two separate shortcuts. How do I write the script?

  10. #10
    Join Date
    Oct 2008
    Beans
    3
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Disabling touchpad taps by command

    For future reference,

    Code:
    xinput watch-props <...>
    is also quite useful, will wait for property changes and print to the terminal/stdout.

    But yes, this changes the line that you showed.

    As for the script.

    Now, these values you are changing stand for:

    RT, RB, LT, LB, F1, F2, F3

    Right top, right bottom, left top, left bottom, finger 1,2,3.
    (Source)

    Technically speaking we can change any of these, but we'll just keep it simple.

    Pattern matching and this kind of thing isn't my strong point.. but:
    Code:
    xinput get-props <device> | grep <property>
    returns the relevant line.

    so we can do something like this:

    Code:
    #!/bin/bash
    
    device=10
    property=123
    mode="$(xinput list-props $device | grep $property | cut -d',' -f5)"
    
    if [ $mode -eq "1" ] ;
    then
    xinput set-props $device $property 0, 0, 0, 0, 0, 0, 0
    else
    xinput set-props $device $property 2, 3, 0, 0, 1, 3, 2
    fi
    So this basically checks that the 5th argument (finger 1) is enabled, i.e. set to 1 and changes if not

    save it as something,
    Code:
    chmod +x <filename>
    to make it runnable.

    I'm sure there's a much more elegant script that could be written... but it's functioning.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •