help-ncurses
[Top][All Lists]
Advanced

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

ncurses on windows, can't receive KEY_MOUSE


From: Demosthenes Koptsis
Subject: ncurses on windows, can't receive KEY_MOUSE
Date: Sat, 6 Apr 2024 23:58:15 +0300
User-agent: Mozilla Thunderbird

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]