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: Tue, 24 May 2022 21:25:03 -0400 Message-ID: References: <8335kg1srp.fsf@gnu.org> <83mtieoxpj.fsf@gnu.org> <831qznnq1i.fsf@gnu.org> <83k0dfm81m.fsf@gnu.org> Reply-To: Alex Hutcheson Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000000dfaee05dfcbf25a" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25163"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , 54027@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed May 25 03:26:31 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 1ntfnD-0006M3-4w for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 25 May 2022 03:26:31 +0200 Original-Received: from localhost ([::1]:45420 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ntfnC-0004ll-79 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 24 May 2022 21:26:30 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46006) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ntfmk-0004i6-Rr for bug-gnu-emacs@gnu.org; Tue, 24 May 2022 21:26:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:60015) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ntfmk-0007jL-Iw for bug-gnu-emacs@gnu.org; Tue, 24 May 2022 21:26:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ntfmk-0008N5-BS for bug-gnu-emacs@gnu.org; Tue, 24 May 2022 21:26:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alex Hutcheson Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 25 May 2022 01:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54027 X-GNU-PR-Package: emacs Original-Received: via spool by 54027-submit@debbugs.gnu.org id=B54027.165344192632126 (code B ref 54027); Wed, 25 May 2022 01:26:02 +0000 Original-Received: (at 54027) by debbugs.gnu.org; 25 May 2022 01:25:26 +0000 Original-Received: from localhost ([127.0.0.1]:53911 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ntfmA-0008M6-CI for submit@debbugs.gnu.org; Tue, 24 May 2022 21:25:26 -0400 Original-Received: from mail-vk1-f182.google.com ([209.85.221.182]:42528) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ntfm5-0008Lp-Ms for 54027@debbugs.gnu.org; Tue, 24 May 2022 21:25:25 -0400 Original-Received: by mail-vk1-f182.google.com with SMTP id e144so9240187vke.9 for <54027@debbugs.gnu.org>; Tue, 24 May 2022 18:25:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=zAG4MHriX7lOi2OTtnYPX3/DeNRdfGm8CGsRYeZ9JAw=; b=oONUh7PkUetuXyzo2dWeAjxXIbdgS+YSUzGmTRV6uiETSG0E8T9Y5E6ETd/mx50oWO PN5qPjLerw1If0Sb434Z4ZPiV4W4pgXSq5NctgCh5j+nWalcSvqZYsWjCrvL95wFru9K qiOMnFzdwE7vjCOFKoeafzztgOH6zOW4VqjIFRFZPS63pWzD8vrWmRpqKuObfqkOPhjI LihfAnQoO6zZD2fg89XCePSoa/LWZKEuAgCo4n4CJHCHTQP+GMDRxlieS+qf1NmwGdbR eACapx7KWWG8s5StJqjsH6TEOlfrU2TFXyjJ+v7reFvJ1Mh01Q5QUo77VYXYGY1cb2Ug GJqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=zAG4MHriX7lOi2OTtnYPX3/DeNRdfGm8CGsRYeZ9JAw=; b=ACzUTLZCdfSnnx+O8Z+DYb0PFHCwMLVmT9FwuhHSLO7R3DH+L+2MiyTxMbUimR0GA8 e8eHGocGLXcAYWVZZI01TSY317kMlkbSW5qIhwI6MKiFdGG0YppTGEd9KurHhqn4usPZ oo3+dvbvwmpPN0HvGHMM3NShtdepdHAtX3eav3IuY0OqcprlKvp9xdApUZ885r2v1GW8 W8JYFHhH3lR/kng3yO8LPI6bxe9F3D6H8f+bx552+iye9YlQsx7IEvxWTnRiFLxx54HZ vzeICZV9Us8qa5yViGTPr4BchtzcnJCd1aOwqnyFmNsCoRADTE0epMd8Y69bl89qvnhE OUaA== X-Gm-Message-State: AOAM533I/PYmU1llFo5XiQ4ZOfUXRGFJU/eV0CMJ4Ly6k2I5g/gCWD8F utXoTgJpMTKRyDGqX/UPfCpW/XPC+c18pTsZzeEBM3cGBpt+Aw== X-Google-Smtp-Source: ABdhPJxgAGuaWdGKax5Uz3hCr7tdPIT7xB7mgRXbVfTG4g/3uDuPWG7a0Vi1ZThC+xw15TMrkLzLzsJDJdepHiEmxV8= X-Received: by 2002:a1f:2a01:0:b0:357:907f:7dea with SMTP id q1-20020a1f2a01000000b00357907f7deamr5660612vkq.7.1653441915881; Tue, 24 May 2022 18:25:15 -0700 (PDT) In-Reply-To: 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:233034 Archived-At: --0000000000000dfaee05dfcbf25a Content-Type: text/plain; charset="UTF-8" Was a consensus ever reached on this? Stefan's patch looks like it does what I was asking for. It would be great if we could also handle the `ESC [ ... u` versions, because xterm will emit them in some configurations, and iTerm2 can only emit those. On Mon, Feb 28, 2022 at 10:25 AM Stefan Monnier wrote: > > Then I must be missing something. Do you mean this part: > > > > + (while (<= #x30 final #x3F) > > + (push final params) ;And read more. > > + (setq final (read-char))) > > + (while (<= #x20 final #x2F) > > + (push final intermediates) > > + (setq final (read-char))) > > > > This doesn't add all the 96 characters with the modifiers, it only > > adds the digits and the punctuation characters. > > The above just reads to "NN;MM" part of the escape sequence which > encodes in decimal the Unicode code point MM of the character and the > 4bit encoded NN of the modifiers shift, alt, control, and meta. > > > Stefan > > --0000000000000dfaee05dfcbf25a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Was a consensus ever reached on this?=C2=A0

=
Stefan's patch looks like it does what I was asking for.=C2=A0

It would be great if we could also handle the=C2=A0`E= SC [ ... u` versions, because xterm will emit them in=C2=A0
some = configurations, and iTerm2 can only emit those.

On Mon, Feb 28, 2022= at 10:25 AM Stefan Monnier <monnier@iro.umontreal.ca> wrote:
> Then I must be missing something.=C2=A0 Do yo= u mean this part:
>
>=C2=A0 =C2=A0+=C2=A0 =C2=A0 (while (<=3D #x30 final #x3F)
>=C2=A0 =C2=A0+=C2=A0 =C2=A0 =C2=A0 (push final params) ;And read more.<= br> >=C2=A0 =C2=A0+=C2=A0 =C2=A0 =C2=A0 (setq final (read-char)))
>=C2=A0 =C2=A0+=C2=A0 =C2=A0 (while (<=3D #x20 final #x2F)
>=C2=A0 =C2=A0+=C2=A0 =C2=A0 =C2=A0 (push final intermediates)
>=C2=A0 =C2=A0+=C2=A0 =C2=A0 =C2=A0 (setq final (read-char)))
>
> This doesn't add all the 96 characters with the modifiers, it only=
> adds the digits and the punctuation characters.

The above just reads to "NN;MM" part of the escape sequence which=
encodes in decimal the Unicode code point MM of the character and the
4bit encoded NN of the modifiers shift, alt, control, and meta.


=C2=A0 =C2=A0 =C2=A0 =C2=A0 Stefan

--0000000000000dfaee05dfcbf25a--