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: Jean Louis
Subject: Re: Best strategy to disable a touchpad on a laptop when in Emacs?
Date: Wed, 31 Mar 2021 08:40:09 +0300
User-agent: Mutt/2.0.6 (2021-03-06)

* 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.

-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns



reply via email to

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