From: Jean Louis <bugs@gnu.support>
To: Arthur Miller <arthur.miller@live.com>
Cc: help-gnu-emacs <help-gnu-emacs@gnu.org>,
Yuri Khan <yuri.v.khan@gmail.com>
Subject: Re: Best strategy to disable a touchpad on a laptop when in Emacs?
Date: Wed, 31 Mar 2021 13:34:33 +0300 [thread overview]
Message-ID: <YGRQORishjogLtQR@protected.localdomain> (raw)
In-Reply-To: <AM9PR09MB49777914DE175E22BFD622AF967C9@AM9PR09MB4977.eurprd09.prod.outlook.com>
* Arthur Miller <arthur.miller@live.com> [2021-03-31 13:32]:
> Yuri Khan <yuri.v.khan@gmail.com> writes:
>
> > On Wed, 31 Mar 2021 at 07:40, Arthur Miller <arthur.miller@live.com> wrote:
> >
> > Problem statement:
> >
> >> I sometimes touch the touchpad accidentally, with a palm and caouse
> >> cursor to jump around or trigger a pop-up.
> >
> > Relevant context:
> >
> >> I can't turn the
> >> touchpad of in the system entirely, it is my wife's and I am just
> >> borrowing it sometimes
> >
> > Proposed approach:
> >
> >> How can I tell Emacs to ignore all touchpad events?
> >
> > …and as far as I can see you got the problem solved that way.
> >
> > However, have a different approach that might be applicable in some
> > circumstances:
> >
> > Connect an external, your own keyboard when using other people’s
> > laptops. This way, you (1) have a comfortable and familiar keyboard,
> > (2) do not approach the touchpad sufficiently to accidentally touch
> > it.
> Yes indeed, but I am away from home and don't wanna carry around a
> keyboard. Disable-mouse-mode, works really fine. The touchpad still
> moves pointer around; would like to turn off pointer motion too, but
> presses are ignored, so it is good enough.
To disable that you could just do:
(define-minor-mode disable-mouse-mode
"A minor-mode that disables all mouse keybinds."
:global t
:lighter " 🐭"
:keymap (make-sparse-keymap))
(dolist (type '(mouse down-mouse drag-mouse
double-mouse triple-mouse))
(dolist (prefix '("" C- M- S- M-S- C-M- C-S- C-M-S-))
;; Yes, I actually HAD to go up to 7 here.
(dotimes (n 7)
(let ((k (format "%s%s-%s" prefix type n)))
(define-key disable-mouse-mode-map
(vector (intern k)) #'ignore)))))
(disable-mouse-mode 1)
as from:
https://endlessparentheses.com/disable-mouse-only-inside-emacs.html
--
Jean
Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns
prev parent reply other threads:[~2021-03-31 10:34 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-31 0:40 Best strategy to disable a touchpad on a laptop when in Emacs? Arthur Miller
2021-03-31 5:11 ` Jean Louis
2021-03-31 5:22 ` Arthur Miller
2021-03-31 5:23 ` Arthur Miller
2021-03-31 5:40 ` Jean Louis
2021-03-31 6:05 ` Arthur Miller
2021-03-31 6:25 ` Arthur Miller
2021-03-31 6:55 ` Jean Louis
2021-03-31 10:33 ` Arthur Miller
2021-03-31 10:36 ` Jean Louis
2021-03-31 12:34 ` Arthur Miller
2021-03-31 8:32 ` Yuri Khan
2021-03-31 10:31 ` Arthur Miller
2021-03-31 10:34 ` Jean Louis [this message]
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=YGRQORishjogLtQR@protected.localdomain \
--to=bugs@gnu.support \
--cc=arthur.miller@live.com \
--cc=help-gnu-emacs@gnu.org \
--cc=yuri.v.khan@gmail.com \
/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.