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

No alt key. #54

Closed
ticki opened this issue Dec 30, 2015 · 3 comments
Closed

No alt key. #54

ticki opened this issue Dec 30, 2015 · 3 comments

Comments

@ticki
Copy link

ticki commented Dec 30, 2015

No description provided.

@gchp
Copy link
Owner

gchp commented Jan 8, 2016

Hello.

See this this comment for why there is no alt key be default: nsf/termbox#44 (comment)

Rustbox is a wrapper of the termbox library, so we are limited to the functionality it provides.

If you want to use the ALT key, you need to initialize Rustbox with the InputMode::Alt option.

@ticki
Copy link
Author

ticki commented Jan 8, 2016

Thanks!

@ticki ticki closed this as completed Jan 8, 2016
@dpc
Copy link

dpc commented Jan 11, 2019

Handling Alt is usually done by checking if ESC was followed by something. if it was not immediately followed, it was Esc keypressed. If it was - it was an Alt sequence. I don't really see a reason why this couldn't be handled directly.

Also, in Alt mode termbox sets alt modifier: https://github.com/nsf/termbox/blob/0178b0123e176b9c4656177c07af832bc141b03f/src/input.inl#L192, while rustbox seems to just ignore it.

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