From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Arthur Miller Newsgroups: gmane.emacs.help Subject: Re: Best strategy to disable a touchpad on a laptop when in Emacs? Date: Wed, 31 Mar 2021 08:25:36 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12116"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (windows-nt) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed Mar 31 08:34:04 2021 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lRUQW-00031P-Jp for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 31 Mar 2021 08:34:04 +0200 Original-Received: from localhost ([::1]:52050 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lRUQV-0002DH-Gf for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 31 Mar 2021 02:34:03 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37092) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lRUIS-0004kw-Nm for help-gnu-emacs@gnu.org; Wed, 31 Mar 2021 02:25:45 -0400 Original-Received: from mail-oln040092072071.outbound.protection.outlook.com ([40.92.72.71]:21403 helo=EUR03-VE1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lRUIP-0000uq-UX for help-gnu-emacs@gnu.org; Wed, 31 Mar 2021 02:25:44 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=V5UNHejPV3ydPXxkUmSBwMD0qIuNNvboq6LKDgHoW915meZwRwAgIz+zvT7Br3duhsSyDROqz/Am4r9hffnLPSHdXS+/kCRVYc4bUu2OyQBFt/XRjV2Yp4xewQAyUQ3qVZP7cvLxjjoGUaHZ5Jbk0F8I+ShRIGm5e3E/k5M2f4OIgKRN2K0wvY6JLL0bCa/0Twk9Q3e98nK5LWbvpXSp0yiZU8/p7oZv6FTDts/XPtI/kjrc922t95xDkaazdJABTJwq2JcM7K6FiusBgNnWO7WXCiH9pCdYbv5FLj8zpF2AdsL84HVS+1fM5x9jy9nr5vizHDdVY82dbYkApfnvPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=KPg3ZHSm4oOGvoVHaxPMVPKVL1s1ER08KMiA6W6z03M=; b=d7567sgH9iU2Cd2A2RQCq0SuVj6cgI9wEP0y8tL2HQ0ftjlcJ0+L1L0cJmIRudb3e9P9lwTxjZqzOniEkRPAM7D6TCTsit/vQdci4MTd80GD8LfZ6vQQ4tGs0pNpLuWIUaIGm6MMmudDOcZBMSUEjRGvj/2NY1no5wBUSDq8cdwqh6f5vFUyldk6wBq5yhLFdnEoAmpnlTNREV8ZQlJVVwQB3dkToBsxa2q91uqVmCbWe1LoTgqJaIqt3gKiDEQLEZxmsNye3BFSmHRgfU6T7BM6T3OFv8c7njrvcdhPtj/sm0xwDfn8gdYG60bTQsOZuMxFX73qmFIkjC7bvjq3FQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=live.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=KPg3ZHSm4oOGvoVHaxPMVPKVL1s1ER08KMiA6W6z03M=; b=cSs1LPYnd6QW7+4h3NUpK4D4AWbJXa29kt//tZXW1aGIGtSrKfmyfDFPi7HebZVayneQY80/Hz1ayr7K2vO9wHFT72V1aa6JIYReW3bHEjJ4gjvN1UjKwIuoj6a+hMqe2cErV/8nTFkkZKZ1mGXMa9KQK8N0AmciymWLcQm2Mrm0iYCB5Hnvg0zLIAD5diniCJBDTuXR9U2RinYPzTK5qpTWjwoq1He51CkMogrf/Xn0Ea7mp0RPbskDFu77B0DcjWi7Gejixpyv6graI7Req8ssSOLI5W/iKdGKo/aqLqbp+ih2afKj91LoINrQtnRK1NHwpeuJb9jR8MBtm61m8g== Original-Received: from DB5EUR03FT020.eop-EUR03.prod.protection.outlook.com (2a01:111:e400:7e0a::52) by DB5EUR03HT148.eop-EUR03.prod.protection.outlook.com (2a01:111:e400:7e0a::418) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3977.29; Wed, 31 Mar 2021 06:25:38 +0000 Original-Received: from AM9PR09MB4977.eurprd09.prod.outlook.com (2a01:111:e400:7e0a::4f) by DB5EUR03FT020.mail.protection.outlook.com (2a01:111:e400:7e0a::134) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3977.25 via Frontend Transport; Wed, 31 Mar 2021 06:25:38 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:98DA7BF515FFF54FCF1220614B9549701902AE890385A909E45FA6D532785D0B; UpperCasedChecksum:331FD2E6F3C2CDFD0BAB91425266E2B902C39719DE07BC7512AB943B6769A621; SizeAsReceived:7727; Count:45 Original-Received: from AM9PR09MB4977.eurprd09.prod.outlook.com ([fe80::2103:e705:bc0c:5a8b]) by AM9PR09MB4977.eurprd09.prod.outlook.com ([fe80::2103:e705:bc0c:5a8b%6]) with mapi id 15.20.3999.027; Wed, 31 Mar 2021 06:25:38 +0000 In-Reply-To: (Arthur Miller's message of "Wed, 31 Mar 2021 08:05:54 +0200") X-TMN: [xIz+gG0c/DEdFZDsVR1XUcZPbY3HfwEc] X-ClientProxiedBy: AS8PR04CA0093.eurprd04.prod.outlook.com (2603:10a6:20b:31e::8) To AM9PR09MB4977.eurprd09.prod.outlook.com (2603:10a6:20b:304::20) X-Microsoft-Original-Message-ID: <82pmzf4z6n.fsf@live.com> X-MS-Exchange-MessageSentRepresentingType: 1 Original-Received: from HP-Laptop.homepc (81.232.177.30) by AS8PR04CA0093.eurprd04.prod.outlook.com (2603:10a6:20b:31e::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3999.27 via Frontend Transport; Wed, 31 Mar 2021 06:25:38 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 45 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 0942efec-8e23-4178-c5d5-08d8f40dccf6 X-MS-TrafficTypeDiagnostic: DB5EUR03HT148: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: aCpod31YU0w2LaFg8HCQiwQ0G1Z8/Zr67PeSbA5DU7oTGrR5qPMlmyq9pCB7we76zeK8De2ax3lhUXAXSSJRor+U4hFVyDhvyvwTJQk7sB20Lb0CTyQNY2VfBe7km6xceIFlgBmVh3uC0hmHKU2u0J7F1+ajZ95wAYnssGrfw3rsDmcuUVXD8cBXvGhVTUaYKuFqHR3sLWbl0IPN3XKDOjwusV44dyrVVub2DTUpLY6KpE3pGvcDNkEt+o8WPw5m+PkTvRthORwdYvfXGaYU/m78yFNF/4vkrOCmQt/qiFmFdP5XE4Y8um9Wm+HDJ9+sv1SVm4toaXN5O8PpXcoUKqZBNZdr9w+9VjRirVor1P7ECRhYewGN1whVjIJAivoXaOHtEONQQd5lBkEfS5B3YvrcA/2OzE/H4K6vpcSYR14= X-MS-Exchange-AntiSpam-MessageData: 3H12X/4ZuJLThonfjR1EU+RfLTfuk7mUUkAqgqIK+s+oK+MSzzo6Zriv/GeKJO+nPaoc5RU9MAehQ2QhlaeRyJjvXlVVv02k5bVeY0iMZeCEMx415Sq+o8Rc/klIY/7HZZgi1erYVgRzdFmJDpwWtA== X-OriginatorOrg: live.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0942efec-8e23-4178-c5d5-08d8f40dccf6 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Mar 2021 06:25:38.6319 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: DB5EUR03FT020.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB5EUR03HT148 Received-SPF: pass client-ip=40.92.72.71; envelope-from=arthur.miller@live.com; helo=EUR03-VE1-obe.outbound.protection.outlook.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:128784 Archived-At: Arthur Miller writes: > Jean Louis writes: > >> * Arthur Miller [2021-03-31 08:24]: >>> > Some solutions are shown here: >>> > https://askubuntu.com/questions/886092/how-do-i-disable-the-touchpad-while-typing >>> > >>> > First tell what operating system do you use, and if you use X.org or >>> > what? As solutions vary depending of the environment. >>> >>> Forgott to say: if I got it to work via Emacs, it would be OS independent. >> >> Find a way to disable touchpad on command line in Windows, and make >> equivalent to this function below. Do you have such solution? >> >> (defun touchpad-toggle () >> (interactive) >> (if touchpad-toggle >> (progn >> (setq touchpad-toggle nil) >> (shell-command "xinput disable 11") >> (message "Touchpad disabled")) >> (progn >> (setq touchpad-toggle t) >> (shell-command "xinput enable 11") >> (message "Touchpad enabled")))) >> >> Then you add some hook or process to monitor 2 seconds or more after >> typing that it remains disabled. > > I know how to call a shell command from Emacs Jean. I don't want to turn > off and on the touchpad every time I borrow the computer. I will sooner > or later forgett it and the best of all best ladies will be annoyed why > her computer does not work any more :). I just want it to now work in > Emacs, not in other apps. I found disable-mouse by Purcell, I'll see how > that one works. disable-mouse works good enough seems like, at least good enough for me, so I'll go with that. Thanks Purcell! By the way, I just found a blog post by Malabarba (Endless Parenthesses) about same issue: https://endlessparentheses.com/disable-mouse-only-inside-emacs.html