Commit Graph

15 Commits

Author SHA1 Message Date
Matthew Nicholson ea06c6fd56 Modify Keys and Events to detect Esc key presses (#45)
* modify Keys and Events to detect Esc key presses

The strategy used here is to read two bytes at a time, going on the
assumption that escape sequences will consist of multi byte reads and
solitary Esc key presses will consist of single byte reads.

Tests had to be modified to account for these new multi byte reads by
including dummy bytes when a single byte was previously expected.

Fixes ticki/termion#43

* expand keys example to include Esc key presses

* add test for Esc key press
2016-10-26 11:53:36 +02:00
James Campos a84670a51a Update keys.rs
fix message not appearing
2016-07-25 04:41:19 -07:00
ticki 30afb4c32e Fix examples & merge 2016-07-23 18:50:33 +02:00
ticki 5b94db9663 Merge 2016-07-23 17:49:52 +02:00
ticki e36ff1c71b Termion 1.0.0: Complete overhaul of how escape codes are handled, add truecolor support.
This commit is a major semver bump. Every progra utilizing escape codes generated by Termion is likely broken. The main change is to make each escape has their own type implementing the Display trait.

- Use formatters, mainly Display for escapes.

- Add Truecolor support (`color::Rgb`).

- Put each primitive into distinct modules.

- Add is_tty for checking if some stream is a TTY.

- Add multiple new examples.
2016-07-23 16:40:27 +02:00
IGI-111 cc9c32b981 added mouse input
The event system has been reworked to allow the detection of mouse
events as well as key presses.
Xterm, rxvt and X10 emulated escape codes are supported, they are
enabled and disabled by sending the right escape codes when creating a
RawTerminal.

To allow for byte manipulation, which was necessary to implement those
features, the backend iterator has been changed from chars() to bytes()
(with specific treatment of unicode sequences), making the whole crate
not require nightly rustc.
2016-07-19 18:17:12 +02:00
ticki 11225e561d Fix #24, make use of Result instead 2016-06-14 14:24:07 +02:00
Greg Chapple d6161f9e24 Fixed keys example 2016-03-16 12:02:29 +00:00
Ticki 28a95cf447 Libterm is now termion 2016-03-15 21:36:33 +01:00
Ticki df65cc7c56 Nightly message 2016-03-13 11:59:55 +01:00
Ticki 32d8ccfa24 Use IO error, instead of a custom one 2016-03-13 11:55:24 +01:00
Ticki d8e5ea3262 CTRL modified input 2016-03-10 15:12:59 +01:00
Ticki 5d4826d4ff Add test to _everything_ 2016-03-09 17:18:31 +01:00
Ticki 0efce912d0 Minor cosmetic changes 2016-03-09 11:38:43 +01:00
Ticki 6f1621d2d0 Introduce 'Key', which can decode special key input 2016-03-09 09:39:22 +01:00