public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* mintty window gets tilde characters "pressed" in it
@ 2016-12-12 18:18 David Karr
  2016-12-14 17:49 ` David Karr
  0 siblings, 1 reply; 6+ messages in thread
From: David Karr @ 2016-12-12 18:18 UTC (permalink / raw)
  To: cygwin

Win7.  I believe my Cygwin version info is "2.5.2(0.297/5/3) 2016-06-23 14:29".

I've been annoyed for a while with a symptom in my mintty windows.  I
will be typing along, or not, and suddenly a "~" character gets
injected into the stream. It often is the only character at the
prompt, so I can erase it and type my command, but it's really
annoying when it appears while I'm typing. I was just reminded of it
now when it injected the "~" right before I pressed enter on a
"mkdir", so I had to then remove the dir I just created and recreate
it.

Is this something that Cygwin can control?

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: mintty window gets tilde characters "pressed" in it
  2016-12-12 18:18 mintty window gets tilde characters "pressed" in it David Karr
@ 2016-12-14 17:49 ` David Karr
  2016-12-14 20:07   ` Thomas Wolff
  2016-12-14 20:20   ` Andrey Repin
  0 siblings, 2 replies; 6+ messages in thread
From: David Karr @ 2016-12-14 17:49 UTC (permalink / raw)
  To: cygwin

On Mon, Dec 12, 2016 at 10:18 AM, David Karr <davidmichaelkarr@gmail.com> wrote:
> Win7.  I believe my Cygwin version info is "2.5.2(0.297/5/3) 2016-06-23 14:29".
>
> I've been annoyed for a while with a symptom in my mintty windows.  I
> will be typing along, or not, and suddenly a "~" character gets
> injected into the stream. It often is the only character at the
> prompt, so I can erase it and type my command, but it's really
> annoying when it appears while I'm typing. I was just reminded of it
> now when it injected the "~" right before I pressed enter on a
> "mkdir", so I had to then remove the dir I just created and recreate
> it.
>
> Is this something that Cygwin can control?

I've determined what "instigates" this, but I find that it only mainly
affects mintty and somewhat affects emacs. I've never seen a symptom
in any other application.

I use a tool called "Windows Caffeine" that is used to keep the
display awake.  It sends a "f15 key up" event every 59 seconds.  That
is what is producing the "~" character in the mintty window.  I've
also seen a symptom from this in Emacs, but it's harder to produce.
It's not as simple as just having a text buffer in focus. I haven't
been able to reliably produce it in Emacs, but the mintty symptom is
very reproducible.

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: mintty window gets tilde characters "pressed" in it
  2016-12-14 17:49 ` David Karr
@ 2016-12-14 20:07   ` Thomas Wolff
  2016-12-14 21:33     ` David Karr
  2016-12-14 20:20   ` Andrey Repin
  1 sibling, 1 reply; 6+ messages in thread
From: Thomas Wolff @ 2016-12-14 20:07 UTC (permalink / raw)
  To: cygwin

Am 14.12.2016 um 18:48 schrieb David Karr:
> On Mon, Dec 12, 2016 at 10:18 AM, David Karr <davidmichaelkarr@gmail.com> wrote:
>> Win7.  I believe my Cygwin version info is "2.5.2(0.297/5/3) 2016-06-23 14:29".
>>
>> I've been annoyed for a while with a symptom in my mintty windows.  I
>> will be typing along, or not, and suddenly a "~" character gets
>> injected into the stream. It often is the only character at the
>> prompt, so I can erase it and type my command, but it's really
>> annoying when it appears while I'm typing. I was just reminded of it
>> now when it injected the "~" right before I pressed enter on a
>> "mkdir", so I had to then remove the dir I just created and recreate
>> it.
>>
>> Is this something that Cygwin can control?
> I've determined what "instigates" this, but I find that it only mainly
> affects mintty and somewhat affects emacs. I've never seen a symptom
> in any other application.
>
> I use a tool called "Windows Caffeine" that is used to keep the
> display awake.  It sends a "f15 key up" event every 59 seconds.  That
> is what is producing the "~" character in the mintty window.  I've
> also seen a symptom from this in Emacs, but it's harder to produce.
> It's not as simple as just having a text buffer in focus. I haven't
> been able to reliably produce it in Emacs, but the mintty symptom is
> very reproducible.
I've checked with Caffeine and traced mintty. It receives F15 key down, 
the key up. Caffeine claims to send key up only but that's not true. 
Please report this as a bug to Caffeine.
X11 does not seem to handle F13...F24 at all because they don't appear 
on a typical PC keyboard (that's my assumption), so it doesn't occur in 
xterm. It generates a ~ only in terminal applications because a number 
of key escape sequences end with ~.

The key event from Caffeine can be distinguished from a real key event, 
because it does not include keyboard scancode information. So a 
workaround is possible in theory. I'm not sure though whether that's a 
good idea as there may be other applications that inject keys the same 
way, e.g. drivers of other input devices, like Braille.
Opinions and information are appreciated.

------
Thomas

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: mintty window gets tilde characters "pressed" in it
  2016-12-14 17:49 ` David Karr
  2016-12-14 20:07   ` Thomas Wolff
@ 2016-12-14 20:20   ` Andrey Repin
  1 sibling, 0 replies; 6+ messages in thread
From: Andrey Repin @ 2016-12-14 20:20 UTC (permalink / raw)
  To: David Karr, cygwin

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=utf-8, Size: 523 bytes --]

Greetings, David Karr!

> I use a tool called "Windows Caffeine" that is used to keep the
> display awake.

What's wrong with correctly configured power saving settings?…


-- 
With best regards,
Andrey Repin
Wednesday, December 14, 2016 23:07:16

Sorry for my terrible english...\0ТÒÐÐ¥\a&ö&ÆVÒ\a&W\x06÷'G3¢\x02\x02\x02\x02\x02\x02\x06‡GG\x03¢òö7–wv–âæ6öÒ÷\a&ö&ÆV×2æ‡FÖÀФd\x15\x13¢\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x06‡GG\x03¢òö7–wv–âæ6öÒöf\x17\x12ðФFö7VÖVçF\x17F–öã¢\x02\x02\x02\x02\x02\x02\x02\x02\x06‡GG\x03¢òö7–wv–âæ6öÒöFö72æ‡FÖÀÐ¥Vç7V'67&–&R\x06–æfó¢\x02\x02\x02\x02\x02\x06‡GG\x03¢òö7–wv–âæ6öÒöÖÂò7Vç7V'67&–&R×6–×\x06ÆPРÐ

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: mintty window gets tilde characters "pressed" in it
  2016-12-14 20:07   ` Thomas Wolff
@ 2016-12-14 21:33     ` David Karr
  2016-12-14 22:51       ` David Karr
  0 siblings, 1 reply; 6+ messages in thread
From: David Karr @ 2016-12-14 21:33 UTC (permalink / raw)
  To: cygwin

On Wed, Dec 14, 2016 at 12:06 PM, Thomas Wolff <towo@towo.net> wrote:
> I've checked with Caffeine and traced mintty. It receives F15 key down, the
> key up. Caffeine claims to send key up only but that's not true. Please
> report this as a bug to Caffeine.

Understood.  I just did that.  However, will that really make any
difference? If mintty only receives the keyup event, will that make it
ignore it entirely?

> X11 does not seem to handle F13...F24 at all because they don't appear on a
> typical PC keyboard (that's my assumption), so it doesn't occur in xterm. It
> generates a ~ only in terminal applications because a number of key escape
> sequences end with ~.
>
> The key event from Caffeine can be distinguished from a real key event,
> because it does not include keyboard scancode information. So a workaround
> is possible in theory. I'm not sure though whether that's a good idea as
> there may be other applications that inject keys the same way, e.g. drivers
> of other input devices, like Braille.
> Opinions and information are appreciated.

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: mintty window gets tilde characters "pressed" in it
  2016-12-14 21:33     ` David Karr
@ 2016-12-14 22:51       ` David Karr
  0 siblings, 0 replies; 6+ messages in thread
From: David Karr @ 2016-12-14 22:51 UTC (permalink / raw)
  To: cygwin

On Wed, Dec 14, 2016 at 1:33 PM, David Karr <davidmichaelkarr@gmail.com> wrote:
> On Wed, Dec 14, 2016 at 12:06 PM, Thomas Wolff <towo@towo.net> wrote:
>> I've checked with Caffeine and traced mintty. It receives F15 key down, the
>> key up. Caffeine claims to send key up only but that's not true. Please
>> report this as a bug to Caffeine.
>
> Understood.  I just did that.  However, will that really make any
> difference? If mintty only receives the keyup event, will that make it
> ignore it entirely?

I think I have a solution. I've looked at the command line options for
caffeine many times, and I never noticed the "-useshift" option, which
makes it use the shift key instead of f15.  That should do the trick
for me. I'm testing it now, and it appears to be fine (and it also
doesn't appear to cause trouble if I'm typing while the event is
emitted).

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-12-14 22:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-12 18:18 mintty window gets tilde characters "pressed" in it David Karr
2016-12-14 17:49 ` David Karr
2016-12-14 20:07   ` Thomas Wolff
2016-12-14 21:33     ` David Karr
2016-12-14 22:51       ` David Karr
2016-12-14 20:20   ` Andrey Repin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).