Skip to content
This repository was archived by the owner on May 21, 2019. It is now read-only.

Conversation

drew-gross
Copy link
Contributor

I'm not 100% sure about this fix. It causes sleep 10 then alt+d to display the same thing as in iTerm when in "Alt key = ESC+" mode. I was never able to make vim work the way @alok described in either black-screen or iTerm. @ShockOne would you be able to review this one? I'm not very familiar with the ANSI/escape codes stuff.

@drew-gross drew-gross changed the title Fix alt d Fix alt key Oct 31, 2016
if (input.ctrlKey) {
text = String.fromCharCode(input.keyCode - 64);
} else if (input.altKey) {
let char = String.fromCharCode(input.keyCode);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't input.key already in the proper case?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From my testing input.key is the special char macOS generates, ∂ for alt+d for example.

@drew-gross drew-gross merged commit 2bc11d1 into railsware:master Nov 2, 2016
@drew-gross drew-gross deleted the fix-alt-d branch November 3, 2016 03:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants