[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: |
Ian Zimmerman |
Subject: |
Re: How to switch off the touchpad when Emacs window is active under Linux? |
Date: |
Mon, 24 Aug 2015 12:14:51 -0700 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
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.
--
Please *no* private copies of mailing list or newsgroup messages.
Rule 420: All persons more than eight miles high to leave the court.