help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Best strategy to disable a touchpad on a laptop when in Emacs?


From: Arthur Miller
Subject: Re: Best strategy to disable a touchpad on a laptop when in Emacs?
Date: Wed, 31 Mar 2021 08:05:54 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (windows-nt)

Jean Louis <bugs@gnu.support> writes:

> * Arthur Miller <arthur.miller@live.com> [2021-03-31 08:24]:
>> > Some solutions are shown here:
>> > https://askubuntu.com/questions/886092/how-do-i-disable-the-touchpad-while-typing
>> >
>> > First tell what operating system do you use, and if you use X.org or
>> > what? As solutions vary depending of the environment.
>> 
>> Forgott to say: if I got it to work via Emacs, it would be OS independent.
>
> Find a way to disable touchpad on command line in Windows, and make
> equivalent to this function below. Do you have such solution?
>
> (defun touchpad-toggle ()
>   (interactive)
>   (if touchpad-toggle
>       (progn
>       (setq touchpad-toggle nil)
>       (shell-command "xinput disable 11")
>       (message "Touchpad disabled"))
>     (progn
>       (setq touchpad-toggle t)
>       (shell-command "xinput enable 11")
>       (message "Touchpad enabled"))))
>
> Then you add some hook or process to monitor 2 seconds or more after
> typing that it remains disabled.

I know how to call a shell command from Emacs Jean. I don't want to turn
off and on the touchpad every time I borrow the computer. I will sooner
or later forgett it and the best of all best ladies will be annoyed why
her computer does not work any more :). I just want it to now work in
Emacs, not in other apps. I found disable-mouse by Purcell, I'll see how
that one works.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]