From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: AW Newsgroups: gmane.emacs.help Subject: How to switch off the touchpad when Emacs window is active under Linux? Date: Mon, 24 Aug 2015 21:02:45 +0200 Message-ID: <18033119.faXLECKoLl@linux-k2bd.site> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit X-Trace: ger.gmane.org 1440442996 19845 80.91.229.3 (24 Aug 2015 19:03:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 24 Aug 2015 19:03:16 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Aug 24 21:03:08 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZTx1P-00042v-V0 for geh-help-gnu-emacs@m.gmane.org; Mon, 24 Aug 2015 21:03:08 +0200 Original-Received: from localhost ([::1]:56154 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZTx1P-0003Qs-FC for geh-help-gnu-emacs@m.gmane.org; Mon, 24 Aug 2015 15:03:07 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39225) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZTx1F-0003QE-6p for help-gnu-emacs@gnu.org; Mon, 24 Aug 2015 15:02:58 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZTx19-0004ji-W2 for help-gnu-emacs@gnu.org; Mon, 24 Aug 2015 15:02:57 -0400 Original-Received: from mailout10.t-online.de ([194.25.134.21]:39011) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZTx19-0004ja-P6 for help-gnu-emacs@gnu.org; Mon, 24 Aug 2015 15:02:51 -0400 Original-Received: from fwd40.aul.t-online.de (fwd40.aul.t-online.de [172.20.26.139]) by mailout10.t-online.de (Postfix) with SMTP id BE05624E100; Mon, 24 Aug 2015 21:02:50 +0200 (CEST) Original-Received: from linux-k2bd.site (Tl9pmiZDYh-tllVQBThdYs-DsM3BfnZVc-G+fZizJcZNHkKloPG9nOUHWqLaKi2ZBJ@[81.62.204.224]) by fwd40.t-online.de with (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384 encrypted) esmtp id 1ZTx18-1CHxCK0; Mon, 24 Aug 2015 21:02:50 +0200 User-Agent: KMail/4.14.10 (Linux/4.1.4-1-desktop; KDE/4.14.10; x86_64; ; ) X-ID: Tl9pmiZDYh-tllVQBThdYs-DsM3BfnZVc-G+fZizJcZNHkKloPG9nOUHWqLaKi2ZBJ X-TOI-MSGID: 3a2df77f-c349-453d-8b59-014d9d5c65c3 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 194.25.134.21 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:106807 Archived-At: 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