help-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ncurses on windows, can't receive KEY_MOUSE


From: Demosthenes Koptsis
Subject: Re: ncurses on windows, can't receive KEY_MOUSE
Date: Sun, 7 Apr 2024 03:51:49 +0300
User-agent: Mozilla Thunderbird

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

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

 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]