LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   How do I make my touchpad disabled when mouse plugged in, but able to turn it on by Fn+F6? (https://www.linuxquestions.org/questions/slackware-14/how-do-i-make-my-touchpad-disabled-when-mouse-plugged-in-but-able-to-turn-it-on-by-fn-f6-4175672297/)

yars 03-31-2020 12:22 PM

How do I make my touchpad disabled when mouse plugged in, but able to turn it on by Fn+F6?
 
Hello all, I have a laptop Lenovo G580. My problem with it is Synaptics Touchpad. Every time when I power on my laptop I need to press Fn+F6 to disable touchpad. I can create udev rule that will disable touchpad if mouse is plugged, but if I do so, I can't enable touchpad by Fn+F6. How do I do this?
UPD. With synclient, I can change TouchPadOff setting, but it does nothing, using xinput --enable|disable I can enable or disable touchpad (but Synaptics Off property keeps unchanged, it also unchanged with Fn+F6).

chrisretusn 04-01-2020 09:03 AM

What desktop environment are you using?

In KDE (Plasma5) (ktown) this can be taken care of in System Settings, Input Devices, Touchpad, Enable/Disable Touchpad tab.

yars 04-01-2020 10:22 AM

I'm using Xfce. Yes, I know about mouse and touchpad settings dialog. I can comletely disable touchpad this way, but I tried to find a way to automate disabling (or ignoring) touchpad when external mouse is connected, and also should be possible to enable touchpad by Fn+F6. But some experiments and looking on the Web displays this is not so simple as seems. Main problem is the hardware (or it's firmware) does not interacts with the software (like xinput or synclient).

BW-userx 04-01-2020 12:30 PM

doesn't xfce have a disable while typing? mine does, slack - current. xfce 4.12

yars 04-01-2020 01:46 PM

Quote:

Originally Posted by BW-userx (Post 6106710)
doesn't xfce have a disable while typing?

Mine also does, but it's is only a great "workaround", not actually solution IMO. But I have no idea on how to fix this "problem".
UPD. I started this thread thinking that the solution is on the surface i.e. various scripts, etc, but later I realized that is not so simple as I was thiking. So I will continue using "disable touchpad while typing" option.
Thanks all.

BW-userx 04-01-2020 03:35 PM

Quote:

Originally Posted by yars (Post 6106729)
Mine also does, but it's is only a great "workaround", not actually solution IMO. But I have no idea on how to fix this "problem".
UPD. I started this thread thinking that the solution is on the surface i.e. various scripts, etc, but later I realized that is not so simple as I was thiking. So I will continue using "disable touchpad while typing" option.
Thanks all.

you might try creating some scripts, one that turns off your touchpad on startup/login. then another one that is in a loop looking for your F key input when it hits it turns your touchpad on and put them in your xfce4 startups, or some such thing like that.

I do not have a F key that turns it on and off.

just search the net to find the ole if on turn off, else turn on. then attach it to your shortcut to whatever F key you want.

slacker1337 04-01-2020 03:53 PM

I would write a script that toggles between enabled and disabled, then map that script execution to the function key sequence you desire through xfce's Settings Manager:
https://forum.xfce.org/viewtopic.php?id=6528

ferrari 04-01-2020 04:27 PM

Quote:

Originally Posted by yars (Post 6106667)
I'm using Xfce. Yes, I know about mouse and touchpad settings dialog. I can comletely disable touchpad this way, but I tried to find a way to automate disabling (or ignoring) touchpad when external mouse is connected, and also should be possible to enable touchpad by Fn+F6. But some experiments and looking on the Web displays this is not so simple as seems. Main problem is the hardware (or it's firmware) does not interacts with the software (like xinput or synclient).

FWIW, here's an old post of mine where I show how to implement a simple script to do this for any pointing device (no matter how it is being handled or the DE in question)...
https://www.linuxquestions.org/quest...5/#post5807829

chrisretusn 04-01-2020 09:47 PM

I know you are using Xfce. Just to add, for the interest of others who might come across this thread. That you can disable the touchpad on plugin of a mouse in KDE (Plasma). I am using both a USB mouse and bluetooth mouse (two laptops). On plugin of the USB dongle the touchpad is disabled, removal enabled again. With the bluetooth mouse turning it on or off does it.

ferrari 04-01-2020 10:53 PM

Quote:

Originally Posted by yars (Post 6106667)
I'm using Xfce. Yes, I know about mouse and touchpad settings dialog. I can comletely disable touchpad this way, but I tried to find a way to automate disabling (or ignoring) touchpad when external mouse is connected, and also should be possible to enable touchpad by Fn+F6. But some experiments and looking on the Web displays this is not so simple as seems. Main problem is the hardware (or it's firmware) does not interacts with the software (like xinput or synclient).

Yes, the function key combo is used to enable/disable the touchpad by powering the hardware up or down. The DE function (or script approach) just does this by enabling/disabling the Xorg component.

kakarotoanderson 01-19-2024 11:47 AM

Quote:

Originally Posted by chrisretusn (Post 6106653)
What desktop environment are you using?

In KDE (Plasma5) (ktown) this can be taken care of in System Settings, Input Devices, Touchpad, Enable/Disable Touchpad tab.

You can reinstate the old behaviour by adding

[autodisable]
DisableWhenMousePluggedIn=true

to ~/.config/touchpadrc

At least, this still works for me and I get a notification that the touchpad has been disabled because a mouse was plugged in when I log into plasma.


All times are GMT -5. The time now is 09:03 PM.