all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: AW <alexander.willand@t-online.de>
To: help-gnu-emacs@gnu.org
Subject: How to switch off the touchpad when Emacs window is active under Linux?
Date: Mon, 24 Aug 2015 21:02:45 +0200	[thread overview]
Message-ID: <18033119.faXLECKoLl@linux-k2bd.site> (raw)

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



             reply	other threads:[~2015-08-24 19:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-24 19:02 AW [this message]
2015-08-24 19:14 ` How to switch off the touchpad when Emacs window is active under Linux? 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=18033119.faXLECKoLl@linux-k2bd.site \
    --to=alexander.willand@t-online.de \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.