How to disable laptop trackpad touchpad? [Solved]

Forum Forums New users New Users and General Questions How to disable laptop trackpad touchpad? [Solved]

  • This topic has 38 replies, 9 voices, and was last updated Feb 18-4:25 pm by marcelocripe.
Viewing 15 posts - 1 through 15 (of 39 total)
  • Author
    Posts
  • #99549
    Member
    spaz

      Hi All.
      No posts on this forum about this question that I can see.
      Is there a GUI method to disable / toggle laptop trackpad / touchpad?
      The touchpad / trackpad is typically more of hindrance than a help to me.
      Occassionally useful, but it is sensitive enough to keep flicking the cursor around while I type, setting my typing in various places in a document while I type. Quite annoying. It would be good to have a fast way to enable / disable / toggle touchpad.
      I know it can be done via terminal somehow, but for sake of speed would be nice if there is a GUI option on this?
      My laptop has a pointstick too, and I would prefer to stick to using only this most of the time.
      Thanks.

      • This topic was modified 1 year, 5 months ago by spaz.
      #99551
      Member
      afghan

        I use synclient utility.

        # turn off
        synclient TouchpadOff=1
        # turn on
        synclient TouchpadOff=0

        Beware of people who knows nothing; they are the ones that won't know that they know nothing.

        #99552
        Member
        Robin

          Not a GUI method, but a command line method. Forum search Forum search will come up with e.g. some hints like that:
          How to disable laptop touchpad

          And from this post you can learn how to bind the command to an unused button-combination of your keyboard, so you’ll need to press a single button only to activate/deactivate the touchpad in an instant. Would that method perform action speedy enough?

          Windows is like a submarine. Open a window and serious problems will start.

          #99576
          Member
          techore

            spaz, does your laptop have a key to toggle the touchpad? Even if it doesn’t, you can assign a key combo to execute a script to toggle the touchpad on and off.

            Here is the one I use.

            http://gitlab.com/techore/antix-dwm/-/blob/main/file/bin/touchpad-toggle.sh

            #!/usr/bin/env bash
            # Project: antix-dwm
            # Location: /usr/local/bin/toggle-touchpad.sh
            # Dependency: xinput
            # Description: Simple script to enable or disable touchpad and
            # send a desktop notification using libnotify.
            # Usage: dwm calls on use of XF86XK_TouchpadToggle 
            SEND_NOTIFICATION=true
            declare -i ID
            ID=<code>xinput list | grep -Eio '(touchpad|glidepoint)\s*id\=[0-9]{1,2}' | grep -Eo '[0-9]{1,2}'</code>
            declare -i STATE
            STATE=<code>xinput list-props $ID|grep 'Device Enabled'|awk '{print $4}'</code>
            if [ $STATE -eq 1 ]; then
                xinput disable $ID
                echo Touchpad disabled.
                notify-send 'Touchpad disabled' -t 3000
            else
                xinput enable $ID
                echo Touchpad enabled.
                notify-send 'Touchpad enabled' -t 3000
            fi

            At some point, I will get around to creating a script that identifies if a mouse is connected and disabled the touchpad. On my “To do” list.

            • This reply was modified 1 year, 5 months ago by techore.
            #99638
            Member
            spaz

              afghan :
              Thank you!
              I know I asked for GUI, but I have to say, I love this synclient utility!
              I have never heard of it, but it is great. Thank you!
              ##############
              robin ::
              THANKS! (:
              That is even handier! I DID search the forum – and got no results – however I think I searched for “trackpad” which does indeed give no results.
              Sorry, this was my bad. Lazy tired searching.

              I LOVE the post for binding to a keyboard combo. I am very keyboard shortcut driven.
              It’s my favourite way to drive.
              That post will help me out very much!
              ##############
              techore :
              Same as for robin :
              AWESOME! Thank you, I love these keybinding methods.
              No, I do not have a built in toggle key (I haven’t seen this on a lappie before),
              but I will certainly be using these key combo bindings.
              ##############
              Everybody :
              Thank you!
              The keybindings are even better (MUCH BETTER) than the GUI option.
              I’m now also mostly convinced I should have searched harder and done more research before bothering you all.
              Please consider this question ticket closed.
              Pardon my slack response, work is kicking my bum. Tired.

              I love these forums (:
              Thanks again everybody!

              #99639
              Member
              PPC

                Partly off topic:

                Untested script to turn of touchpad is a mouse is plugged in and turn it back on once it’s unplugged (inspired by this thread and http://askubuntu.com/questions/819300/bash-how-to-look-for-a-mouse-in-bash:

                #!/usr/bin/env bash
                declare -i ID
                ID=<code>xinput list | grep -Eio '(touchpad|glidepoint)\s*id\=[0-9]{1,2}' | grep -Eo '[0-9]{1,2}'</code>
                if [ -n "$(ls /dev/input/by-id/*mouse 2>/dev/null | grep -i 'usb\|PS\|COM')" ]
                then echo "antiX found a mouse, disabling touchpad"
                 xinput disable $ID
                else 
                 echo "No mice around, trying to enable touchpad"
                 xinput enable $ID
                fi
                #99645
                Member
                marcelocripe

                  Hello techore and PPC.

                  Which of the two programs to disable the touchpad can we implement the translation features and still create a .desktop file?

                  – – – – –

                  Olá techore e PPC.

                  Qual dos dois programas para desativar o touchpad nós podemos implementar os recursos de tradução e ainda criamos um arquivo .desktop?

                  #99646
                  Member
                  techore

                    I’m now also mostly convinced I should have searched harder and done more research before bothering you all.

                    There is no hard rule on how long to hunt and the right search criteria. If you make an effort and get stuck, ask for help. We are a community and we are here to help.

                    @spaz, great question and topic!

                    #99648
                    Member
                    techore

                      Hello techore and PPC.

                      Which of the two programs to disable the touchpad can we implement the translation features and still create a .desktop file?

                      I (would) use both. They serve two different uses, really. For example, I will disable the touchpad with or without a mouse. On the script to disable the touchpad when using a mouse, it should be an option not enabled by default so to avoid confusing new users.

                      A third touchpad feature to consider is disabling the touchpad when typing for X seconds to avoid palm selection and accidental deletion. Another item, on my “To do” list.

                      #99649
                      Member
                      techore

                        Untested script to turn of touchpad is a mouse is plugged in and turn it back on

                        Nice! I’ll give this a test. Thank you, @PPC.

                        #99651
                        Moderator
                        caprea

                          to consider is disabling the touchpad when typing for X seconds

                          it’s easily done with syndaemon

                          #!/bin/bash
                          #turns off touchpad while typing#
                          syndaemon -i 3 -d

                          It’s also enough to put this into /.desktop-session/startup file to get the touchpad disabled while typing.
                          syndaemon -i 3 -d

                          #99652
                          Member
                          techore

                            @caprea, not all touchpads are synaptic. Does your script work for non-synaptic touchpads? I don’t even have xf86-input-synaptics installed.

                            #99653
                            Moderator
                            caprea

                              syndaemon is part of xserver-xorg-input-synaptics, which is installed by default on antix base/full.

                              You are using core.Of course, this is a completely different game.

                              #99654
                              Member
                              marcelocripe

                                I (would) use both. They serve two different uses, really.

                                I haven’t been able to test your script yet. But if I understood correctly, when it runs it disables the touchpad, when it runs again it turns the touchpad on. This is the best case scenario as the user chooses when to disable or enable the touchpad.

                                The phrases to be translated are these ‘Device Enabled’, “Touchpad disabled.” and “Touchpad enabled.”? Which phrases will be displayed in the graphical interface?

                                Can they be given the double quotes and a dollar sign “$”, without damaging the programming code? For example:

                                $’Device Enabled’

                                echo $”Touchpad disabled.”

                                echo $”Touchpad enabled.”

                                A third touchpad feature to consider is disabling the touchpad when typing for X seconds to avoid palm selection and accidental deletion. Another item, on my “To do” list.

                                If this option is to be included in the script, it would be interesting to have this information in the graphical interface.

                                I hope Spaz doesn’t get upset that we use this thread to continue the details of the script.

                                – – – – –

                                I (would) use both. They serve two different uses, really.

                                Eu ainda não pude testar o seu script. Mas se eu consegui compreender corretamente, quando ele é executado desativa o touchpad, quando ele é executado novamente, ele ativa o touchpad. Este é o melhor cenário possível, pois o usuário escolhe quando desativar ou ativar o touchpad.

                                A frases para serem traduzidas são estas ‘Device Enabled’, “Touchpad disabled.” e “Touchpad enabled.”? Quais frases serão exibidas na interface gráfica?

                                Elas podem ser receber as aspas duplas e um sinal de cifrão “$”, sem danificar o código de programação? Por exemplo:

                                $’Device Enabled’

                                echo $”Touchpad disabled.”

                                echo $”Touchpad enabled.”

                                A third touchpad feature to consider is disabling the touchpad when typing for X seconds to avoid palm selection and accidental deletion. Another item, on my “To do” list.

                                Se esta opção for entrar no script, seria interessante que houvesse esta informação na interface gráfica.

                                Eu espero que o Spaz não fique chateado de utilizarmos este tópico para darmos continuidade aos detalhes do script.

                                #99655
                                Member
                                techore

                                  The phrases to be translated are these ‘Device Enabled’, “Touchpad disabled.” and “Touchpad enabled.”?

                                  I don’t know if you can translate “Device Enabled” for it comes from xinput. I have no idea what the output is for non-English systems. Easy enough to test.

                                  I did a quick test for the Touchpad enabled/disabled.

                                  $ TOUCHPAD_en="Touchpad"
                                  $ TOUCHPADSTATE_en="Enabled"
                                  $ notify-send "$TOUCHPAD_en $TOUCHPADSTATE_en" -t 3000

                                  On execution, dunst notifies, so it does work.

                                  • This reply was modified 1 year, 5 months ago by techore.
                                  Attachments:
                                Viewing 15 posts - 1 through 15 (of 39 total)
                                • You must be logged in to reply to this topic.