summaryrefslogtreecommitdiff
path: root/src/bin/keyin.c
diff options
context:
space:
mode:
authorBoris Faure <billiob@gmail.com>2015-04-19 19:59:29 +0200
committerBoris Faure <billiob@gmail.com>2015-04-23 20:02:53 +0200
commitbe62d87f89e5e0ada3d8cbfe3dd091eeb9b45391 (patch)
tree5b56caddf7c7b372bff7759a04fad4ac458f36f5 /src/bin/keyin.c
parentcaf4e9230261d05c006f58a62bce7bfa58e83b3f (diff)
separate "termstate" from cursor state and screens. Closes T725
Diffstat (limited to 'src/bin/keyin.c')
-rw-r--r--src/bin/keyin.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/bin/keyin.c b/src/bin/keyin.c
index e61f210..f5bc81e 100644
--- a/src/bin/keyin.c
+++ b/src/bin/keyin.c
@@ -69,8 +69,8 @@ _key_try(Termpty *ty, const Tty_Key *map, int len, const Evas_Event_Key_Down *ev
69 const struct _s *s = NULL; 69 const struct _s *s = NULL;
70 const Key_Values *kv; 70 const Key_Values *kv;
71 71
72 if (!ty->state.appcursor) kv = &map[i].default_mode; 72 if (!ty->termstate.appcursor) kv = &map[i].default_mode;
73 else kv = &map[i].cursor; 73 else kv = &map[i].cursor;
74 if (!alt && !ctrl && !shift) s = &kv->plain; 74 if (!alt && !ctrl && !shift) s = &kv->plain;
75 else if (alt && !ctrl && !shift) s = &kv->alt; 75 else if (alt && !ctrl && !shift) s = &kv->alt;
76 else if (!alt && ctrl && !shift) s = &kv->ctrl; 76 else if (!alt && ctrl && !shift) s = &kv->ctrl;
@@ -112,7 +112,7 @@ _handle_key_to_pty(Termpty *ty, const Evas_Event_Key_Down *ev,
112 { 112 {
113 if (alt) 113 if (alt)
114 termpty_write(ty, "\033", 1); 114 termpty_write(ty, "\033", 1);
115 if (ty->state.send_bs) 115 if (ty->termstate.send_bs)
116 { 116 {
117 termpty_write(ty, "\b", 1); 117 termpty_write(ty, "\b", 1);
118 } 118 }
@@ -135,7 +135,7 @@ _handle_key_to_pty(Termpty *ty, const Evas_Event_Key_Down *ev,
135 { 135 {
136 if (alt) 136 if (alt)
137 termpty_write(ty, "\033", 1); 137 termpty_write(ty, "\033", 1);
138 if (ty->state.crlf) 138 if (ty->termstate.crlf)
139 { 139 {
140 termpty_write(ty, "\r\n", sizeof("\r\n") - 1); 140 termpty_write(ty, "\r\n", sizeof("\r\n") - 1);
141 return; 141 return;
@@ -150,7 +150,7 @@ _handle_key_to_pty(Termpty *ty, const Evas_Event_Key_Down *ev,
150 { 150 {
151 if (!evas_key_lock_is_set(ev->locks, "Num_Lock")) 151 if (!evas_key_lock_is_set(ev->locks, "Num_Lock"))
152 { 152 {
153 if (ty->state.alt_kp) 153 if (ty->termstate.alt_kp)
154 { 154 {
155 if (_key_try(ty, tty_keys_kp_app, 155 if (_key_try(ty, tty_keys_kp_app,
156 sizeof(tty_keys_kp_app)/sizeof(tty_keys_kp_app[0]), 156 sizeof(tty_keys_kp_app)/sizeof(tty_keys_kp_app[0]),
@@ -242,10 +242,10 @@ keyin_handle(Keys_Handler *khdl, Termpty *ty, const Evas_Event_Key_Down *ev,
242 } 242 }
243 243
244 // if term app asked for kbd lock - dont handle here 244 // if term app asked for kbd lock - dont handle here
245 if (ty->state.kbd_lock) return EINA_TRUE; 245 if (ty->termstate.kbd_lock) return EINA_TRUE;
246 // if app asked us to not do autorepeat - ignore press if is it is the same 246 // if app asked us to not do autorepeat - ignore press if is it is the same
247 // timestamp as last one 247 // timestamp as last one
248 if ((ty->state.no_autorepeat) && 248 if ((ty->termstate.no_autorepeat) &&
249 (ev->timestamp == khdl->last_keyup)) return EINA_TRUE; 249 (ev->timestamp == khdl->last_keyup)) return EINA_TRUE;
250 if (!khdl->composing) 250 if (!khdl->composing)
251 { 251 {