Consecutive left arrows results in errors
Created by: jonathanstrong
I'm running into an issue where several consecutive left arrow inputs can result in the key sequence Key::Esc, Key::Char('['), Key::Char('D')
in quick succession. I can't discern any pattern to how many left arrows are pressed prior to this occuring. It seems to happen any time I hold down the left arrow, but also if I press it slowly with a pause in between each one. I tested on guake and gnome terminal in ubuntu 16.04.
Here's a log of key presses with times:
Jan 27 06:35:13.918 DEBG Char('/')
Jan 27 06:35:17.606 DEBG Char('t')
Jan 27 06:35:17.711 DEBG Char('e')
Jan 27 06:35:17.907 DEBG Char('s')
Jan 27 06:35:18.033 DEBG Char('t')
Jan 27 06:35:18.132 DEBG Char('i')
Jan 27 06:35:18.187 DEBG Char('n')
Jan 27 06:35:18.271 DEBG Char('g')
Jan 27 06:35:18.406 DEBG Char(' ')
Jan 27 06:35:18.501 DEBG Char('t')
Jan 27 06:35:18.592 DEBG Char('e')
Jan 27 06:35:18.766 DEBG Char('s')
Jan 27 06:35:18.876 DEBG Char('t')
Jan 27 06:35:19.006 DEBG Char('i')
Jan 27 06:35:19.056 DEBG Char('n')
Jan 27 06:35:19.155 DEBG Char('g')
Jan 27 06:35:19.271 DEBG Char(' ')
Jan 27 06:35:19.426 DEBG Char('t')
Jan 27 06:35:19.493 DEBG Char('e')
Jan 27 06:35:19.666 DEBG Char('s')
Jan 27 06:35:19.765 DEBG Char('t')
Jan 27 06:35:19.876 DEBG Char('i')
Jan 27 06:35:19.941 DEBG Char('n')
Jan 27 06:35:20.002 DEBG Char('g')
Jan 27 06:35:22.513 DEBG Left
Jan 27 06:35:23.014 DEBG Left
Jan 27 06:35:23.044 DEBG Left
Jan 27 06:35:23.073 DEBG Left
Jan 27 06:35:23.104 DEBG Left
Jan 27 06:35:23.135 DEBG Esc
Jan 27 06:35:23.135 DEBG Char('[')
Jan 27 06:35:23.136 DEBG Char('D')
Jan 27 06:35:23.183 DEBG Left
Jan 27 06:35:23.193 DEBG Left
Jan 27 06:35:23.223 DEBG Left
Jan 27 06:35:23.260 DEBG Left
Jan 27 06:35:23.290 DEBG Left
Jan 27 06:35:23.321 DEBG Left
Jan 27 06:35:23.356 DEBG Left
Jan 27 06:35:23.391 DEBG Left
For the record no escape, "[" or "D" keys were pressed.
I'm reading in keys with this code (stdout to show raw mode, in case that is relevant for some reason):
//...
let mut stdout = stdout().into_raw_mode().unwrap();
let stdin = termion::async_stdin();
let mut keys = stdin.keys();
//...