X-Recipient: archive-cygwin@delorie.com
X-Original-To: cygwin@cygwin.com
Delivered-To: cygwin@cygwin.com
DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4ED7C3858418
Authentication-Results: sourceware.org;
 dmarc=pass (p=none dis=none) header.from=gmail.com
Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=3ZovhZu5bee8M76NtHcxmrOeNmVIzAHhgIoQpoNv/nM=;
 b=Wf64/A+drfnVuVRWemMKnE3arUD2CYOfPvy39MMDTU6SE2wFUbfYofo7cfDHADDil6
 fxeGc3ThHbAPeMoN/3aH4gTU+UmErLQ3kd4ivT8kdnSjaZ+nKGTkfR7HvXnU5uW3E5SP
 KH+eXI1sJ2jIrPJbNgHn64n1EDwFagTKUvO4MjjuZ7xjOkS87Jer2SdRHZt06dtrKLkY
 m4EfbfdLcZ6c3+4URpROCV/tlsp9t0/KBhgDGtietUaUgegRdmtsootrAPSCzjv/zTya
 MlWPuJ3mxV/OVKrNRrZGGm2WKrHu7/2u5Vn75tphcg4cB4+89t1+Zdz0WOl6aqGE9H5g
 G5mQ==
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=3ZovhZu5bee8M76NtHcxmrOeNmVIzAHhgIoQpoNv/nM=;
 b=rjhXcIVxgPi9UfWMy/YEQvq3AT4c9ZEob7TVsRKlg3jEvoZgU+IsNpRqeh/+Q7ZqGm
 gQyltVOnZQTFNhON1Jt9jP9wLkjsyHcoMubIe40F8ITFKTer+nhdHUohvrm8BkLml26B
 47pQfZXg0sYRLtVowchhYquRFNvdJjNdGxaDuZKfIVq9eQBB7E0Bt84ip+eskfQ3CRhO
 oTgT3C227GYAADeV8fTH4n04JK4RG3Nmxs5CqN7T74Tu9P+vEG8rTITWJ3j8ns5uKmt+
 uaVTgRY4D9BCb3/DJXlJyWr/Htr72FNGVfA+nmyLzLkTTIn1g6gNaRMGlOCGH3NU+Kml
 7i+g==
X-Gm-Message-State: AOAM532UGfwgnmEg9fOrR1jY5Y3iFq/aEOCHtAApI7y+WO9N/phIni/K
 zply8axq/HiGMI7j1IKmaZAQpDbX5AoC7mkQoW49XJqB
X-Google-Smtp-Source: ABdhPJxTgAALB7F/w9SVhW+eUMD20K4KeCKf1zw3hST8/HLwQU8CKiwQ4WPEVs+Uhxa0Q6fuV+XrP49QA+s3ocMtB1U=
X-Received: by 2002:a05:6122:208f:b0:34e:b8ba:ec88 with SMTP id
 i15-20020a056122208f00b0034eb8baec88mr2921149vkd.0.1651578656572; Tue, 03 May
 2022 04:50:56 -0700 (PDT)
MIME-Version: 1.0
References: <CAA=0bEORh1+OiRZOWz5HVYCfDUM8kjF54EXeWvtnYsCij6vfBA@mail.gmail.com>
 <55c9c2b8-ccab-db63-1cf2-6d989c581260@towo.net>
In-Reply-To: <55c9c2b8-ccab-db63-1cf2-6d989c581260@towo.net>
From: Eric Adams <ericbadams@gmail.com>
Date: Tue, 3 May 2022 06:50:29 -0500
Message-ID: <CAA=0bEOLne4Sfm5i_8=_Ugu_CyTeLjoV_4kQLGSkeDxnNcF_FA@mail.gmail.com>
Subject: Re: mintty phantom key presses
To: Thomas Wolff <towo@towo.net>
X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00, DKIM_SIGNED,
 DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,
 SPF_HELO_NONE, SPF_PASS, TXREP,
 T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on
 server2.sourceware.org
X-BeenThere: cygwin@cygwin.com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-request@cygwin.com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=subscribe>
Cc: cygwin@cygwin.com
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie.com@cygwin.com>

On Tue, May 3, 2022 at 12:20 AM Thomas Wolff <towo@towo.net> wrote:
>
> Am 02.05.2022 um 23:54 schrieb Eric Adams:
> > Hi,
> >
> > I had previously reported this issue as "Possible phantom control-key state..."
> >
> > I observe that moving between cygwin mintty windows and Windows
> > windows causes unexpected behavior in the cygwin world.
> >
> > I took a new approach, using vi :) . In cygwin, I open a new file,
> > enter insert mode, hit Ctrl-V, and mouse out of the window. When I
> > mouse back into the cygwin edit window, my screen contains the display
> > string "^[[O" (note that the "^[" is vi-speak for "esc"). Examining
> > the resulting file with od shows:
> >> od -ah fdsa
> > 0000000 esc   [   O  nl
> >                 5b1b    0a4f
> >
> > Here, the nl character is inserted by vi.
> >
> > This smells like an incomplete escape sequence. If it's left at the
> > command line, just waiting for the user to type something, there might
> > be trouble.
> >
> > Am I completely off?
> > Thanks,
> > Eric Adams.
> CSI O is the focus off notification (CSI I is the focus in notification).
> Someone has switched on focus reporting mode (CSI ? 1004 h) in your
> session (and isn't catching the notifications).
> Run your application in a fresh mintty, with no other software, to test.
> Thomas
>

Thomas,
Thank you for your insight. I'm afraid I don't know how to test this
without some extra software involved.

In a fresh mintty, I tried "cat - > capturefile", focussed in and out
of the window a few times and hit Ctrl-D. The capturefile was empty.

In a new mintty window, I try the vi experiment, and the escape
sequence is captured.

Suggestions?

Thank you,
Eric Adams.

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple
