cpjreynolds / rustty

A terminal UI library
https://docs.rs/rustty
MIT License
152 stars 14 forks source link

Arrow key support #43

Closed gridbugs closed 7 years ago

gridbugs commented 8 years ago

Currently pressing an arrow key is treated as 3 consecutive events. For example left arrow yields events Ok(Some(Key('\u{1b}'))), Ok(Some(Key('['))), Ok(Some(Key('D'))). Is there a plan to add additional event types for non-char keys such as arrow keys?

cpjreynolds commented 8 years ago

Escape sequence processing is one of those things I've been putting off for far too long, I'm going to try and get on this today, it shouldn't be too difficult as all the information we need is held by the Driver struct.

At the moment most of my work is going into the overhaul branch, so I can merge all the big breaking changes at once in the near future; I'll be sure to keep this issue updated when I make some progress.

Thank you!

gridbugs commented 8 years ago

I've implemented escape sequence handling: https://github.com/cpjreynolds/rustty/pull/46

cpjreynolds commented 7 years ago

Closing this now, see #46