Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support iojs #92

Closed
dbkaplun opened this issue Jan 14, 2015 · 12 comments
Closed

Support iojs #92

dbkaplun opened this issue Jan 14, 2015 · 12 comments

Comments

@dbkaplun
Copy link
Collaborator

If you run iojs test/widget-form.js, focus the Input, and move the mouse, the input is filled with garbage. Running iTerm2 Build 2.0.0.20141103 with iojs v1.0.2.

Possibly related: #91

@timoxley
Copy link

@secrettriangle can you confirm this does work using legacy node (0.10.x) or is this specific to io.js?

@dbkaplun
Copy link
Collaborator Author

@timoxley this affects iojs@9b81c3e7 (current v1.x branch) and node@v0.11.14 as well as 016e0845 (current v0.12 branch) but not v0.10.34.

@chjj
Copy link
Owner

chjj commented Jan 16, 2015

@secrettriangle, this is bizarre. If it thinks the mouse protocol is a keystroke, it still shouldn't output it. Could you try running test/program-mouse.js and tell me what happens?

@dbkaplun
Copy link
Collaborator Author

It works just fine with node@v0.10, but v0.11.14+ and iojs both seem to treat ANSI escape codes for the mouse movement as keystrokes, so they don't shadow my mouse in blue as they should and I see strange keystroke events rather than mousemove events as expected. However mousedown and mouseup seem to work as expected.

@chjj
Copy link
Owner

chjj commented Jan 16, 2015

I see. We might just have to include our own superior version of readline.emitKeypressEvents within blessed. node.js has been altered a lot as far as that function goes. This isn't the first time it's caused issues either.

@chjj chjj closed this as completed in 436c812 Jan 16, 2015
@chjj
Copy link
Owner

chjj commented Jan 16, 2015

It should be okay now. Give it a try.

@dbkaplun
Copy link
Collaborator Author

This code is problematic -- if multiple keystrokes come through, it treats it as one long sequence and only handles the first keystroke as opposed to splitting out each keystroke into its own separate keypress event. Here's an example: https://gist.github.com/anonymous/0495ef10777e9dd68774

@chjj
Copy link
Owner

chjj commented Jan 16, 2015

It's certainly better than spitting junk in the terminal from a regression. I went and took one of the older readline commits. Feel free to improve it and submit a PR.

@chjj
Copy link
Owner

chjj commented Jan 16, 2015

@secrettriangle, I've added you as a collaborator. Feel free to make commits to keys.js.

@chjj
Copy link
Owner

chjj commented Jan 18, 2015

@secrettriangle, any progress on keys.js? I'd like to get those commits in before a release. I also want to do a release for all of the fixes I recently made, mostly related to box scrolling.

@dbkaplun
Copy link
Collaborator Author

Thanks @chjj! :)

I'm really busy these days but I'll try to take a look sometime soon! Don't feel as if you have to wait for me to take a look at keys.js to release -- I think we should release early and often.

@chjj
Copy link
Owner

chjj commented Jan 20, 2015

This fix should also remove blessed from the io.js thread (mentioning it here to follow the rules): nodejs/node#456

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants