From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alex Hutcheson via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#54027: Wishlist: Support full CSI u specification for terminal input Date: Wed, 16 Feb 2022 18:24:13 +0000 Message-ID: Reply-To: Alex Hutcheson Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8"; format=flowed; delsp=yes Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25023"; mail-complaints-to="usenet@ciao.gmane.io" To: 54027@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Feb 16 19:25:14 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1nKOzI-0006Hl-TC for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 16 Feb 2022 19:25:12 +0100 Original-Received: from localhost ([::1]:56266 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nKOzH-0006aW-HJ for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 16 Feb 2022 13:25:11 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:37782) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nKOz9-0006aO-G2 for bug-gnu-emacs@gnu.org; Wed, 16 Feb 2022 13:25:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55510) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nKOz9-0000GN-6n for bug-gnu-emacs@gnu.org; Wed, 16 Feb 2022 13:25:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nKOz8-0005Yk-SO for bug-gnu-emacs@gnu.org; Wed, 16 Feb 2022 13:25:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Alex Hutcheson Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 16 Feb 2022 18:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 54027 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.164503587521328 (code B ref -1); Wed, 16 Feb 2022 18:25:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 16 Feb 2022 18:24:35 +0000 Original-Received: from localhost ([127.0.0.1]:49407 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nKOyh-0005Xw-6H for submit@debbugs.gnu.org; Wed, 16 Feb 2022 13:24:35 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:35246) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <3T0ENYg0KDR44F8RBON6B8MIHAIIAF8.6IG5OA-AHO-8G46MAHO.ILA@flex--alexhutcheson.bounces.google.com>) id 1nKOyf-0005Xn-5C for submit@debbugs.gnu.org; Wed, 16 Feb 2022 13:24:34 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:37654) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <3T0ENYg0KDR44F8RBON6B8MIHAIIAF8.6IG5OA-AHO-8G46MAHO.ILA@flex--alexhutcheson.bounces.google.com>) id 1nKOye-0006Xe-JJ for bug-gnu-emacs@gnu.org; Wed, 16 Feb 2022 13:24:33 -0500 Original-Received: from [2607:f8b0:4864:20::b49] (port=45592 helo=mail-yb1-xb49.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <3T0ENYg0KDR44F8RBON6B8MIHAIIAF8.6IG5OA-AHO-8G46MAHO.ILA@flex--alexhutcheson.bounces.google.com>) id 1nKOyX-00007A-RN for bug-gnu-emacs@gnu.org; Wed, 16 Feb 2022 13:24:27 -0500 Original-Received: by mail-yb1-xb49.google.com with SMTP id 2-20020a251302000000b006118f867dadso5839544ybt.12 for ; Wed, 16 Feb 2022 10:24:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:message-id:mime-version:subject:from:to; bh=1j/cnGFqNX4OV3y5nJJRJKr9KW97eV25JX3UDHcCxEw=; b=iP/MLbyhJyA45vkhVCPfHHKiiFrfte7s6wGrvjHC6hMw1d/sRrnBEmYL7pKQmsnfwd s9BleMtNI1vs7If/NdrIQe8JUSkVC4VXq4hW8kYsx4fibs0uHgxR8NRcNkLuJGHbrN3Z 81BtxgiIw88ALuv/pRnyT0JfhjkMwjiSw4GIAngYsn98MAMKqr/T64dSwSTSBmmwzB+d dGYuZZt/8sxMqbEHoJMRca0c7JCSL4e6dI7ue0ikI6LafyaFuX4JoJm6VZrLAkWx2Rl9 Asrow8A3FdF0QSpZwwvyU06qWjEgqnYRvmRgG3y8FC2nJa0vLJkCkWNzlG25MSNXKxXt e7gQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:message-id:mime-version:subject:from:to; bh=1j/cnGFqNX4OV3y5nJJRJKr9KW97eV25JX3UDHcCxEw=; b=g2bljl696EGSJacJtWDFBtRunKKpmaQNh3HHNd4j695tAPS9FrnoRSWph+EwpojGir Bd/5zPv5PF8z+rsRIEm4s99qiuiTPjF3776nzD158icng5f3Bk/PgSAnIThLk8jNBdfn ZizqD8D7YgFmQptgPeOK+auwVN/PT94Ypl19xoSY/h09kX6cYCOg6p9hK3IGyrDtXulO XeLliuIwF1aiY+R2/RSA9IusBst2/ffLwpS7xtvasrw1cq8sm7ifBClQGS4QNgRJCtuf /JSe0wN4dnlH+167wklnBBdqMG5rkmkVFQWyU+Mw2EkUzdvUQRFG7SrRlMyt5fPZut2H 9Biw== X-Gm-Message-State: AOAM531UL2JwvEKkwoo4BQPm69KxL6G/86CCQG2khzBh5BizTeMwmmVx +Q3Vmj4+SQUuQDFhWTVKyGYmvjmPKZroStr6wN+979/dXBVKGjIUGwqRvHJFI8P1lAg2/EQG9Qb /2iXfgU5obo3jBouP6mPGpAHI6Qn8WjzyIGcU2As3wsf5Ut6B9RInaSDI1GSmC9BBDEWrkH/lO3 nGpYE= X-Google-Smtp-Source: ABdhPJytkIToDap5xebb4VEH6zfNk5p9bMnMUzqVd4ApNCFuZIFBvlzHVisVQ49wkoo3qRxNR9MCQ2ApNu7hf/DsER1w X-Received: from alexh.c.googlers.com ([fda3:e722:ac3:cc00:2b:7d90:c0a8:2248]) (user=alexhutcheson job=sendgmr) by 2002:a25:bd14:0:b0:61d:87ce:8b6c with SMTP id f20-20020a25bd14000000b0061d87ce8b6cmr3284154ybk.690.1645035855608; Wed, 16 Feb 2022 10:24:15 -0800 (PST) X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::b49 (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::b49; envelope-from=3T0ENYg0KDR44F8RBON6B8MIHAIIAF8.6IG5OA-AHO-8G46MAHO.ILA@flex--alexhutcheson.bounces.google.com; helo=mail-yb1-xb49.google.com X-Spam_score_int: -77 X-Spam_score: -7.8 X-Spam_bar: ------- X-Spam_report: (-7.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, PDS_HP_HELO_NORDNS=0.978, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, USER_IN_DEF_DKIM_WL=-7.5 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:227043 Archived-At: CSI u is a mechanism for reporting keystrokes that is more powerful than the standard used in Unix. The specification is detailed at: http://www.leonerd.org.uk/hacks/fixterms/ The specification is implemented by iTerm2, which is a popular GPL-licensed terminal for macOS: https://iterm2.com/documentation-csiu.html A variant of the specification is implemented by kitty, another GPL-licensed terminal on Linux and macOS: https://sw.kovidgoyal.net/kitty/keyboard-protocol/#comprehensive-keyboard-handling-in-terminals The GPL-licensed mintty terminal for Windows also has support: https://github.com/mintty/mintty/wiki/Keycodes Emacs contains code in xterm.el that can handle a subset of the possible key combinations encoded to this specification, but not all of them. For example, iTerm2 is able to send an encoding for Ctrl-Shift-n (aka C-N), but Emacs is unable to recognized the CSI u encoding for this key combination. My feature request is to implement full support for the encoding, so that users using a supported terminal can send the full range of key combinations to an Emacs running in a terminal. Additional context: https://emacs.stackexchange.com/a/13957