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.
-
AuthorPosts
-
February 14, 2023 at 8:02 am #99549Member
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 2 months, 3 weeks ago by spaz.
February 14, 2023 at 8:30 am #99551Member
afghan
::I use synclient utility.
# turn off synclient TouchpadOff=1 # turn on synclient TouchpadOff=0Beware of people who knows nothing; they are the ones that won't know that they know nothing.
February 14, 2023 at 8:36 am #99552MemberRobin
::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 touchpadAnd 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.
February 14, 2023 at 3:27 pm #99576Member
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.
https://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 fiAt 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 2 months, 3 weeks ago by techore.
February 15, 2023 at 10:55 am #99638Memberspaz
::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!February 15, 2023 at 11:56 am #99639MemberPPC
::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 https://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 fiFebruary 15, 2023 at 1:18 pm #99645Member
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?
February 15, 2023 at 2:48 pm #99646Member
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!
February 15, 2023 at 2:58 pm #99648Member
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.
February 15, 2023 at 3:00 pm #99649Member
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.
February 15, 2023 at 3:15 pm #99651Moderator
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 -dIt’s also enough to put this into /.desktop-session/startup file to get the touchpad disabled while typing.
syndaemon -i 3 -dFebruary 15, 2023 at 3:33 pm #99652Member
techore
::@caprea, not all touchpads are synaptic. Does your script work for non-synaptic touchpads? I don’t even have xf86-input-synaptics installed.
February 15, 2023 at 3:43 pm #99653Moderator
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.
February 15, 2023 at 3:47 pm #99654Member
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.
February 15, 2023 at 4:06 pm #99655Member
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 3000On execution, dunst notifies, so it does work.
- This reply was modified 2 months, 3 weeks ago by techore.
Attachments:
-
AuthorPosts
- You must be logged in to reply to this topic.
