diff options
author | Boris Faure <billiob@gmail.com> | 2015-09-14 00:01:01 +0200 |
---|---|---|
committer | Boris Faure <billiob@gmail.com> | 2015-09-14 00:01:01 +0200 |
commit | d844278723d7f15f5b7a43b0ee93f3378beeaf08 (patch) | |
tree | 0a5688c9022df10e04cc2cd5ac7d48838634293e | |
parent | a334bf6554b31941cb646217e5e3e8d3061f0f0b (diff) |
ctrl-[2-8] are now handled by terminology. Ref T2723
-rw-r--r-- | src/bin/keyin.c | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/src/bin/keyin.c b/src/bin/keyin.c index f5bc81e..b17f4fa 100644 --- a/src/bin/keyin.c +++ b/src/bin/keyin.c | |||
@@ -146,7 +146,7 @@ _handle_key_to_pty(Termpty *ty, const Evas_Event_Key_Down *ev, | |||
146 | return; | 146 | return; |
147 | } | 147 | } |
148 | } | 148 | } |
149 | if (ev->key && ev->key[0] == 'K' && ev->key[1] == 'k') | 149 | if (ev->key[0] == 'K' && ev->key[1] == 'k') |
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 | { |
@@ -171,6 +171,28 @@ _handle_key_to_pty(Termpty *ty, const Evas_Event_Key_Down *ev, | |||
171 | alt, shift, ctrl)) | 171 | alt, shift, ctrl)) |
172 | return; | 172 | return; |
173 | 173 | ||
174 | if (ctrl) | ||
175 | { | ||
176 | #define CTRL_NUM(Num, Code) \ | ||
177 | if (!strcmp(ev->key, Num)) \ | ||
178 | { \ | ||
179 | if (alt) \ | ||
180 | termpty_write(ty, "\033"Code, 2); \ | ||
181 | else \ | ||
182 | termpty_write(ty, Code, 1); \ | ||
183 | return; \ | ||
184 | } | ||
185 | CTRL_NUM("2", "\0") | ||
186 | CTRL_NUM("3", "\x1b") | ||
187 | CTRL_NUM("4", "\x1c") | ||
188 | CTRL_NUM("5", "\x1d") | ||
189 | CTRL_NUM("6", "\x1e") | ||
190 | CTRL_NUM("7", "\x1f") | ||
191 | CTRL_NUM("8", "\x7f") | ||
192 | |||
193 | #undef CTRL_NUM | ||
194 | } | ||
195 | |||
174 | if (ev->string) | 196 | if (ev->string) |
175 | { | 197 | { |
176 | if (alt) | 198 | if (alt) |