Sfoglia il codice sorgente

解决shell无法输入大写字母'P'的问题 (#404)

LoGin 1 anno fa
parent
commit
01bd5258cf
2 ha cambiato i file con 3 aggiunte e 3 eliminazioni
  1. 2 2
      kernel/src/libs/keyboard_parser.rs
  2. 1 1
      user/apps/shell/shell.c

+ 2 - 2
kernel/src/libs/keyboard_parser.rs

@@ -337,7 +337,7 @@ impl TypeOneFSMState {
             }
             _ => {
                 if flag_make == false {
-                    //kdebug!("in type3 ch is {:#x}\n",ch);
+                    // kdebug!("in type3 ch is {:#x}\n",ch);
                     key = KeyFlag::NoneFlag;
                 }
             }
@@ -359,8 +359,8 @@ impl TypeOneFSMState {
         }
 
         let ch = TYPE1_KEY_CODE_MAPTABLE[col as usize + 2 * index as usize];
-
         if key != KeyFlag::NoneFlag {
+            // kdebug!("EMIT: ch is '{}', keyflag is {:?}\n", ch as char, key);
             Self::emit(tty, ch);
         }
         return TypeOneFSMState::Start;

+ 1 - 1
user/apps/shell/shell.c

@@ -213,7 +213,7 @@ int shell_readline(int fd, char *buf)
             return count;
         }
 
-        if (key && key != 0x50 && key != 0xc8)
+        if (key && key != 0xc8)
         {
             if (key == '\b')
             {