[Solved] How to disable the touchpad when the mouse is plugged in?
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
[Solved] How to disable the touchpad when the mouse is plugged in?
... and re-enable it when the mouse is unplugged.
There is not apparent setting about that in the Linux Mint Mouse and Touchpad settings.
How to you do that? Is there a secure application I could use? Just using console commands would suit me.
Thank you.
There is not apparent setting about that in the Linux Mint Mouse and Touchpad settings.
How to you do that? Is there a secure application I could use? Just using console commands would suit me.
Thank you.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 3 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: How to disable the touchpad when the mouse is plugged in?
Look in system settings, mouse & touchpad:
> If your query has been resolved, edit your original post and add <SOLVED> to the beginning of the subject line. This may help others find solutions. <
Dell Latitude 7490 Mint 21.3 Ker 5.15.0-105 Cinn 6.0.4
Dell Latitude 7490 Mint 21.3 Ker 5.15.0-105 Cinn 6.0.4
Re: How to disable the touchpad when the mouse is plugged in?
This is LM 20 Cinnamon. May be in diff location for you. What version & desktop are you using?
> If your query has been resolved, edit your original post and add <SOLVED> to the beginning of the subject line. This may help others find solutions. <
Dell Latitude 7490 Mint 21.3 Ker 5.15.0-105 Cinn 6.0.4
Dell Latitude 7490 Mint 21.3 Ker 5.15.0-105 Cinn 6.0.4
Re: How to disable the touchpad when the mouse is plugged in?
I am sure an Xfce person will help you. There must be something similar in Xfce
> If your query has been resolved, edit your original post and add <SOLVED> to the beginning of the subject line. This may help others find solutions. <
Dell Latitude 7490 Mint 21.3 Ker 5.15.0-105 Cinn 6.0.4
Dell Latitude 7490 Mint 21.3 Ker 5.15.0-105 Cinn 6.0.4
Re: How to disable the touchpad when the mouse is plugged in?
There's a lot of apparent inconsistency like that! What would be a logical place for some isn't necessarily the logical place for the implementers.
For what it's worth: I have never tried automatically disabling the trackpad on my Win7 notebook - it seems simple enough simply not to use it, and if I really want to disable the trackpad there's a button for that.
Currently: Linux Mint 21.2 Cinnamon 64-bit 5.8.4, AMD Ryzen5 + Geforce GT 710
Previously: LM20.3 LM20.2 LM20.1, LM20, LM20β, LM18.2
Previously: LM20.3 LM20.2 LM20.1, LM20, LM20β, LM18.2
-
- Level 4
- Posts: 302
- Joined: Sun Mar 19, 2017 2:31 pm
Re: How to disable the touchpad when the mouse is plugged in?
In Xfce there used to be a tick-box option in the touchpad settings to disable the touchpad while typing, but even that seems to have disappeared in a brand-new install using the libinput touchpad driver. It seems that setting is now enabled by default anyway, although it only stops the touchpad while you are actually tapping the keyboard. I'm not aware of any setting you can access to disable it while the mouse is plugged in.
But as Dark Owl points out, laptops usually have a button to turn the touchpad on and off. In the case of my Lenovo laptop it is the F6 key. I should think the simplest option would be to tap the equivalent key on your laptop when you plug in the mouse and again when you remove it.
If you are particularly keen to have some sort of command to do this, you could look at the "Removable Drives and Media" settings. There is a tab for Input Devices on which you could put a command to be run automatically whenever a USB mouse is connected. I suppose it wouldn't make anything happen when you remove the mouse, but that may not be a problem if you would be switching the laptop off then anyway.
Finally, there is a little program called touchpad-indicator which would do what you want:
https://launchpad.net/~atareao/+archive ... lter=focal
I haven't installed the PPA but I did download the .deb file from this page and tried it out on a Live USB version of Mint 20. It seems to work OK with my wireless mouse but I'm not really sure it's worth downloading unofficial software from an external source to do this.
But as Dark Owl points out, laptops usually have a button to turn the touchpad on and off. In the case of my Lenovo laptop it is the F6 key. I should think the simplest option would be to tap the equivalent key on your laptop when you plug in the mouse and again when you remove it.
If you are particularly keen to have some sort of command to do this, you could look at the "Removable Drives and Media" settings. There is a tab for Input Devices on which you could put a command to be run automatically whenever a USB mouse is connected. I suppose it wouldn't make anything happen when you remove the mouse, but that may not be a problem if you would be switching the laptop off then anyway.
Finally, there is a little program called touchpad-indicator which would do what you want:
https://launchpad.net/~atareao/+archive ... lter=focal
I haven't installed the PPA but I did download the .deb file from this page and tried it out on a Live USB version of Mint 20. It seems to work OK with my wireless mouse but I'm not really sure it's worth downloading unofficial software from an external source to do this.
- antikythera
- Level 15
- Posts: 5721
- Joined: Thu Jul 02, 2020 12:52 pm
- Location: Cymru
Re: How to disable the touchpad when the mouse is plugged in?
You may want to try this. I can't guarantee it will work (it did with Manjaro GNOME) but it is worth a shot. The change is not desktop environment specific, it will work with any X11 session utilising the libinput driver.
With sudo rights create a file called /etc/X11/Xsession.d/30-touchpad.conf
Add the following:
Save the change (CTRL+O followed by Enter), close nano (CTRL+X) and restart. Try it, plug in a mouse and the touchpad should be voided, unplug the mouse and it should work again. If you use a wireless device, then that means unplug the receiver too.
https://wayland.freedesktop.org/libinpu ... vents-mode
With sudo rights create a file called /etc/X11/Xsession.d/30-touchpad.conf
Code: Select all
sudo nano /etc/X11/Xsession.d/30-touchpad.conf
Code: Select all
Section "InputClass"
Identifier "touchpad"
Driver "libinput"
MatchIsTouchpad "on"
Option "SendEventsMode" "disabled-on-external-mouse"
EndSection
https://wayland.freedesktop.org/libinpu ... vents-mode
Last edited by antikythera on Sat Jul 25, 2020 8:20 pm, edited 5 times in total.
I’ll tell you a DNS joke but be advised, it could take up to 24 hours for everyone to get it.
- Lady Fitzgerald
- Level 15
- Posts: 5819
- Joined: Tue Jan 07, 2020 3:12 pm
- Location: AZ, SSA (Squabbling States of America)
Re: How to disable the touchpad when the mouse is plugged in?
I had always wished to be able to disable a touchpad when a mouse was present on my Lenovo notebooks when on Win 7 but couldn't because Lenovo didn't have the feature; I couldn't even just permanently disable it period (mutter, mutter, mumble, mumble). I had to manually shut off the miserable, misbegotten, despicable, stupid touchpad every time I booted up . One thing I like, no, make that love, about Linux Mint is the ability to set the touchpad to be always off.antikythera wrote: ⤴Sat Jul 25, 2020 4:01 pm...If you use a wireless device, then that means unplug the receiver too...
I use wireless mice (mouses, meece, meeces?) on my machines. When I saw this thread, I checked out the setting to disable the touchpad and discovered I had to remove the receiver, not just turn off the mouse. Still, pulling the receiver on the incredibly rare occasions I may want to use the abomination...er...touchpad instead of the mouse is far more convenient than trying to reenable the idiot touchpad when using the mouse to do so is inconvenient.
Did I mention I do not like touchpads?
Jeannie
To ensure the safety of your data, you have to be proactive, not reactive, so, back it up!
To ensure the safety of your data, you have to be proactive, not reactive, so, back it up!
- antikythera
- Level 15
- Posts: 5721
- Joined: Thu Jul 02, 2020 12:52 pm
- Location: Cymru
Re: How to disable the touchpad when the mouse is plugged in?
Nope, I can't remember you mentioning that
I don't like them either, I use a Logitech M570 because it is easier for me to control than a normal mouse and can be used on anything. I had a TrackMan Wheel for years before that but the micro-switches wore out on it.
I don't like them either, I use a Logitech M570 because it is easier for me to control than a normal mouse and can be used on anything. I had a TrackMan Wheel for years before that but the micro-switches wore out on it.
I’ll tell you a DNS joke but be advised, it could take up to 24 hours for everyone to get it.
Re: How to disable the touchpad when the mouse is plugged in?
Hi,antikythera wrote: ⤴Sat Jul 25, 2020 4:01 pm With sudo rights create a file called /etc/X11/XSession.d/30-touchpad.confCode: Select all
sudo nano /etc/X11/XSession.d/30-touchpad.conf
I'm trying your solution but when I save I get an error message saying that the file doesn't exist...
- antikythera
- Level 15
- Posts: 5721
- Joined: Thu Jul 02, 2020 12:52 pm
- Location: Cymru
Re: How to disable the touchpad when the mouse is plugged in?
there's a typo, I will edit the above. Thanks for trying it though and feeding back:
The error is about the directory, nano will create the new file no problems as long as it is pointed the right way
Code: Select all
sudo nano /etc/X11/Xsession.d/30-touchpad.conf
I’ll tell you a DNS joke but be advised, it could take up to 24 hours for everyone to get it.
Re: How to disable the touchpad when the mouse is plugged in?
Ah...antikythera wrote: ⤴Sat Jul 25, 2020 8:17 pm there's a typo, I will edit the above. Thanks for trying it though and feeding back:The error is about the directory, nano will create the new file no problems as long as it is pointed the right wayCode: Select all
sudo nano /etc/X11/Xsession.d/30-touchpad.conf
This time it worked. I'll see the result next time I boot. Thank you!
- Lady Fitzgerald
- Level 15
- Posts: 5819
- Joined: Tue Jan 07, 2020 3:12 pm
- Location: AZ, SSA (Squabbling States of America)
Re: How to disable the touchpad when the mouse is plugged in?
My weapon...er...wireless mouse of choice is the Logitech M525. It's the perfect size for my hand. I have a herd of the little buggers (around 10 or 11).antikythera wrote: ⤴Sat Jul 25, 2020 6:25 pm Nope, I can't remember you mentioning that
I don't like them either, I use a Logitech M570 because it is easier for me to control than a normal mouse and can be used on anything. I had a TrackMan Wheel for years before that but the micro-switches wore out on it.
Jeannie
To ensure the safety of your data, you have to be proactive, not reactive, so, back it up!
To ensure the safety of your data, you have to be proactive, not reactive, so, back it up!
Re: How to disable the touchpad when the mouse is plugged in?
I use a Bluetooth mouse (but not on my Mint system) - maybe just turning off the mouse (hence it being "off line" to its driver) would achieve the same effect. All wireless mice are equal, but some are more equal than others.Lady Fitzgerald wrote: ⤴Sat Jul 25, 2020 6:17 pmStill, pulling the receiver on the incredibly rare occasions I may want to use the abomination...er...touchpad instead of the mouse is far more convenient than trying to reenable the idiot touchpad when using the mouse to do so is inconvenient.antikythera wrote: ⤴Sat Jul 25, 2020 4:01 pm...If you use a wireless device, then that means unplug the receiver too...
Maybe the touchpad can be disabled in the BIOS?
Currently: Linux Mint 21.2 Cinnamon 64-bit 5.8.4, AMD Ryzen5 + Geforce GT 710
Previously: LM20.3 LM20.2 LM20.1, LM20, LM20β, LM18.2
Previously: LM20.3 LM20.2 LM20.1, LM20, LM20β, LM18.2
- antikythera
- Level 15
- Posts: 5721
- Joined: Thu Jul 02, 2020 12:52 pm
- Location: Cymru
Re: How to disable the touchpad when the mouse is plugged in?
The Logitech unified receiver is also detected as a HID in it's own right, so no it doesn't work just turning off a Logitech device to enable the touchpad. As for other brands, I guess it is worth a try just turning the device off if it has an on/off switch and leaving the receiver in. Worst case scenario, they find out they have to pull the receiver out anyway
I’ll tell you a DNS joke but be advised, it could take up to 24 hours for everyone to get it.
Re: How to disable the touchpad when the mouse is plugged in?
So, I tried this and it doesn't work...antikythera wrote: ⤴Sat Jul 25, 2020 4:01 pm You may want to try this. I can't guarantee it will work (it did with Manjaro GNOME) but it is worth a shot. The change is not desktop environment specific, it will work with any X11 session utilising the libinput driver.
With sudo rights create a file called /etc/X11/Xsession.d/30-touchpad.conf
Add the following:Code: Select all
sudo nano /etc/X11/Xsession.d/30-touchpad.conf
Code: Select all
Section "InputClass" Identifier "touchpad" Driver "libinput" MatchIsTouchpad "on" Option "SendEventsMode" "disabled-on-external-mouse" EndSection
- antikythera
- Level 15
- Posts: 5721
- Joined: Thu Jul 02, 2020 12:52 pm
- Location: Cymru
Re: How to disable the touchpad when the mouse is plugged in?
Okay, since it didn't work you can safely delete the created file. It is possible to set the SendEventsMode value using dconf editor (use the searchbox in dconf editor to go straight to it). That may work better for Ubuntu based systems.
I’ll tell you a DNS joke but be advised, it could take up to 24 hours for everyone to get it.