2

CYGWIN_NT-6.3 x86_64

I open and use a terminal (mintty) and every so often an

8~

or simply

~

will appear on the commandline.

Why does this happen and how do I prevent this from happening.

Barry
  • 417
  • 6
  • 18

2 Answers2

4

Found the cause.

I run a utility to keep my windows machine from going to sleep. In the background it creates an event for key-up for F15.

This has been transparent until using cywin.

Barry
  • 417
  • 6
  • 18
  • 2
    I've discovered the same issue on my machine. I am running a tool called 'caffeine' that keeps my machine awake. – Bill D Nov 01 '16 at 13:17
3

If the utility that is causing this input is Caffeine sending a F15 key up event, you can prevent it from happening in two ways:

  1. Prevent F15 from being interpreted on the mintty side: Add the following line to your mintty config file (e.g. ~/.minttyrc). It tells mintty to ignore F15 by itself or with the Ctrl modifier, which does the trick for me (by itself, it produces ~, and with Ctrl, ;5~):

    KeyFunctions=F15:void;C+F15:void
    
  2. Prevent Caffeine from sending F15 by running it with the -useshift option.

I guess the first way is preferrable, because it keeps all the benefits of using the F15 key up event.

mach
  • 175
  • 6