diff options
Diffstat (limited to 'src/bin/keyin.c')
-rw-r--r-- | src/bin/keyin.c | 35 |
1 files changed, 11 insertions, 24 deletions
diff --git a/src/bin/keyin.c b/src/bin/keyin.c index 3247326..dadac04 100644 --- a/src/bin/keyin.c +++ b/src/bin/keyin.c | |||
@@ -67,30 +67,17 @@ _key_try(Termpty *ty, const Tty_Key *map, int len, const Evas_Event_Key_Down *ev | |||
67 | const struct _s *s; | 67 | const struct _s *s; |
68 | const Key_Values *kv; | 68 | const Key_Values *kv; |
69 | 69 | ||
70 | if (!ty->state.appcursor) | 70 | if (!ty->state.appcursor) kv = &map[i].default_mode; |
71 | { | 71 | else kv = &map[i].cursor; |
72 | kv = &map[i].default_mode; | 72 | if (!alt && !ctrl && !shift) s = &kv->plain; |
73 | } | 73 | else if (alt && !ctrl && !shift) s = &kv->alt; |
74 | else | 74 | else if (!alt && ctrl && !shift) s = &kv->ctrl; |
75 | { | 75 | else if (alt && ctrl && !shift) s = &kv->ctrl_alt; |
76 | kv = &map[i].cursor; | 76 | else if (!alt && !ctrl && shift) s = &kv->shift; |
77 | } | 77 | else if (alt && !ctrl && shift) s = &kv->shift_alt; |
78 | if (!alt && !ctrl && !shift) | 78 | else if (!alt && ctrl && shift) s = &kv->shift_ctrl; |
79 | s = &kv->plain; | 79 | else if (alt && ctrl && shift) s = &kv->shift_ctrl_alt; |
80 | else if (alt && !ctrl && !shift) | 80 | else continue; |
81 | s = &kv->alt; | ||
82 | else if (!alt && ctrl && !shift) | ||
83 | s = &kv->ctrl; | ||
84 | else if (alt && ctrl && !shift) | ||
85 | s = &kv->ctrl_alt; | ||
86 | else if (!alt && !ctrl && shift) | ||
87 | s = &kv->shift; | ||
88 | else if (alt && !ctrl && shift) | ||
89 | s = &kv->shift_alt; | ||
90 | else if (!alt && ctrl && shift) | ||
91 | s = &kv->shift_ctrl; | ||
92 | else if (alt && ctrl && shift) | ||
93 | s = &kv->shift_ctrl_alt; | ||
94 | 81 | ||
95 | termpty_write(ty, s->s, s->len); | 82 | termpty_write(ty, s->s, s->len); |
96 | return EINA_TRUE; | 83 | return EINA_TRUE; |