billiob pushed a commit to branch terminology-0.9.

http://git.enlightenment.org/apps/terminology.git/commit/?id=6582eff5cd82a210178818affcf87722a9c0b7ae

commit 6582eff5cd82a210178818affcf87722a9c0b7ae
Author: Boris Faure <bill...@gmail.com>
Date:   Mon Sep 14 00:01:01 2015 +0200

    ctrl-[2-8] are now handled by terminology. Ref T2723
---
 src/bin/keyin.c | 24 +++++++++++++++++++++++-
 1 file changed, 23 insertions(+), 1 deletion(-)

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,
              return;
           }
      }
-   if (ev->key && ev->key[0] == 'K' && ev->key[1] == 'k')
+   if (ev->key[0] == 'K' && ev->key[1] == 'k')
      {
         if (!evas_key_lock_is_set(ev->locks, "Num_Lock"))
           {
@@ -171,6 +171,28 @@ _handle_key_to_pty(Termpty *ty, const Evas_Event_Key_Down 
*ev,
                   alt, shift, ctrl))
        return;
 
+   if (ctrl)
+     {
+#define CTRL_NUM(Num, Code)                        \
+        if (!strcmp(ev->key, Num))                 \
+          {                                        \
+             if (alt)                              \
+               termpty_write(ty, "\033"Code, 2);   \
+             else                                  \
+               termpty_write(ty, Code, 1);         \
+             return;                               \
+          }
+        CTRL_NUM("2", "\0")
+        CTRL_NUM("3", "\x1b")
+        CTRL_NUM("4", "\x1c")
+        CTRL_NUM("5", "\x1d")
+        CTRL_NUM("6", "\x1e")
+        CTRL_NUM("7", "\x1f")
+        CTRL_NUM("8", "\x7f")
+
+#undef CTRL_NUM
+     }
+
    if (ev->string)
      {
         if (alt)

-- 


Reply via email to