Re: ncurses on windows, can't receive KEY_MOUSE

Demosthenes Koptsis <[email protected]> Sun, 7 Apr 2024 03:51:49 +0300
Newsgroups gmane.comp.lib.ncurses.general
Message-ID <[email protected]>
This is a multi-part message in MIME format.
--------------VP4gpV3pACNoTheEvk39gaxc
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit

Well i tried cygwin64 and the program detect mouse clicks as expected.

Thanks for your time !

On 6/4/2024 11:58 μ.μ., Demosthenes Koptsis wrote:
>
> Hello,
>
> i can't make mouse clicks work with ncurses on Windows 11.
>
>  It doesn't detect KEY_MOUSE, but 'q' quits just fine
>
> ===================== code ==========================
>
> #include <ncurses.h>
>
> int main()
> {
>     initscr();
>     cbreak();
>
>     keypad(stdscr, TRUE);
>     mousemask( ALL_MOUSE_EVENTS, NULL);
>
>
>     move(10,30);
>     printw("Hello ncurses!\n");
>     refresh();
>
>     while(true) {
>         int c = getch();
>         if (c == 'q') break;
>         if (c == KEY_MOUSE) break;
>     }
>
>     endwin();
>     return 0;
> }
> ======================================================
>
> I use Msys2 mingw64 gcc and
>
> ncurses version 6.4.20231217-1
>
> https://packages.msys2.org/base/mingw-w64-ncurses
> <https://packages.msys2.org/base/mingw-w64-ncurses>
>
> I tried the cmd terminal from Win11 and Msys2 mingw64 terminal, but 
> neither of them accept mouse clicks.
>
> Is this a bug of ncurses ?
>
> Thanks, DimK
>
>
--------------VP4gpV3pACNoTheEvk39gaxc
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit

<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Well i tried cygwin64 and the program detect mouse clicks as
      expected.</p>
    <p>Thanks for your time !<br>
    </p>
    <div class="moz-cite-prefix">On 6/4/2024 11:58 μ.μ., Demosthenes
      Koptsis wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:[email protected]">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <p>Hello,</p>
      <p>i can't make mouse clicks work with ncurses on Windows 11.</p>
      <p> It doesn't detect KEY_MOUSE, but 'q' quits just fine</p>
      <p>===================== code ==========================</p>
      <p>#include &lt;ncurses.h&gt;<br>
        <br>
        int main()<br>
        {<br>
            initscr();<br>
            cbreak();<br>
        <br>
            keypad(stdscr, TRUE);<br>
            mousemask( ALL_MOUSE_EVENTS, NULL);<br>
        <br>
        <br>
            move(10,30);<br>
            printw("Hello ncurses!\n");<br>
            refresh();<br>
        <br>
            while(true) {<br>
                int c = getch();<br>
                if (c == 'q') break;<br>
                if (c == KEY_MOUSE) break;<br>
            }<br>
        <br>
            endwin();<br>
            return 0;<br>
        }<br>
        ======================================================</p>
      <p>I use Msys2 mingw64 gcc and </p>
      <p>ncurses version <span
style="color: rgb(222, 226, 230); font-family: Roboto, sans-serif; font-size: 15px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(33, 37, 41); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">6.4.20231217-1
          <br>
        </span></p>
      <p><span
style="color: rgb(222, 226, 230); font-family: Roboto, sans-serif; font-size: 15px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(33, 37, 41); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;"><a
            href="https://packages.msys2.org/base/mingw-w64-ncurses"
            moz-do-not-send="true">https://packages.msys2.org/base/mingw-w64-ncurses<br>
          </a></span></p>
      <p>I tried the cmd terminal from Win11 and Msys2 mingw64 terminal,
        but neither of them accept mouse clicks.</p>
      <p>Is this a bug of ncurses ?</p>
      <p>Thanks, DimK<br>
      </p>
      <p> <br>
      </p>
    </blockquote>
  </body>
</html>

--------------VP4gpV3pACNoTheEvk39gaxc--