X-Loop: help-debbugs@HIDDEN
Subject: bug#79830: Context menu keys on tty
Resent-From: Juri Linkov <juri@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: sbaugh@HIDDEN, bug-gnu-emacs@HIDDEN
Resent-Date: Fri, 14 Nov 2025 07:19:02 +0000
Resent-Message-ID: <handler.79830.B.17631047218713 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 79830
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords:
To: 79830 <at> debbugs.gnu.org
Cc: Spencer Baugh <sbaugh@HIDDEN>
X-Debbugs-Original-To: bug-gnu-emacs@HIDDEN
X-Debbugs-Original-Xcc: Spencer Baugh <sbaugh@HIDDEN>
Received: via spool by submit <at> debbugs.gnu.org id=B.17631047218713
(code B ref -1); Fri, 14 Nov 2025 07:19:02 +0000
Received: (at submit) by debbugs.gnu.org; 14 Nov 2025 07:18:41 +0000
Received: from localhost ([127.0.0.1]:59737 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1vJo4v-0002GT-BN
for submit <at> debbugs.gnu.org; Fri, 14 Nov 2025 02:18:41 -0500
Received: from lists.gnu.org ([2001:470:142::17]:41160)
by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.84_2) (envelope-from <juri@HIDDEN>) id 1vJo4t-0002GH-Qr
for submit <at> debbugs.gnu.org; Fri, 14 Nov 2025 02:18:40 -0500
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 <juri@HIDDEN>) id 1vJo4W-0007gh-5f
for bug-gnu-emacs@HIDDEN; Fri, 14 Nov 2025 02:18:21 -0500
Received: from mout-p-103.mailbox.org ([2001:67c:2050:0:465::103])
by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256)
(Exim 4.90_1) (envelope-from <juri@HIDDEN>) id 1vJo4T-0002xN-PL
for bug-gnu-emacs@HIDDEN; Fri, 14 Nov 2025 02:18:15 -0500
Received: from smtp2.mailbox.org (smtp2.mailbox.org
[IPv6:2001:67c:2050:b231:465::2])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
(No client certificate requested)
by mout-p-103.mailbox.org (Postfix) with ESMTPS id 4d77lC4hksz9t0n
for <bug-gnu-emacs@HIDDEN>; Fri, 14 Nov 2025 08:17:59 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linkov.net; s=MBO0001;
t=1763104679;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type;
bh=ELcn3TPvZfc8JANbr5X/82y3YXwT6ZREAYsWtfRD318=;
b=Sx7abAdlBYi5498W2PF2CjVtDkpv8WfBUmcsTidmXA/9WKLnvesT0tp0348bzsqYnzqUYb
rM/YtWtPxXdcgNpmP6ZAjt93xkbGGiLPfsvw+LdKNK/UsnnlU5hWAvYSqkrUKGWb9n5uzg
ee3l9bcyt7UqBqD5yIkPPSLSWB21qeHehm0rBqNZRS8q3Q+U6rj2SAMk60/WnBCBBZRPJD
s4pgb5tMHYT0OrQPHJkh0R8kUfUmtI4dnNUWGkBjM3D3CiT1lbis2gDzfl+036+q+wWRS+
EsHPOfWZYaVRwjY+p2KsEuBnrj6x0ETAhjs81C4IcGRzb7Nm25TcNLXpxzE8yA==
Authentication-Results: outgoing_mbo_mout; dkim=none;
spf=pass (outgoing_mbo_mout: domain of juri@HIDDEN designates
2001:67c:2050:b231:465::2 as permitted sender) smtp.mailfrom=juri@HIDDEN
From: Juri Linkov <juri@HIDDEN>
Organization: LINKOV.NET
Date: Fri, 14 Nov 2025 09:07:52 +0200
Message-ID: <87v7jdrv93.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Rspamd-Queue-Id: 4d77lC4hksz9t0n
Received-SPF: pass client-ip=2001:67c:2050:0:465::103;
envelope-from=juri@HIDDEN; helo=mout-p-103.mailbox.org
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,
RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001,
SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 1.0 (+)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)
--=-=-=
Content-Type: text/plain
Since on many terminal emulators S-f10 is not available,
here is a patch that binds it to C-f10 only on tty and context-menu-mode.
PS: not sure if it would be ok if Emacs started as daemon
will bind 'C-f10' to the context menu, then emacsclient will
still retain 'C-f10' on a graphical frame. If this is a problem,
then we could define the binding conditionally using :filter.
--=-=-=
Content-Type: text/x-diff
Content-Disposition: inline; filename=context-menu-mode-C-f10.patch
diff --git a/etc/NEWS b/etc/NEWS
index 35c536d6ee8..e645c7c2e72 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -297,6 +297,10 @@ to extend the boundaries of the active region by dragging the mouse pointer.
The menu item enables sending current file(s) or region text to external
(non-Emacs) applications or services. See send-to.el for customisations.
+---
+*** In 'context-menu-mode' 'C-f10' pops up the context menu on tty.
+This is because 'S-f10' is often intercepted by the terminal emulator.
+
---
*** The mouse now drags lines in character increments again.
Dragging a horizontal or vertical line like the mode line or the lines
diff --git a/lisp/mouse.el b/lisp/mouse.el
index f75800763e6..5c28f6f05f9 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -690,6 +690,9 @@ context-menu-mode-map
(define-key map [mouse-3] #'ignore)
(define-key map [down-mouse-3] context-menu-entry)
(define-key map [menu] #'context-menu-open)
+ ;; Use C-f10 since S-f10 is intercepted by many terminal emulators.
+ (unless window-system
+ (define-key map [C-f10] #'context-menu-open))
(if (featurep 'w32)
(define-key map [apps] #'context-menu-open))
(when (featurep 'ns)
--=-=-=--
Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) Content-Type: text/plain; charset=utf-8 X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: Juri Linkov <juri@HIDDEN> Subject: bug#79830: Acknowledgement (Context menu keys on tty) Message-ID: <handler.79830.B.17631047218713.ack <at> debbugs.gnu.org> References: <87v7jdrv93.fsf@HIDDEN> X-Gnu-PR-Message: ack 79830 X-Gnu-PR-Package: emacs Reply-To: 79830 <at> debbugs.gnu.org Date: Fri, 14 Nov 2025 07:19:02 +0000 Thank you for filing a new bug report with debbugs.gnu.org. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. As you requested using X-Debbugs-CC, your message was also forwarded to Spencer Baugh <sbaugh@HIDDEN> (after having been given a bug report number, if it did not have one). Your message has been sent to the package maintainer(s): bug-gnu-emacs@HIDDEN If you wish to submit further information on this problem, please send it to 79830 <at> debbugs.gnu.org. Please do not send mail to help-debbugs@HIDDEN unless you wish to report a problem with the Bug-tracking system. --=20 79830: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D79830 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.