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

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

Re: How to switch off the touchpad when Emacs window is active under Lin


From: AW
Subject: Re: How to switch off the touchpad when Emacs window is active under Linux?
Date: Mon, 24 Aug 2015 21:51:26 +0200
User-agent: KMail/4.14.10 (Linux/4.1.4-1-desktop; KDE/4.14.10; x86_64; ; )

Am Montag, 24. August 2015, 12:14:51 schrieb Ian Zimmerman:
> On 2015-08-24 21:02 +0200, AW wrote:
> > Synclient on this notebook works, but this function doesn't:
> > 
> > (defun turn-off-mouse (&optional frame)
> > 
> >   (interactive)
> >   (let ((inhibit-message t) (default-directory "~"))
> >   
> >     (shell-command "synclient TouchpadOff=1")))
> > 
> > (defun turn-on-mouse (&optional frame)
> > 
> >   (interactive)
> >   (let ((inhibit-message t) (default-directory "~"))
> >   
> >     (shell-command "synclient TouchpadOff=0")))
> > 
> > (add-hook 'focus-in-hook #'turn-off-mouse)
> > (add-hook 'focus-out-hook #'turn-on-mouse)
> > (add-hook 'delete-frame-functions #'turn-on-mouse)
> 
> The variable inhibit-message doesn't exist in my emacs (probably a
> recent addition), but I'm guessing that it discards any output from the
> subprocess.  I would leave it out so you see what prevents synclient
> from working.
> 
> Also, I don't see why changing default-directory should be necessary,
> either.

Trouble is, I don't speak Lisp. I'm just a user who gets lots of typos because 
of a touchpad which is too large. I found this code and more, tested it, but 
without any success....



reply via email to

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