Commit Graph

3 Commits

Author SHA1 Message Date
Joe Wilm c8fd2c090c Add license headers to source files 2016-06-29 20:59:14 -07:00
Joe Wilm 078dd41e37 Function keys send escape sequences
This doesn't currently handle any of the modifiers, but it does mean
applications like `htop` can be used.
2016-06-23 21:24:35 -07:00
Joe Wilm 00223b32c9 Implement special input handling
There's a number of keys/combinations that should emit escape sequences
to the PTY when triggered. This commit adds a framework to support that.
The input::Processor is a type which tracks state of modifier keys. When
special keys (like arrow, function) are detected, the processor pulls up
a list of candidate escapes to send, and picks the first one based on
terminal mode and active modifier keys. The input::Processor is generic
over the thing receiving the escape sequences, the input::Notify type.
Included is a wrapper for `&mut io::Write` which implements
input::Notify and is currently used to connect the processor to the PTY
stream.

This added handling of the APP_CURSOR mode which changes affects input
processing.
2016-06-23 09:48:31 -07:00