]> granicus.if.org Git - procps-ng/commitdiff
top: extend shift+tab (back_tab) navigation to console
authorJim Warner <james.warner@comcast.net>
Wed, 18 May 2022 05:00:00 +0000 (00:00 -0500)
committerCraig Small <csmall@dropbear.xyz>
Fri, 20 May 2022 06:23:20 +0000 (16:23 +1000)
Really, extend shift+tab navigation to only some linux
consoles (or maybe most consoles). However, there were
some consoles where shift+tab always yields just '\t'.

Signed-off-by: Jim Warner <james.warner@comcast.net>
top/top.c

index 748db6f79066d70a2c1d19722b3b41a29cb94dd4..e57e3045fa5426b38bd552cd5ff05e8468c437bb 100644 (file)
--- a/top/top.c
+++ b/top/top.c
@@ -1143,7 +1143,8 @@ static int iokey (int action) {
       { "\xC3\xA8", kbd_LEFT  }, { "\xC3\xAA", kbd_DOWN  }, /* meta+      h,j (some xterms) */
       { "\xC3\xAB", kbd_UP    }, { "\xC3\xAC", kbd_RIGHT }, /* meta+      k,l (some xterms) */
       { "\xC2\x88", kbd_HOME  }, { "\xC2\x8A", kbd_PGDN  }, /* ctrl+meta+ h,j (some xterms) */
-      { "\xC2\x8B", kbd_PGUP  }, { "\xC2\x8C", kbd_END   }  /* ctrl+meta+ k,l (some xterms) */
+      { "\xC2\x8B", kbd_PGUP  }, { "\xC2\x8C", kbd_END   }, /* ctrl+meta+ k,l (some xterms) */
+      { "\033\011", kbd_BTAB  }
    };
 #ifdef TERMIOS_ONLY
    char buf[SMLBUFSIZ], *pb;