Skip to content
Snippets Groups Projects
  • Matthew Nicholson's avatar
    ea06c6fd
    Modify Keys and Events to detect Esc key presses (#45) · ea06c6fd
    Matthew Nicholson authored
    * 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
    ea06c6fd
    History
    Modify Keys and Events to detect Esc key presses (#45)
    Matthew Nicholson authored
    * 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