]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* grub-core/term/terminfo.c (grub_terminfo_readkey): Handle keys with
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Wed, 5 Jan 2011 00:25:01 +0000 (01:25 +0100)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Wed, 5 Jan 2011 00:25:01 +0000 (01:25 +0100)
CTRL.

ChangeLog
grub-core/term/terminfo.c

index 41241e7a03b0230535cd16bdb27e039f46663043..0932ee7cb17451118c778f5c962c88596a995237 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-01-05  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       * grub-core/term/terminfo.c (grub_terminfo_readkey): Handle keys with
+       CTRL.
+
 2011-01-05  Vladimir Serbinenko  <phcoder@gmail.com>
 
        The E820 type 5 is BADRAM, not EXEC_CODE.
index d01811959fa1147d5f32c000452c870e81a02468..8450ea231b2d539145655e09e78f79e94000babd 100644 (file)
@@ -403,6 +403,8 @@ grub_terminfo_readkey (struct grub_term_input *term, int *keys, int *len,
       /* Backspace: Ctrl-h.  */
       if (c == 0x7f)
        c = '\b'; 
+      if (c < 0x20 && c != '\t' && c!= '\b' && c != '\n' && c != '\r')
+       c = GRUB_TERM_CTRL | (c - 1 + 'a');
       *len = 1;
       keys[0] = c;
       return;