diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-05-14 12:06:16 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-05-14 12:27:31 -0700 |
commit | af336c444f4fe9d8a1677a200f40748ce5f24a26 (patch) | |
tree | b06b1c2323a5033194724171af7681e760bd546b /070display.cc | |
parent | b98d3876b67a35f1d913ba374749bc97103b7790 (diff) | |
download | mu-af336c444f4fe9d8a1677a200f40748ce5f24a26.tar.gz |
1368 - alias carriage-return and newline
CRLF still shows as two newlines, though. Cross that bridge when we get to it. The new chessboard test is still hanging, though.
Diffstat (limited to '070display.cc')
-rw-r--r-- | 070display.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/070display.cc b/070display.cc index 8a782f87..b93731ab 100644 --- a/070display.cc +++ b/070display.cc @@ -214,9 +214,10 @@ case READ_KEY_FROM_KEYBOARD: { long long int found = false; //? cerr << event_type << '\n'; //? 1 if (event_type == TB_EVENT_KEY) { - if (event.key == TB_KEY_CTRL_C) tb_shutdown(), exit(1); - if (event.key == TB_KEY_BACKSPACE2) event.key = TB_KEY_BACKSPACE; result = event.key ? event.key : event.ch; + if (result == TB_KEY_CTRL_C) tb_shutdown(), exit(1); + if (result == TB_KEY_BACKSPACE2) result = TB_KEY_BACKSPACE; + if (result == TB_KEY_CARRIAGE_RETURN) result = TB_KEY_NEWLINE; found = true; } products.resize(2); |