void shell_keyboardListener(){ unsigned char c; while((c=getchar())!=0){ if(c == '\b'){ shell_backspace(); } else if(c == '\n'){ shell_enter(); } else if(c == UP){ shell_up(); } else if(c == DOWN){ shell_down(); } else if(c == LEFT){ shell_left(); } else if(c == RIGHT){ shell_right(); } else if(c == PGDN){ shell_pagedown(); } else if(c == DEL){ shell_delete(); } else if(c == F1){ shell_f1(); }else{ shell_print(c); } } return; }
void shell_keyboardListener(){ unsigned char c; while((c=getchar())!=0){ if(c == '\b'){ shell_backspace(); } else if(c == '\n'){ shell_enter(); } else if(c == S_UP){ shell_up(); } else if(c == S_DOWN){ shell_down(); } else if(c == S_LEFT){ shell_left(); } else if(c == S_RIGHT){ shell_right(); } else if(c == S_PGDN){ shell_pagedown(); } else if(c == S_DEL){ shell_delete(); } else if(c == S_INS){ shell_insert(); } else if(c == S_HOME){ shell_home(); } else if(c == S_END){ shell_end(); } else if(c == S_F1){ shell_f1(); }else{ shell_print(c); } } return; }