summaryrefslogtreecommitdiff
path: root/src/bin/keyin.c
diff options
context:
space:
mode:
authorBoris Faure <billiob@gmail.com>2015-02-06 23:12:32 +0100
committerBoris Faure <billiob@gmail.com>2015-02-06 23:12:32 +0100
commit9814b10ad2f2d6ee4371bbf25d41ff178505624d (patch)
tree153103c62ddf8fd615af3194d1ae3f08604b9bad /src/bin/keyin.c
parentcc6b11a6f52c12b19e2542fd55c17fb4af42ba72 (diff)
correctly handle Alt-Enter
Diffstat (limited to 'src/bin/keyin.c')
-rw-r--r--src/bin/keyin.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/bin/keyin.c b/src/bin/keyin.c
index 73829a4..c3c0442 100644
--- a/src/bin/keyin.c
+++ b/src/bin/keyin.c
@@ -131,16 +131,18 @@ _handle_key_to_pty(Termpty *ty, const Evas_Event_Key_Down *ev,
131 } 131 }
132 if (!strcmp(ev->key, "Return")) 132 if (!strcmp(ev->key, "Return"))
133 { 133 {
134 if (ty->state.crlf) 134 if (alt)
135 { 135 termpty_write(ty, "\033", 1);
136 termpty_write(ty, "\r\n", sizeof("\r\n") - 1); 136 if (ty->state.crlf)
137 return; 137 {
138 } 138 termpty_write(ty, "\r\n", sizeof("\r\n") - 1);
139 else 139 return;
140 { 140 }
141 termpty_write(ty, "\r", sizeof("\r") - 1); 141 else
142 return; 142 {
143 } 143 termpty_write(ty, "\r", sizeof("\r") - 1);
144 return;
145 }
144 } 146 }
145 if (ev->key && ev->key[0] == 'K' && ev->key[1] == 'k') 147 if (ev->key && ev->key[0] == 'K' && ev->key[1] == 'k')
146 { 148 {