Commit Graph

11 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
ticki 2ff0916514 Bump to 1.0.7. 2016-09-07 11:09:48 +02:00
IGI-111 5ebda9866f added mouse hold support (#48)
This adds support for the escape codes generated in rxvt and xterm
format by holding a button and moving the mouse around.
2016-09-07 11:05:41 +02:00
llogiq 21716b2f93 fixed a few clippy warnings (#44) 2016-08-04 22:37:03 +02:00
ticki 5634d5d082 Fix Goto 2016-07-24 20:22:47 +02:00
ticki 9bd833a663 Fix the tests 2016-07-23 20:41:43 +02:00
ticki 59d4ae427a Fix mouse input 2016-07-23 19:03:03 +02:00
ticki 30afb4c32e Fix examples & merge 2016-07-23 18:50:33 +02:00
IGI-111 1c50a795f8 added some tests 2016-07-20 13:06:04 +02:00
IGI-111 206c61de9e made mouse optional and fixed small issues 2016-07-20 01:13:03 +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