0

Is it possible to track mouse click on the shell in node.js.

Something link:

process.on('mousepress', function(data){

});
Charles
  • 11,367
  • 10
  • 77
  • 114

2 Answers2

1

Maybe this could help: https://github.com/mscdex/node-ncurses

3on
  • 6,291
  • 3
  • 26
  • 22
  • nice but I just see keyboard event, not mouse. – Charles Aug 03 '12 at 22:33
  • Me neither there is a 'hasMouse' feature, maybe an complete bindings or just not documented. http://tldp.org/HOWTO/NCURSES-Programming-HOWTO/mouse.html could help. – 3on Aug 03 '12 at 22:47
  • 1
    I think it's the best way, as you said ncurses already has mouse support just the binding not. I will try to make the mouse support for the binding. – Charles Aug 04 '12 at 09:13
1

The keypress package has this feature:

https://www.npmjs.com/package/keypress#listening-for-mousepress-events

Cameron Tacklind
  • 5,764
  • 1
  • 36
  • 45