mscdex/node-ncurses

Interfacing with the mouse

Opened this issue · 3 comments

cbou commented

It's possible to detect click on the shell with ncurses.

http://tldp.org/HOWTO/NCURSES-Programming-HOWTO/mouse.html

Is there any problem with the integration of the feature in node-ncurses ?

I just ask for advices and tipps, maybe I could try to do it.

Yeah, mouse support has been in the TODO for a long time now.

As far as I know it should be possible to implement, it's just a matter of taking the time to do it and making sure it's well tested. Pull requests are welcome :-)

cbou commented

Thanks for your answer, maybe I will take time to try it.
I think it could be done in the same way than inputChar.

cbou commented

I tried something here: cbou@e1bb2dc

I'm not a cpp pro so it's maybe bad.

But it works, I commit a new example too.

It's not ready for push because there is a small problem.
If the click is too fast, it won't be detect.
Longer click like 500ms - 1sec will be.

Any suggestions or improvements ?