cdir icon indicating copy to clipboard operation
cdir copied to clipboard

add mouse clicking support

Open TooTallNate opened this issue 12 years ago • 3 comments

That would be really sweet...

Here's a proof-of-concept: https://gist.github.com/1702813

TooTallNate avatar Apr 20 '12 20:04 TooTallNate

Totally going to add this.

heapwolf avatar Apr 20 '12 20:04 heapwolf

@hij1nx Awesome :)

Note that I've just updated the gist to be more node version backwards and forwards compatible. Specifically, the keypress event should not be depended on, and using the correct "setRawMode()" API.

Cheers!

TooTallNate avatar Apr 20 '12 20:04 TooTallNate

If you need anymore insight, I've spent a lot of time going crazy over all the different terminal mouse protocols:

http://invisible-island.net/xterm/ctlseqs/ctlseqs.html#Mouse%20Tracking https://github.com/chjj/tty.js/blob/v0.2.6/static/term.js#L329 https://github.com/chjj/tty.js/blob/v0.2.6/static/term.js#L2939

@TooTallNate picked the right protocol: one that is an extension of the x10 protocol, but with release events, modifiers, and potentially the utf8 extension which allows for large terminal sizes, but the rxvt protocol might be worth supporting too.

It would be cool to eventually get this stuff into core as an event: process.stdin.on('mousedown', ...).

chjj avatar Apr 29 '12 09:04 chjj