all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* How to switch off the touchpad when Emacs window is active under Linux?
@ 2015-08-24 19:02 AW
  2015-08-24 19:14 ` Ian Zimmerman
       [not found] ` <mailman.28.1440443703.28410.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 4+ messages in thread
From: AW @ 2015-08-24 19:02 UTC (permalink / raw)
  To: help-gnu-emacs

Hi,

I've got one of those notebooks with a laaaaarge touchpad. I'd like to get it 
switched off when the emacs window under linux is active. I often hit the 
touchpad accidently while typing and move the cursor to another place in the 
buffer. I would like to avoid this.

Somebody (thanks, Bob) showed me this page:

https://www.reddit.com/r/emacs/comments/38o0tr/i_have_to_share_this_switch_your_touchpad_off/

Synclient on this notebook works, but this function doesn't:

======================0

(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)

=======================

Any suggestions welcome, I'm using openSuse Tumbleweed.


Regards,

Alexander



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-08-24 19:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-24 19:02 How to switch off the touchpad when Emacs window is active under Linux? AW
2015-08-24 19:14 ` Ian Zimmerman
2015-08-24 19:51   ` AW
     [not found] ` <mailman.28.1440443703.28410.help-gnu-emacs@gnu.org>
2015-08-24 19:37   ` Pascal J. Bourguignon

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.