From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ren Victor Newsgroups: gmane.emacs.devel Subject: Fwd: xterm/mintty control sequences support when formatOtherKeys = 1 Date: Wed, 27 Feb 2013 22:44:28 +0800 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=20cf30334667a977c704d6b5cf1a X-Trace: ger.gmane.org 1361977056 561 80.91.229.3 (27 Feb 2013 14:57:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 27 Feb 2013 14:57:36 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Feb 27 15:57:58 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UAiSD-0006re-Sy for ged-emacs-devel@m.gmane.org; Wed, 27 Feb 2013 15:57:58 +0100 Original-Received: from localhost ([::1]:43209 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UAiRt-0000pQ-2m for ged-emacs-devel@m.gmane.org; Wed, 27 Feb 2013 09:57:37 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:56301) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UAiQH-0004r9-32 for emacs-devel@gnu.org; Wed, 27 Feb 2013 09:56:03 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UAiFA-0002UY-V8 for emacs-devel@gnu.org; Wed, 27 Feb 2013 09:44:29 -0500 Original-Received: from mail-qa0-f52.google.com ([209.85.216.52]:56391) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UAiFA-0002UP-PE for emacs-devel@gnu.org; Wed, 27 Feb 2013 09:44:28 -0500 Original-Received: by mail-qa0-f52.google.com with SMTP id bs12so522358qab.11 for ; Wed, 27 Feb 2013 06:44:28 -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:content-type; bh=37jStpZUwP0W088KI4cf3ZXDyIre7SYOmzt4YOH/mAs=; b=SqcriPfX1yyMDUeuRVkIZ8fQVzpdYCZjTL60JUubrHWbXLvvl0G6hv4cW2K3G3ZKd3 /qHIgeomkGkZ9gWcJvcEW+yxvBkGSxtZ7AVtdDXn7qQHrkN7QOBEMz99+QHzbtnbGE7+ Dp0ZGEea7/oXFp7bDZbiJwS4VPB+pvuSKVg2XwYr4Qnam8wuCEVW0D7jstaYPscgjFhe sMo1aVGiPe1xfsE/US56aQMZeWKvo+84poISj6RrYGiu92lsEPhYE0MCsuuIVOdDSvQu 7BoIaMG4SGh1BFg44YUBxOc9jlOSgFNFW0YxL/tE1k9BChubSz53sdV1kx57koeBRv0w 30pw== X-Received: by 10.224.189.10 with SMTP id dc10mr8161314qab.55.1361976268255; Wed, 27 Feb 2013 06:44:28 -0800 (PST) Original-Received: by 10.49.2.106 with HTTP; Wed, 27 Feb 2013 06:44:28 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 209.85.216.52 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: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:157433 Archived-At: --20cf30334667a977c704d6b5cf1a Content-Type: text/plain; charset=ISO-8859-1 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]) BR/Victor 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 > --20cf30334667a977c704d6b5cf1a Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

For exampl= e, pressing C-0 in xterm will send control sequence "\e[27;5;48~"= by default, which is supported now.
When "formatOtherKeys" i= s set to 1, C-0 is sent as "\e[48;5u" which is another shorter fo= rmat.

The easiest change I can image is to define a lot of ke= y binds for those control sequence, for example,
=A0 (define-key = map "\e[48;5u" =A0[?\C-0])

BR/Victor=A0


On Wed, Feb 27, 201= 3 at 9:54 PM, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
> When setting "formatOthe= rKeys" resource to 1 in xterm, 'CSI u' format is
> used for non-standard keycodes. =A0This 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 sequen= ces.
> What do you think of adding them to teerm/xterm.el? =A0or anyone can d= o it?

I'm not familiar with those "CSI 27" and "CS= I 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?


=A0 =A0 =A0 =A0 Stefan


--20cf30334667a977c704d6b5cf1a--