From: "Gerd Möllmann" <gerd.moellmann@gmail.com>
To: Emacs Devel <emacs-devel@gnu.org>
Subject: Tip: tty mode-line popup menus
Date: Mon, 09 Dec 2024 09:01:46 +0100 [thread overview]
Message-ID: <m2cyi1709h.fsf@gmail.com> (raw)
Just a tip I wanted to share. Maybe some tty Emacs user finds it useful.
Couldn't find anything mentioned on the internet.
When clicking on, say, the major mode indicator in the mode-line
different things happen, depending on whether I'm using a GUI or tty
Emacs (-nw):
- GUI (NS In may case): a popup menu opens on down-mpuse-1 and stays
open when I release the mouse button.
- Tty: a popup menu opens on down-mouse-1 and is closed as soon as I
release the mouse button. If the mouse is over a menu item[B releasing
the button also selects the menu item.
I don't like the tty behavior. It is fiddly with a track pad, which I
normally use, leading to inadvertent menu selections. Furthermore,
keyboard operation of the menu seems impossible.
To fix this, I've added this in my init.el:
(defun my-fix-mode-line-map (map)
(let* ((down-mouse (kbd "<mode-line> <down-mouse-1>"))
(mouse (kbd "<mode-line> <mouse-1>"))
(def (lookup-key map down-mouse)))
(when def
(define-key map down-mouse nil)
(define-key map mouse def))))
(my-fix-mode-line-map mode-line-major-mode-keymap)
(my-fix-mode-line-map mode-line-minor-mode-keymap)
Have fun!
next reply other threads:[~2024-12-09 8:01 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-09 8:01 Gerd Möllmann [this message]
2024-12-09 10:40 ` Tip: tty mode-line popup menus Jean Louis
2024-12-09 14:58 ` Eli Zaretskii
2024-12-09 14:45 ` Eli Zaretskii
2024-12-09 15:15 ` Gerd Möllmann
2024-12-09 16:24 ` Eli Zaretskii
2024-12-09 21:54 ` Petteri Hintsanen
2024-12-10 3:32 ` Gerd Möllmann
2024-12-09 22:59 ` Stefan Kangas
2024-12-10 6:14 ` Gerd Möllmann
2024-12-10 9:32 ` Gerd Möllmann
2024-12-10 10:09 ` Gerd Möllmann
2024-12-10 13:15 ` Gerd Möllmann
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2cyi1709h.fsf@gmail.com \
--to=gerd.moellmann@gmail.com \
--cc=emacs-devel@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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).