From unknown Sun Jun 22 11:37:10 2025 X-Loop: help-debbugs@gnu.org Subject: bug#13839: xterm/mintty control sequences support when formatOtherKeys = 1 Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: victorhge@gmail.com, bug-gnu-emacs@gnu.org Resent-Date: Thu, 28 Feb 2013 15:45:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 13839 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 13839@debbugs.gnu.org Cc: Victor Ren X-Debbugs-Original-To: bug-gnu-emacs@gnu.org X-Debbugs-Original-Xcc: Victor Ren Received: via spool by submit@debbugs.gnu.org id=B.13620663025488 (code B ref -1); Thu, 28 Feb 2013 15:45:03 +0000 Received: (at submit) by debbugs.gnu.org; 28 Feb 2013 15:45:02 +0000 Received: from localhost ([127.0.0.1]:56335 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UB5fJ-0001QN-EK for submit@debbugs.gnu.org; Thu, 28 Feb 2013 10:45:01 -0500 Received: from eggs.gnu.org ([208.118.235.92]:35584) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UB5fD-0001QC-UJ for submit@debbugs.gnu.org; Thu, 28 Feb 2013 10:44:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UB5dG-0008V9-BZ for submit@debbugs.gnu.org; Thu, 28 Feb 2013 10:42:59 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-102.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, USER_IN_WHITELIST autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:60825) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UB5dG-0008Uz-9X for submit@debbugs.gnu.org; Thu, 28 Feb 2013 10:42:54 -0500 Received: from eggs.gnu.org ([208.118.235.92]:46900) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UB5dE-0005h9-KT for bug-gnu-emacs@gnu.org; Thu, 28 Feb 2013 10:42:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UB5dD-0008SO-1p for bug-gnu-emacs@gnu.org; Thu, 28 Feb 2013 10:42:52 -0500 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:38212) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UB5dC-0008S1-QV for bug-gnu-emacs@gnu.org; Thu, 28 Feb 2013 10:42:50 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EABK/CFFFpaTU/2dsb2JhbABEvw4Xc4IeAQEEV3ImGA03iAsGoAuhIoJKixeDKQOIYZwZgV6DFQ X-IPAS-Result: Av0EABK/CFFFpaTU/2dsb2JhbABEvw4Xc4IeAQEEV3ImGA03iAsGoAuhIoJKixeDKQOIYZwZgV6DFQ X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="2689188" Received: from 69-165-164-212.dsl.teksavvy.com (HELO pastel.home) ([69.165.164.212]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 28 Feb 2013 10:42:48 -0500 Received: by pastel.home (Postfix, from userid 20848) id 092C16BDCD; Thu, 28 Feb 2013 10:42:48 -0500 (EST) From: Stefan Monnier Message-ID: Date: Thu, 28 Feb 2013 10:42:47 -0500 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -3.5 (---) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.2 (------) --=-=-= Content-Type: text/plain Moving this to the bug tracker. --=-=-= Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 8bit Return-Path: X-Original-To: monnier@iro.umontreal.ca Delivered-To: monnier@iro.umontreal.ca Received: from perlin.iro.umontreal.ca (perlin.iro.umontreal.ca [132.204.24.51]) by mercure.iro.umontreal.ca (Postfix) with ESMTP id C606E84926 for ; Thu, 28 Feb 2013 09:35:57 -0500 (EST) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by perlin.iro.umontreal.ca (Postfix) with ESMTP id 8D875830003 for ; Thu, 28 Feb 2013 09:34:50 -0500 (EST) Received: from localhost ([::1]:42909 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UB4ZO-0003w2-5o for monnier@iro.umontreal.ca; Thu, 28 Feb 2013 09:34:50 -0500 Received: from eggs.gnu.org ([208.118.235.92]:55245) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UB4ZC-0003vu-US for emacs-devel@gnu.org; Thu, 28 Feb 2013 09:34:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UB4ZA-0007n3-Cp for emacs-devel@gnu.org; Thu, 28 Feb 2013 09:34:38 -0500 Received: from mail-pb0-f54.google.com ([209.85.160.54]:38638) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UB4ZA-0007mL-4L for emacs-devel@gnu.org; Thu, 28 Feb 2013 09:34:36 -0500 Received: by mail-pb0-f54.google.com with SMTP id rr4so1099277pbb.41 for ; Thu, 28 Feb 2013 06:34:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:references:user-agent:date :in-reply-to:message-id:mime-version:content-type; bh=cNQ3Iot85kif3o3zTY0iKflYAuw4eDF8bUY0os4oTNA=; b=eWiLPKMEjMsP5h2OsoTC2qs/u1VyuAv/hn29+NRIZdwjnrFZ2zjXU51deV2j3C3QuD TXoaE1vBztylh8SHNje+pvmOEL9LsnwmGOE/OzTHoTnQLGZnBKAugxHp8SlKcp6vnDMg ZmfB0OA2ertnEI7DgP+vwB8bXR+gA+Sn3FXLY2Vcg1y4E2/Nhi4PIJponyWivTBvjje/ JoS/bjlcVf8KVggUTfntENvR7jOC+tmUcnJXFRNDMdkg3Rk0sdw8KWphz1ZzdJZrj9bq 2eXAKB06d8AXPR9qi3pJdUtzr6JGsV6Snymp9cw/y7EImvuhszzJjvPA1Vzv1GwG+XYv B73g== X-Received: by 10.68.194.2 with SMTP id hs2mr9255356pbc.192.1362062075174; Thu, 28 Feb 2013 06:34:35 -0800 (PST) Received: from Sally_laner-PC.yourcompany.com ([180.174.215.165]) by mx.google.com with ESMTPS id kt5sm8544541pbc.30.2013.02.28.06.34.31 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 28 Feb 2013 06:34:34 -0800 (PST) From: Victor Ren To: Stefan Monnier , emacs-devel@gnu.org Subject: Re: xterm/mintty control sequences support when formatOtherKeys = 1 References: User-Agent: Emacs+gnus Date: Thu, 28 Feb 2013 22:33:58 +0800 In-Reply-To: (Stefan Monnier's message of "Wed, 27 Feb 2013 10:29:46 -0500") Message-ID: <83mwuopkx5.fsf@ericsson.com> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 209.85.160.54 Cc: Ren Victor X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Copy: yes Errors-To: emacs-devel-bounces+monnier=iro.umontreal.ca@gnu.org Sender: emacs-devel-bounces+monnier=iro.umontreal.ca@gnu.org X-DIRO-MailScanner-Information: Please contact the ISP for more information X-DIRO-MailScanner: Found to be clean X-DIRO-MailScanner-SpamCheck: n'est pas un polluriel, SpamAssassin (score=-1.93, requis 5, BAYES_00 -2.60, MC_POURMOI 0.01, MC_TSTLAST 0.00, RECEIVED_FROM_NOUNK 0.66, SPF_HELO_PASS -0.00) X-DIRO-MailScanner-From: emacs-devel-bounces+monnier=iro.umontreal.ca@gnu.org X-Spam-Status: No >>>>> "" == Stefan Monnier writes: >> For example, pressing C-0 in xterm will send control sequence >> "\e[27;5;48~" by default, which is supported now. When >> "formatOtherKeys" is set to 1, C-0 is sent as "\e[48;5u" which is >> another shorter format. >> The easiest change I can image is to define a lot of key binds >> for those control sequence, for example, (define-key map >> "\e[48;5u" [?\C-0]) > Y see, that looks fine. If you can prepare a patch for it, I'd > be very happy to install it. Or can we simply take all the > "\e[27;NN,MM~" and add a corresponding "\e[MM;NNu"? If so, I can > write the patch myself. Yes, I think so. Maybe this is the better way than checking terminal capacities and then deciding to enable which format. /Victor > Stefan >> On Wed, Feb 27, 2013 at 9:54 PM, Stefan Monnier wrote: >>> > When setting "formatOtherKeys" resource to 1 in xterm, 'CSI u' >>> format is > used for non-standard keycodes. This is also how >>> mintty support > "modifyOtherKeys" by default. >>> >>> > But in term/xterm.el, only 'CSI 27" format is supported. >>> >>> > I think it is worth supporting "CSI u" format control >>> sequences. > What do you think of adding them to >>> teerm/xterm.el? or anyone can do it? >>> >>> I'm not familiar with those "CSI 27" and "CSI u" formats (the >>> name vaguely reminds me of distant memories, but that's about >>> it). Could give us an idea of what kind of changes to >>> term/xterm.el that would entail? >>> >>> >>> Stefan >>> --=-=-=-- From unknown Sun Jun 22 11:37:10 2025 X-Loop: help-debbugs@gnu.org Subject: bug#13839: xterm/mintty control sequences support when formatOtherKeys = 1 Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 28 Feb 2013 16:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13839 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 13839@debbugs.gnu.org Cc: Victor Ren Received: via spool by 13839-submit@debbugs.gnu.org id=B13839.136206921510021 (code B ref 13839); Thu, 28 Feb 2013 16:34:02 +0000 Received: (at 13839) by debbugs.gnu.org; 28 Feb 2013 16:33:35 +0000 Received: from localhost ([127.0.0.1]:56395 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UB6QH-0002bY-Gy for submit@debbugs.gnu.org; Thu, 28 Feb 2013 11:33:34 -0500 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:10089) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UB6QE-0002bR-Oy for 13839@debbugs.gnu.org; Thu, 28 Feb 2013 11:33:31 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av8EABK/CFFFpaTU/2dsb2JhbABEuzWDWRdzgh4BAQQBJy8jEAs0EhQYDYhCBsEtgkqOQAOIYZwZgV6DFQ X-IPAS-Result: Av8EABK/CFFFpaTU/2dsb2JhbABEuzWDWRdzgh4BAQQBJy8jEAs0EhQYDYhCBsEtgkqOQAOIYZwZgV6DFQ X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="2695059" Received: from 69-165-164-212.dsl.teksavvy.com (HELO pastel.home) ([69.165.164.212]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 28 Feb 2013 11:31:32 -0500 Received: by pastel.home (Postfix, from userid 20848) id C63516BDCD; Thu, 28 Feb 2013 11:31:17 -0500 (EST) From: Stefan Monnier Message-ID: References: Date: Thu, 28 Feb 2013 11:31:17 -0500 In-Reply-To: (Stefan Monnier's message of "Thu, 28 Feb 2013 10:42:47 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) >> Y see, that looks fine. If you can prepare a patch for it, I'd >> be very happy to install it. Or can we simply take all the >> "\e[27;NN,MM~" and add a corresponding "\e[MM;NNu"? If so, I can >> write the patch myself. > Yes, I think so. Maybe this is the better way than checking terminal > capacities and then deciding to enable which format. Can you confirm that the patch below works for your formatOtherKeys=1 case? Stefan === modified file 'lisp/term/xterm.el' --- lisp/term/xterm.el 2013-02-12 17:36:54 +0000 +++ lisp/term/xterm.el 2013-02-28 16:30:30 +0000 @@ -251,120 +251,124 @@ ;; These keys are available in xterm starting from version 216 ;; if the modifyOtherKeys resource is set to 1. - - (define-key map "\e[27;5;9~" [C-tab]) - (define-key map "\e[27;5;13~" [C-return]) - (define-key map "\e[27;5;39~" [?\C-\']) - (define-key map "\e[27;5;44~" [?\C-,]) - (define-key map "\e[27;5;45~" [?\C--]) - (define-key map "\e[27;5;46~" [?\C-.]) - (define-key map "\e[27;5;47~" [?\C-/]) - (define-key map "\e[27;5;48~" [?\C-0]) - (define-key map "\e[27;5;49~" [?\C-1]) + (dolist (bind '((5 9 [C-tab]) + (5 13 [C-return]) + (5 39 [?\C-\']) + (5 44 [?\C-,]) + (5 45 [?\C--]) + (5 46 [?\C-.]) + (5 47 [?\C-/]) + (5 48 [?\C-0]) + (5 49 [?\C-1]) ;; Not all C-DIGIT keys have a distinct binding. - (define-key map "\e[27;5;57~" [?\C-9]) - (define-key map "\e[27;5;59~" [?\C-\;]) - (define-key map "\e[27;5;61~" [?\C-=]) - (define-key map "\e[27;5;92~" [?\C-\\]) - - (define-key map "\e[27;6;33~" [?\C-!]) - (define-key map "\e[27;6;34~" [?\C-\"]) - (define-key map "\e[27;6;35~" [?\C-#]) - (define-key map "\e[27;6;36~" [?\C-$]) - (define-key map "\e[27;6;37~" [?\C-%]) - (define-key map "\e[27;6;38~" [?\C-&]) - (define-key map "\e[27;6;40~" [?\C-(]) - (define-key map "\e[27;6;41~" [?\C-)]) - (define-key map "\e[27;6;42~" [?\C-*]) - (define-key map "\e[27;6;43~" [?\C-+]) - (define-key map "\e[27;6;58~" [?\C-:]) - (define-key map "\e[27;6;60~" [?\C-<]) - (define-key map "\e[27;6;62~" [?\C->]) - (define-key map "\e[27;6;63~" [(control ??)]) - - ;; These are the strings emitted for various C-M- combinations - ;; for keyboards that the Meta and Alt modifiers are on the same - ;; key (usually labeled "Alt"). - (define-key map "\e[27;13;9~" [C-M-tab]) - (define-key map "\e[27;13;13~" [C-M-return]) - - (define-key map "\e[27;13;39~" [?\C-\M-\']) - (define-key map "\e[27;13;44~" [?\C-\M-,]) - (define-key map "\e[27;13;45~" [?\C-\M--]) - (define-key map "\e[27;13;46~" [?\C-\M-.]) - (define-key map "\e[27;13;47~" [?\C-\M-/]) - (define-key map "\e[27;13;48~" [?\C-\M-0]) - (define-key map "\e[27;13;49~" [?\C-\M-1]) - (define-key map "\e[27;13;50~" [?\C-\M-2]) - (define-key map "\e[27;13;51~" [?\C-\M-3]) - (define-key map "\e[27;13;52~" [?\C-\M-4]) - (define-key map "\e[27;13;53~" [?\C-\M-5]) - (define-key map "\e[27;13;54~" [?\C-\M-6]) - (define-key map "\e[27;13;55~" [?\C-\M-7]) - (define-key map "\e[27;13;56~" [?\C-\M-8]) - (define-key map "\e[27;13;57~" [?\C-\M-9]) - (define-key map "\e[27;13;59~" [?\C-\M-\;]) - (define-key map "\e[27;13;61~" [?\C-\M-=]) - (define-key map "\e[27;13;92~" [?\C-\M-\\]) - - (define-key map "\e[27;14;33~" [?\C-\M-!]) - (define-key map "\e[27;14;34~" [?\C-\M-\"]) - (define-key map "\e[27;14;35~" [?\C-\M-#]) - (define-key map "\e[27;14;36~" [?\C-\M-$]) - (define-key map "\e[27;14;37~" [?\C-\M-%]) - (define-key map "\e[27;14;38~" [?\C-\M-&]) - (define-key map "\e[27;14;40~" [?\C-\M-\(]) - (define-key map "\e[27;14;41~" [?\C-\M-\)]) - (define-key map "\e[27;14;42~" [?\C-\M-*]) - (define-key map "\e[27;14;43~" [?\C-\M-+]) - (define-key map "\e[27;14;58~" [?\C-\M-:]) - (define-key map "\e[27;14;60~" [?\C-\M-<]) - (define-key map "\e[27;14;62~" [?\C-\M->]) - (define-key map "\e[27;14;63~" [(control meta ??)]) - - (define-key map "\e[27;7;9~" [C-M-tab]) - (define-key map "\e[27;7;13~" [C-M-return]) - - (define-key map "\e[27;7;32~" [?\C-\M-\s]) - (define-key map "\e[27;7;39~" [?\C-\M-\']) - (define-key map "\e[27;7;44~" [?\C-\M-,]) - (define-key map "\e[27;7;45~" [?\C-\M--]) - (define-key map "\e[27;7;46~" [?\C-\M-.]) - (define-key map "\e[27;7;47~" [?\C-\M-/]) - (define-key map "\e[27;7;48~" [?\C-\M-0]) - (define-key map "\e[27;7;49~" [?\C-\M-1]) - (define-key map "\e[27;7;50~" [?\C-\M-2]) - (define-key map "\e[27;7;51~" [?\C-\M-3]) - (define-key map "\e[27;7;52~" [?\C-\M-4]) - (define-key map "\e[27;7;53~" [?\C-\M-5]) - (define-key map "\e[27;7;54~" [?\C-\M-6]) - (define-key map "\e[27;7;55~" [?\C-\M-7]) - (define-key map "\e[27;7;56~" [?\C-\M-8]) - (define-key map "\e[27;7;57~" [?\C-\M-9]) - (define-key map "\e[27;7;59~" [?\C-\M-\;]) - (define-key map "\e[27;7;61~" [?\C-\M-=]) - (define-key map "\e[27;7;92~" [?\C-\M-\\]) - - (define-key map "\e[27;8;33~" [?\C-\M-!]) - (define-key map "\e[27;8;34~" [?\C-\M-\"]) - (define-key map "\e[27;8;35~" [?\C-\M-#]) - (define-key map "\e[27;8;36~" [?\C-\M-$]) - (define-key map "\e[27;8;37~" [?\C-\M-%]) - (define-key map "\e[27;8;38~" [?\C-\M-&]) - (define-key map "\e[27;8;40~" [?\C-\M-\(]) - (define-key map "\e[27;8;41~" [?\C-\M-\)]) - (define-key map "\e[27;8;42~" [?\C-\M-*]) - (define-key map "\e[27;8;43~" [?\C-\M-+]) - (define-key map "\e[27;8;58~" [?\C-\M-:]) - (define-key map "\e[27;8;60~" [?\C-\M-<]) - (define-key map "\e[27;8;62~" [?\C-\M->]) - (define-key map "\e[27;8;63~" [(control meta ??)]) - - (define-key map "\e[27;2;9~" [S-tab]) - (define-key map "\e[27;2;13~" [S-return]) - - (define-key map "\e[27;6;9~" [C-S-tab]) - (define-key map "\e[27;6;13~" [C-S-return]) + (5 57 [?\C-9]) + (5 59 [?\C-\;]) + (5 61 [?\C-=]) + (5 92 [?\C-\\]) + + (6 33 [?\C-!]) + (6 34 [?\C-\"]) + (6 35 [?\C-#]) + (6 36 [?\C-$]) + (6 37 [?\C-%]) + (6 38 [?\C-&]) + (6 40 [?\C-\(]) + (6 41 [?\C-\)]) + (6 42 [?\C-*]) + (6 43 [?\C-+]) + (6 58 [?\C-:]) + (6 60 [?\C-<]) + (6 62 [?\C->]) + (6 63 [(control ??)]) + + ;; These are the strings emitted for various C-M- + ;; combinations for keyboards whose Meta and Alt + ;; modifiers are on the same key (usually labeled "Alt"). + (13 9 [C-M-tab]) + (13 13 [C-M-return]) + + (13 39 [?\C-\M-\']) + (13 44 [?\C-\M-,]) + (13 45 [?\C-\M--]) + (13 46 [?\C-\M-.]) + (13 47 [?\C-\M-/]) + (13 48 [?\C-\M-0]) + (13 49 [?\C-\M-1]) + (13 50 [?\C-\M-2]) + (13 51 [?\C-\M-3]) + (13 52 [?\C-\M-4]) + (13 53 [?\C-\M-5]) + (13 54 [?\C-\M-6]) + (13 55 [?\C-\M-7]) + (13 56 [?\C-\M-8]) + (13 57 [?\C-\M-9]) + (13 59 [?\C-\M-\;]) + (13 61 [?\C-\M-=]) + (13 92 [?\C-\M-\\]) + + (14 33 [?\C-\M-!]) + (14 34 [?\C-\M-\"]) + (14 35 [?\C-\M-#]) + (14 36 [?\C-\M-$]) + (14 37 [?\C-\M-%]) + (14 38 [?\C-\M-&]) + (14 40 [?\C-\M-\(]) + (14 41 [?\C-\M-\)]) + (14 42 [?\C-\M-*]) + (14 43 [?\C-\M-+]) + (14 58 [?\C-\M-:]) + (14 60 [?\C-\M-<]) + (14 62 [?\C-\M->]) + (14 63 [(control meta ??)]) + + (7 9 [C-M-tab]) + (7 13 [C-M-return]) + + (7 32 [?\C-\M-\s]) + (7 39 [?\C-\M-\']) + (7 44 [?\C-\M-,]) + (7 45 [?\C-\M--]) + (7 46 [?\C-\M-.]) + (7 47 [?\C-\M-/]) + (7 48 [?\C-\M-0]) + (7 49 [?\C-\M-1]) + (7 50 [?\C-\M-2]) + (7 51 [?\C-\M-3]) + (7 52 [?\C-\M-4]) + (7 53 [?\C-\M-5]) + (7 54 [?\C-\M-6]) + (7 55 [?\C-\M-7]) + (7 56 [?\C-\M-8]) + (7 57 [?\C-\M-9]) + (7 59 [?\C-\M-\;]) + (7 61 [?\C-\M-=]) + (7 92 [?\C-\M-\\]) + + (8 33 [?\C-\M-!]) + (8 34 [?\C-\M-\"]) + (8 35 [?\C-\M-#]) + (8 36 [?\C-\M-$]) + (8 37 [?\C-\M-%]) + (8 38 [?\C-\M-&]) + (8 40 [?\C-\M-\(]) + (8 41 [?\C-\M-\)]) + (8 42 [?\C-\M-*]) + (8 43 [?\C-\M-+]) + (8 58 [?\C-\M-:]) + (8 60 [?\C-\M-<]) + (8 62 [?\C-\M->]) + (8 63 [(control meta ??)]) + + (2 9 [S-tab]) + (2 13 [S-return]) + + (6 9 [C-S-tab]) + (6 13 [C-S-return]))) + (define-key map + (format "\e[27;%d;%d~" (nth 0 bind) (nth 1 bind)) (nth 2 bind)) + ;; For formatOtherKeys=1, the sequence is a bit shorter (bug#13839). + (define-key map + (format "\e[%d;%du" (nth 1 bind) (nth 0 bind)) (nth 2 bind))) ;; Other versions of xterm might emit these. (define-key map "\e[A" [up]) From unknown Sun Jun 22 11:37:10 2025 X-Loop: help-debbugs@gnu.org Subject: bug#13839: xterm/mintty control sequences support when formatOtherKeys = 1 Resent-From: Ren Victor Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 01 Mar 2013 15:18:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13839 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: 13839@debbugs.gnu.org Received: via spool by 13839-submit@debbugs.gnu.org id=B13839.136215107810429 (code B ref 13839); Fri, 01 Mar 2013 15:18:01 +0000 Received: (at 13839) by debbugs.gnu.org; 1 Mar 2013 15:17:58 +0000 Received: from localhost ([127.0.0.1]:58248 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UBRif-0002i9-IZ for submit@debbugs.gnu.org; Fri, 01 Mar 2013 10:17:58 -0500 Received: from mail-qe0-f44.google.com ([209.85.128.44]:35133) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UBRib-0002hz-90 for 13839@debbugs.gnu.org; Fri, 01 Mar 2013 10:17:55 -0500 Received: by mail-qe0-f44.google.com with SMTP id x7so2395703qeu.31 for <13839@debbugs.gnu.org>; Fri, 01 Mar 2013 07:15:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type:content-transfer-encoding; bh=lPiBG31yGwvpxuW2hHzdvWOBngn/vGjhnLRwQRu/Tu0=; b=w+9oHWvbbDcLllXMNN0KWw1XWlnsBw4ZcGuS9sAluEi1PquAoGUArSSvUb+juQQtNG IUU5oxsKPGe9O4V2c/aXlFEFCxWNBrO5vBS6taNQfHwCIELN656QkG3p8+U6KxWS3mo4 b5fOqlMZ5IENt3hXCHIyssu5EWsNRfOwhJ+QS9ujN8ub8RPS06fYj7pdPr70zJytbrI/ eJb8ztvTjJmgYzm2cKHJY/DUtSGUHoG67Nj6QTWe75WZoxO+NEnOq61fspGA8WbWpgsd ocs/ylb8Bw29tgtxDdut/YdPlqaQ7FgnbF4b1G8jTnDXAxRMpPuvYgkQy+IvRQQoQ5N3 XsDA== MIME-Version: 1.0 X-Received: by 10.49.73.232 with SMTP id o8mr18931100qev.0.1362150950327; Fri, 01 Mar 2013 07:15:50 -0800 (PST) Received: by 10.49.2.106 with HTTP; Fri, 1 Mar 2013 07:15:50 -0800 (PST) In-Reply-To: References: Date: Fri, 1 Mar 2013 23:15:50 +0800 Message-ID: From: Ren Victor Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.1 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) On Fri, Mar 1, 2013 at 12:31 AM, Stefan Monnier wrote: > > >> Y see, that looks fine. If you can prepare a patch for it, I'd > >> be very happy to install it. Or can we simply take all the > >> "\e[27;NN,MM~" and add a corresponding "\e[MM;NNu"? If so, I can > >> write the patch myself. > > Yes, I think so. Maybe this is the better way than checking terminal > > capacities and then deciding to enable which format. > > Can you confirm that the patch below works for your formatOtherKeys=3D1 c= ase? There is no problem in the patch itself. But the xterm extra capability su= pport does not work automatically due to another bug in lisp/term/xterm.el - the regexp in line 532 ">0;\\([0-9]+\\);0". It should be ">[0-9]+;\\([0-9]+\\);0". The number before the first semi-colon could be many different values, acco= rding to http://invisible-island.net/xterm/ctlseqs/ctlseqs.html section "Send Device Attributes (Secondary DA)": P p =3D 0 =E2=86=92 =E2=80=98=E2=80=98VT100=E2=80=99=E2=80=99. P p =3D 1 =E2=86=92 =E2=80=98=E2=80=98VT220=E2=80=99=E2=80=99. P p =3D 2 =E2=86=92 =E2=80=98=E2=80=98VT240=E2=80=99=E2=80=99. P p =3D 1 8 =E2=86=92 =E2=80=98=E2=80=98VT330=E2=80=99=E2=80=99. P p =3D 1 9 =E2=86=92 =E2=80=98=E2=80=98VT340=E2=80=99=E2=80=99. P p =3D 2 4 =E2=86=92 =E2=80=98=E2=80=98VT320=E2=80=99=E2=80=99. P p =3D 4 1 =E2=86=92 =E2=80=98=E2=80=98VT420=E2=80=99=E2=80=99. P p =3D 6 1 =E2=86=92 =E2=80=98=E2=80=98VT510=E2=80=99=E2=80=99. P p =3D 6 4 =E2=86=92 =E2=80=98=E2=80=98VT520=E2=80=99=E2=80=99. P p =3D 6 5 =E2=86=92 =E2=80=98=E2=80=98VT525=E2=80=99=E2=80=99. The default value is 41 (in xterm latest version manual). Would you fix this bug by the way? > Stefan BR/ Victor Ren > > =3D=3D=3D modified file 'lisp/term/xterm.el' > --- lisp/term/xterm.el 2013-02-12 17:36:54 +0000 > +++ lisp/term/xterm.el 2013-02-28 16:30:30 +0000 > @@ -251,120 +251,124 @@ > > ;; These keys are available in xterm starting from version 216 > ;; if the modifyOtherKeys resource is set to 1. > - > - (define-key map "\e[27;5;9~" [C-tab]) From unknown Sun Jun 22 11:37:10 2025 X-Loop: help-debbugs@gnu.org Subject: bug#13839: xterm/mintty control sequences support when formatOtherKeys = 1 Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 11 Mar 2013 18:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13839 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Ren Victor Cc: 13839@debbugs.gnu.org Received: via spool by 13839-submit@debbugs.gnu.org id=B13839.136302639522571 (code B ref 13839); Mon, 11 Mar 2013 18:27:01 +0000 Received: (at 13839) by debbugs.gnu.org; 11 Mar 2013 18:26:35 +0000 Received: from localhost ([127.0.0.1]:46721 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UF7Qg-0005s0-QK for submit@debbugs.gnu.org; Mon, 11 Mar 2013 14:26:35 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:6483) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UF7Qd-0005rl-JF for 13839@debbugs.gnu.org; Mon, 11 Mar 2013 14:26:32 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFHO+KL9/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLNBIUGA0kiB4GwS2CSo5AA6R6gV6DEw X-IPAS-Result: Av4EABK/CFHO+KL9/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLNBIUGA0kiB4GwS2CSo5AA6R6gV6DEw X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="4241058" Received: from 206-248-162-253.dsl.teksavvy.com (HELO ceviche.home) ([206.248.162.253]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 11 Mar 2013 14:25:28 -0400 Received: by ceviche.home (Postfix, from userid 20848) id 27D08660E5; Mon, 11 Mar 2013 14:25:30 -0400 (EDT) From: Stefan Monnier Message-ID: References: Date: Mon, 11 Mar 2013 14:25:30 -0400 In-Reply-To: (Ren Victor's message of "Fri, 1 Mar 2013 23:15:50 +0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.8 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -0.0 (/) >> Can you confirm that the patch below works for your formatOtherKeys=1 case? > There is no problem in the patch itself. Thanks, installed. > But the xterm extra capability support > does not work automatically due to another bug in lisp/term/xterm.el - > the regexp in line 532 ">0;\\([0-9]+\\);0". It should be > ">[0-9]+;\\([0-9]+\\);0". Hmm... > The default value is 41 (in xterm latest version manual). It seems that indeed the regexp could need revision, but I'd first like to understand what's going on. The test we want to make is "make sure this terminal understands this and that feature". So the "P v" field (the version number) only makes sense if the terminal is actually an xterm (or uses a version numbering that implies the same featureset). In my xterms the "P p" value is always 0 and not 41 as you seem to suggest. More specifically, I'm concerned that by accepting any "P p" number, we might end up trying to use a feature that's not supported by the underlying terminal emulator because it happens to have version numbers that are higher than those of "the usual xterm". Stefan From unknown Sun Jun 22 11:37:10 2025 X-Loop: help-debbugs@gnu.org Subject: bug#13839: xterm/mintty control sequences support when formatOtherKeys = 1 Resent-From: Ren Victor Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 12 Mar 2013 08:06:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13839 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: 13839 <13839@debbugs.gnu.org> Received: via spool by 13839-submit@debbugs.gnu.org id=B13839.136307555811070 (code B ref 13839); Tue, 12 Mar 2013 08:06:03 +0000 Received: (at 13839) by debbugs.gnu.org; 12 Mar 2013 08:05:58 +0000 Received: from localhost ([127.0.0.1]:47600 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UFKDd-0002sV-L5 for submit@debbugs.gnu.org; Tue, 12 Mar 2013 04:05:58 -0400 Received: from mail-qa0-f53.google.com ([209.85.216.53]:38164) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UFKDZ-0002sA-2T for 13839@debbugs.gnu.org; Tue, 12 Mar 2013 04:05:56 -0400 Received: by mail-qa0-f53.google.com with SMTP id z4so1444524qan.5 for <13839@debbugs.gnu.org>; Tue, 12 Mar 2013 01:04:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=P75pvI1gOeCkA4PqmrSW9mQQ2ykHy9vjiP34c6STuaI=; b=Vy3gbvn5d65YJoZYmDtiEmP1z90d+j0Z+bXa00E9tnPrteL7G0TkmuH/TM77m9Beb/ sg1VnoEa/QA5X3r/elB37eW3eA3OWEHjEwGaz8WO3ncPeVSypFYZ8aqaXORY34pHbZei /rHZaptSgil2Y6+meKAvYafVskW8Jnn3Sf4rRmB9e7B63h6Sai9YyLERvgzrsh8VZ4yA 3i51+QXiGFsEEE/AFIRCkOvR3EIIm15s1VizqXPOvIsuuhwq2pnvPNC+KiuXKK0EL9oh TrK5XtCWm1dor43wwiG2Ec3AhWJrhs1h5Okw/7Jc3Ca9qHIytebuuY6Z03VLqANn7Mjm hHmQ== MIME-Version: 1.0 X-Received: by 10.49.117.7 with SMTP id ka7mr23554850qeb.38.1363075488948; Tue, 12 Mar 2013 01:04:48 -0700 (PDT) Received: by 10.49.2.106 with HTTP; Tue, 12 Mar 2013 01:04:48 -0700 (PDT) In-Reply-To: References: Date: Tue, 12 Mar 2013 09:04:48 +0100 Message-ID: From: Ren Victor Content-Type: text/plain; charset=ISO-8859-1 X-Spam-Score: 0.1 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) On Mon, Mar 11, 2013 at 7:25 PM, Stefan Monnier wrote: > > >> Can you confirm that the patch below works for your formatOtherKeys=1 case? > > There is no problem in the patch itself. > > Thanks, installed. > > > But the xterm extra capability support > > does not work automatically due to another bug in lisp/term/xterm.el - > > the regexp in line 532 ">0;\\([0-9]+\\);0". It should be > > ">[0-9]+;\\([0-9]+\\);0". > > Hmm... > > > The default value is 41 (in xterm latest version manual). > > It seems that indeed the regexp could need revision, but I'd first like > to understand what's going on. The test we want to make is "make sure > this terminal understands this and that feature". So the "P v" field > (the version number) only makes sense if the terminal is actually an > xterm (or uses a version numbering that implies the same featureset). > In my xterms the "P p" value is always 0 and not 41 as you seem to suggest. I checked the changelog of xterm. There is one item in Patch #280: change default emulation level to VT420 (discussion with Ailin Nemui). http://invisible-island.net/xterm/xterm.log.html#xterm_280 Anyway, "Pp" value can be configured to several values. Emacs get the terminal type from environment variable "TERM" I don't think "Pp" value is relevant. BR Victor Ren > > More specifically, I'm concerned that by accepting any "P p" number, we > might end up trying to use a feature that's not supported by the > underlying terminal emulator because it happens to have version numbers > that are higher than those of "the usual xterm". > > > Stefan From unknown Sun Jun 22 11:37:10 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.503 (Entity 5.503) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Stefan Monnier Subject: bug#13839: closed (Re: bug#13839: xterm/mintty control sequences support when formatOtherKeys = 1) Message-ID: References: X-Gnu-PR-Message: they-closed 13839 X-Gnu-PR-Package: emacs Reply-To: 13839@debbugs.gnu.org Date: Tue, 08 Jul 2014 18:55:04 +0000 Content-Type: multipart/mixed; boundary="----------=_1404845704-23423-1" This is a multi-part message in MIME format... ------------=_1404845704-23423-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #13839: xterm/mintty control sequences support when formatOtherKeys =3D 1 which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 13839@debbugs.gnu.org. --=20 13839: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D13839 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1404845704-23423-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 13839-done) by debbugs.gnu.org; 8 Jul 2014 18:54:28 +0000 Received: from localhost ([127.0.0.1]:47264 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X4aX5-00063b-1h for submit@debbugs.gnu.org; Tue, 08 Jul 2014 14:54:27 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:29746) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X4aX2-00063H-DO for 13839-done@debbugs.gnu.org; Tue, 08 Jul 2014 14:54:25 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArUGAIDvNVNLd+D9/2dsb2JhbABZgwaDSsA9gRcXdIIlAQEBAQIBViMQCzQSFBgNJIgECNIZF4JcjB4HhDgEqRmBaoNMIQ X-IPAS-Result: ArUGAIDvNVNLd+D9/2dsb2JhbABZgwaDSsA9gRcXdIIlAQEBAQIBViMQCzQSFBgNJIgECNIZF4JcjB4HhDgEqRmBaoNMIQ X-IronPort-AV: E=Sophos;i="4.97,753,1389762000"; d="scan'208";a="76894535" Received: from 75-119-224-253.dsl.teksavvy.com (HELO pastel.home) ([75.119.224.253]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 08 Jul 2014 14:54:18 -0400 Received: by pastel.home (Postfix, from userid 20848) id 1E5A860337; Tue, 8 Jul 2014 14:54:18 -0400 (EDT) From: Stefan Monnier To: Ren Victor Subject: Re: bug#13839: xterm/mintty control sequences support when formatOtherKeys = 1 Message-ID: References: Date: Tue, 08 Jul 2014 14:54:18 -0400 In-Reply-To: (Ren Victor's message of "Tue, 12 Mar 2013 09:04:48 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 13839-done Cc: 13839-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) >> > The default value is 41 (in xterm latest version manual). >> >> It seems that indeed the regexp could need revision, but I'd first like >> to understand what's going on. The test we want to make is "make sure >> this terminal understands this and that feature". So the "P v" field >> (the version number) only makes sense if the terminal is actually an >> xterm (or uses a version numbering that implies the same featureset). >> In my xterms the "P p" value is always 0 and not 41 as you seem to suggest. In the mean time, we've indeed changed this regexp to accept other numbers as well, and sure enough this bumped into new bugs with non-xterm terminals, and we've hacked our way around those as well. So I think this can be closed now. Thank you, Stefan ------------=_1404845704-23423-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 28 Feb 2013 15:45:02 +0000 Received: from localhost ([127.0.0.1]:56335 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UB5fJ-0001QN-EK for submit@debbugs.gnu.org; Thu, 28 Feb 2013 10:45:01 -0500 Received: from eggs.gnu.org ([208.118.235.92]:35584) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UB5fD-0001QC-UJ for submit@debbugs.gnu.org; Thu, 28 Feb 2013 10:44:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UB5dG-0008V9-BZ for submit@debbugs.gnu.org; Thu, 28 Feb 2013 10:42:59 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-102.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, USER_IN_WHITELIST autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:60825) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UB5dG-0008Uz-9X for submit@debbugs.gnu.org; Thu, 28 Feb 2013 10:42:54 -0500 Received: from eggs.gnu.org ([208.118.235.92]:46900) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UB5dE-0005h9-KT for bug-gnu-emacs@gnu.org; Thu, 28 Feb 2013 10:42:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UB5dD-0008SO-1p for bug-gnu-emacs@gnu.org; Thu, 28 Feb 2013 10:42:52 -0500 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:38212) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UB5dC-0008S1-QV for bug-gnu-emacs@gnu.org; Thu, 28 Feb 2013 10:42:50 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EABK/CFFFpaTU/2dsb2JhbABEvw4Xc4IeAQEEV3ImGA03iAsGoAuhIoJKixeDKQOIYZwZgV6DFQ X-IPAS-Result: Av0EABK/CFFFpaTU/2dsb2JhbABEvw4Xc4IeAQEEV3ImGA03iAsGoAuhIoJKixeDKQOIYZwZgV6DFQ X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="2689188" Received: from 69-165-164-212.dsl.teksavvy.com (HELO pastel.home) ([69.165.164.212]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 28 Feb 2013 10:42:48 -0500 Received: by pastel.home (Postfix, from userid 20848) id 092C16BDCD; Thu, 28 Feb 2013 10:42:48 -0500 (EST) From: Stefan Monnier To: bug-gnu-emacs@gnu.org Subject: xterm/mintty control sequences support when formatOtherKeys = 1 Message-ID: X-Debbugs-Cc: Victor Ren Date: Thu, 28 Feb 2013 10:42:47 -0500 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -3.5 (---) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.2 (------) --=-=-= Content-Type: text/plain Moving this to the bug tracker. --=-=-= Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 8bit Return-Path: X-Original-To: monnier@iro.umontreal.ca Delivered-To: monnier@iro.umontreal.ca Received: from perlin.iro.umontreal.ca (perlin.iro.umontreal.ca [132.204.24.51]) by mercure.iro.umontreal.ca (Postfix) with ESMTP id C606E84926 for ; Thu, 28 Feb 2013 09:35:57 -0500 (EST) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by perlin.iro.umontreal.ca (Postfix) with ESMTP id 8D875830003 for ; Thu, 28 Feb 2013 09:34:50 -0500 (EST) Received: from localhost ([::1]:42909 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UB4ZO-0003w2-5o for monnier@iro.umontreal.ca; Thu, 28 Feb 2013 09:34:50 -0500 Received: from eggs.gnu.org ([208.118.235.92]:55245) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UB4ZC-0003vu-US for emacs-devel@gnu.org; Thu, 28 Feb 2013 09:34:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UB4ZA-0007n3-Cp for emacs-devel@gnu.org; Thu, 28 Feb 2013 09:34:38 -0500 Received: from mail-pb0-f54.google.com ([209.85.160.54]:38638) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UB4ZA-0007mL-4L for emacs-devel@gnu.org; Thu, 28 Feb 2013 09:34:36 -0500 Received: by mail-pb0-f54.google.com with SMTP id rr4so1099277pbb.41 for ; Thu, 28 Feb 2013 06:34:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:references:user-agent:date :in-reply-to:message-id:mime-version:content-type; bh=cNQ3Iot85kif3o3zTY0iKflYAuw4eDF8bUY0os4oTNA=; b=eWiLPKMEjMsP5h2OsoTC2qs/u1VyuAv/hn29+NRIZdwjnrFZ2zjXU51deV2j3C3QuD TXoaE1vBztylh8SHNje+pvmOEL9LsnwmGOE/OzTHoTnQLGZnBKAugxHp8SlKcp6vnDMg ZmfB0OA2ertnEI7DgP+vwB8bXR+gA+Sn3FXLY2Vcg1y4E2/Nhi4PIJponyWivTBvjje/ JoS/bjlcVf8KVggUTfntENvR7jOC+tmUcnJXFRNDMdkg3Rk0sdw8KWphz1ZzdJZrj9bq 2eXAKB06d8AXPR9qi3pJdUtzr6JGsV6Snymp9cw/y7EImvuhszzJjvPA1Vzv1GwG+XYv B73g== X-Received: by 10.68.194.2 with SMTP id hs2mr9255356pbc.192.1362062075174; Thu, 28 Feb 2013 06:34:35 -0800 (PST) Received: from Sally_laner-PC.yourcompany.com ([180.174.215.165]) by mx.google.com with ESMTPS id kt5sm8544541pbc.30.2013.02.28.06.34.31 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 28 Feb 2013 06:34:34 -0800 (PST) From: Victor Ren To: Stefan Monnier , emacs-devel@gnu.org Subject: Re: xterm/mintty control sequences support when formatOtherKeys = 1 References: User-Agent: Emacs+gnus Date: Thu, 28 Feb 2013 22:33:58 +0800 In-Reply-To: (Stefan Monnier's message of "Wed, 27 Feb 2013 10:29:46 -0500") Message-ID: <83mwuopkx5.fsf@ericsson.com> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 209.85.160.54 Cc: Ren Victor X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Copy: yes Errors-To: emacs-devel-bounces+monnier=iro.umontreal.ca@gnu.org Sender: emacs-devel-bounces+monnier=iro.umontreal.ca@gnu.org X-DIRO-MailScanner-Information: Please contact the ISP for more information X-DIRO-MailScanner: Found to be clean X-DIRO-MailScanner-SpamCheck: n'est pas un polluriel, SpamAssassin (score=-1.93, requis 5, BAYES_00 -2.60, MC_POURMOI 0.01, MC_TSTLAST 0.00, RECEIVED_FROM_NOUNK 0.66, SPF_HELO_PASS -0.00) X-DIRO-MailScanner-From: emacs-devel-bounces+monnier=iro.umontreal.ca@gnu.org X-Spam-Status: No >>>>> "" == Stefan Monnier writes: >> For example, pressing C-0 in xterm will send control sequence >> "\e[27;5;48~" by default, which is supported now. When >> "formatOtherKeys" is set to 1, C-0 is sent as "\e[48;5u" which is >> another shorter format. >> The easiest change I can image is to define a lot of key binds >> for those control sequence, for example, (define-key map >> "\e[48;5u" [?\C-0]) > Y see, that looks fine. If you can prepare a patch for it, I'd > be very happy to install it. Or can we simply take all the > "\e[27;NN,MM~" and add a corresponding "\e[MM;NNu"? If so, I can > write the patch myself. Yes, I think so. Maybe this is the better way than checking terminal capacities and then deciding to enable which format. /Victor > Stefan >> On Wed, Feb 27, 2013 at 9:54 PM, Stefan Monnier wrote: >>> > When setting "formatOtherKeys" resource to 1 in xterm, 'CSI u' >>> format is > used for non-standard keycodes. This is also how >>> mintty support > "modifyOtherKeys" by default. >>> >>> > But in term/xterm.el, only 'CSI 27" format is supported. >>> >>> > I think it is worth supporting "CSI u" format control >>> sequences. > What do you think of adding them to >>> teerm/xterm.el? or anyone can do it? >>> >>> I'm not familiar with those "CSI 27" and "CSI u" formats (the >>> name vaguely reminds me of distant memories, but that's about >>> it). Could give us an idea of what kind of changes to >>> term/xterm.el that would entail? >>> >>> >>> Stefan >>> --=-=-=-- ------------=_1404845704-23423-1--