From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?Gerd_M=C3=B6llmann?= Newsgroups: gmane.emacs.devel Subject: Tip: tty mode-line popup menus Date: Mon, 09 Dec 2024 09:01:46 +0100 Message-ID: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9570"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) To: Emacs Devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Dec 09 09:02:46 2024 Return-path: Envelope-to: ged-emacs-devel@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 1tKYj8-0002Ng-2x for ged-emacs-devel@m.gmane-mx.org; Mon, 09 Dec 2024 09:02:46 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tKYiJ-0001wj-Kf; Mon, 09 Dec 2024 03:01:55 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tKYiH-0001wL-Py for emacs-devel@gnu.org; Mon, 09 Dec 2024 03:01:53 -0500 Original-Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tKYiG-0002ci-B5 for emacs-devel@gnu.org; Mon, 09 Dec 2024 03:01:53 -0500 Original-Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-434a736518eso43316315e9.1 for ; Mon, 09 Dec 2024 00:01:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1733731308; x=1734336108; darn=gnu.org; h=mime-version:user-agent:message-id:date:subject:to:from:from:to:cc :subject:date:message-id:reply-to; bh=fM0ZfBGOAFxwR+m0j/VqbkX0z60jhZCuqBwm42pHxBc=; b=d3zSBe1eHngijqtAqoni+r3uNt4p2TxqXfKSOcm1OY/KGreiK/Py398udY901mn4RO ffj3m0C2ki6qOacs+eGxgirQ2z73g80ZJD/Wm+HqA+N4Mz1T0wE7ESN9ML2il9qbT9sD c3KcKaswF1GFn/ELTbXdJs/F94eXufAYTyRN6+4A7mSH0QW0SqauzZRBNEzmEVLDSZn7 ZakUjB1jLOTnyWFkYzENMXtwtrXWf90O2ORTlhcXEii5MUSKXren92z73t5bPFPwKyaf YFQV/UTFD5ARIxy4f/yztgS8Kt/oMr+758CQbP/moTHy2STbShSl336hte0tR/S/LlSA lV5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733731308; x=1734336108; h=mime-version:user-agent:message-id:date:subject:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=fM0ZfBGOAFxwR+m0j/VqbkX0z60jhZCuqBwm42pHxBc=; b=CvpNF23zVZrqtry4XHX9g1YLa1kyTY4s3aVFumeouU6PvP9lH//FfsNhJxbi2YV4mm DwbzEpShx2kBgWR6v83eiBDYMQ99J1f1mwdXfiAYuIwkkyhz7GQoJwEEcelc0qbwzE9I sRWTNNAqcCDL45Lm8UFjZxh+7mgD0XZjzM+rMbhztdKMeRMHsYWrzTOucKzApeIvJudN EPid+PAK3osRgmGSp0oe369vB4sJdVKBHz8+gZIKR2sRmOtvfXriWTil/3ZMOYtdLzin VmiGrmTwfxm291oASC2uCTsW49lg30Ws64jduUFy7HeIaLFF1w8cjdMK/ZsTgtJhsbvI qLtw== X-Gm-Message-State: AOJu0YyBCRLMsD4ZwMbKrES7BCRZUb2PrJhpFBy3DkEcvdhYSbC7IV3d cOVfOCL103rJljpiZdm3pc2cgO+rmvtXyuZyDRZNZKZwUWWVfRIgxb0nxg== X-Gm-Gg: ASbGncuhfFGP82LCUQEkSovrpxqL3B2ulCGin+V+ON+zmJHo1uOWNYzPjJL8WbqdlPs g8X7a4V0MM5NgqqrK+62dUJ5T8w/Zto3qAF76N3H+GnHWaEuYuVtzdCHilIjt7WXRflahS6scmL 6LgTyArncE3vt2V7zxMELPU90Ox7kPHPe/abjOmiS9/VEc44NYxzmfVUjkg1SME3jbPElolE3Td FEu1CwihFy6WqXyt0+bjp66XNpJsje7b9CTX6B08gTPqMkqA5e0UCHvdETiz4oyMGYYU2qVhwQp UwCLMuUDWpahrEoQSJyshxQCkSdSuF9XhDIoN/RqAyOC8ehaxlEdJfpH9wI= X-Google-Smtp-Source: AGHT+IFzg7Zt1kOKV3VeKpNuf88ORLUNpDMNXuRjNdXdguSXI5pFEfmQNXJStbvXa8lRlsCzfCouyQ== X-Received: by 2002:a05:600c:2253:b0:434:f1e9:afaa with SMTP id 5b1f17b1804b1-434f1e9b16bmr33229505e9.5.1733731308182; Mon, 09 Dec 2024 00:01:48 -0800 (PST) Original-Received: from pro2 (p200300e0b72dbc00686f49e61b8c6739.dip0.t-ipconnect.de. [2003:e0:b72d:bc00:686f:49e6:1b8c:6739]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-386367f7c71sm6712249f8f.41.2024.12.09.00.01.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Dec 2024 00:01:47 -0800 (PST) Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=gerd.moellmann@gmail.com; helo=mail-wm1-x333.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:326239 Archived-At: 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 " ")) (mouse (kbd " ")) (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!