Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14

Thread: Disabling touchpad taps by command

  1. #11
    Join Date
    Mar 2011
    Beans
    70

    Re: Disabling touchpad taps by command

    The solution can be achieved without scripts:
    + While you hold the ALT key push F2
    + Put gnome-keybinding-properties and push enter key
    + Click on Add
    + In Name put mouse_clicks_off
    + In Command put synclient MaxTapTime=0
    + Click on Apply
    + Click on Disabled under Shortcut
    + Hold CTRL key and push 7
    + Click on Add
    + In Name put mouse_clicks_on
    + In Command put synclient MaxTapTime=180
    + Click on Apply
    + Click on Disabled under Shortcut
    + Hold CTRL key and push 8
    + Click on Close

    Now CTRL+7 disables mouse clicks with touchpad and CTRL+8 enables them.

    Instead of synclient MaxTapTime=0 we can use synclient TapButton1=0 TapButton2=0 TapButton3=0
    And instead of synclient MaxTapTime=180 we can use synclient TapButton1=1 TapButton2=3 TapButton3=2
    We can use also/instead the xinput commands shown in previous posts.

    All these commands can be run from the Run dialog (ALT+F2), without using scripts nor gnome-keybinding-properties.

    NB: in the previous post, instead of
    Code:
    xinput get-props <device> | grep <property>
    it should say
    Code:
    xinput list-props <device> | grep <property>

  2. #12
    Join Date
    Mar 2011
    Beans
    70

    Re: Disabling touchpad taps by command

    I've tried the script by sam_scott89. It works if you solve a couple of problems:

    a) Where it says device you have to put the number of your particular case (10 for jjjjeremy, 12 for me). The same for property (289 for jjjjeremy, 313 for me).
    b) It says twice:
    Code:
    xinput set-props
    But it should say:
    Code:
    xinput set-prop
    So the code for jjjjeremy should be:
    Code:
    #!/bin/bash
    
    device=10
    property=289
    mode="$(xinput list-props $device | grep $property | cut -d',' -f5)"
    
    if [ $mode -eq "1" ] ;
    then
    xinput set-prop $device $property 0, 0, 0, 0, 0, 0, 0
    else
    xinput set-prop $device $property 2, 3, 0, 0, 1, 3, 2
    fi
    For me is:
    Code:
    #!/bin/bash
    
    device=12
    property=313
    mode="$(xinput list-props $device | grep $property | cut -d',' -f5)"
    
    if [ $mode -eq "1" ] ;
    then
    xinput set-prop $device $property 0, 0, 0, 0, 0, 0, 0
    else
    xinput set-prop $device $property 2, 3, 0, 0, 1, 3, 2
    fi
    You can place the script inside /usr/bin (as administrator or root) so you can call it from a keyboard shortcut (gnome-keybinding-properties)

  3. #13
    Join Date
    Jan 2009
    Beans
    82

    Re: Disabling touchpad taps by command

    Thanks for post #11. Works for me!

  4. #14
    Join Date
    Mar 2011
    Beans
    70

    Re: Disabling touchpad taps by command

    Congratulations!

    GNOME can do this via GConf. This makes an easier script possible, without having to make previous inquiries:

    Code:
    #!/bin/bash
    
    mode="$(gconftool-2 -g /desktop/gnome/peripherals/touchpad/tap_to_click)"
    
    if [ $mode == "true" ] ;
    then
    gconftool-2 -s -t bool /desktop/gnome/peripherals/touchpad/tap_to_click false
    else
    gconftool-2 -s -t bool /desktop/gnome/peripherals/touchpad/tap_to_click true
    fi
    NB: you can place the script wherever you want, but if you do it normally you have to put the location of it before its name in gnome-keybinding-properties. If you place it inside /usr/bin (as administrator or root) you don't need to put the location, just the name.

    NB2: The text "Instead of synclient MaxTapTime=0 we can use synclient TapButton1=0 TapButton2=0 TapButton3=0", to be more precise should be:
    Instead of synclient MaxTapTime=0 we can use synclient RTCornerButton=0 RBCornerButton=0 TapButton1=0 TapButton2=0 TapButton3=0

    NB3: The text "And instead of synclient MaxTapTime=180 we can use synclient TapButton1=1 TapButton2=3 TapButton3=2", to be more precise should be:
    And instead of synclient MaxTapTime=180 we can use synclient RTCornerButton=2 RBCornerButton=3 TapButton1=1 TapButton2=3 TapButton3=2

Page 2 of 2 FirstFirst 12

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
  •