Fetch a character from the keyboard, already processing terminal resizes and awkward bugs. Definition at line 122 of file gui_input.c. 00123 { 00124 int ch; 00125 00126 for (;;) { 00127 ch = getch(); 00128 00129 switch (ch) { 00130 /* Redraw everything when resizing */ 00131 case KEY_RESIZE: 00132 case CTRL('L'): 00133 gui_draw_resize(); 00134 continue; 00135 00136 /* Catch backspace button */ 00137 case CTRL('H'): 00138 case CTRL('?'): 00139 return (KEY_BACKSPACE); 00140 00141 /* FreeBSD returns KEY_SELECT instead of KEY_END */ 00142 case KEY_SELECT: 00143 return (KEY_END); 00144 00145 /* Error condition */ 00146 case ERR: 00147 switch (errno) { 00148 case 0: 00149 case EINTR: 00150 /* Signal delivery */ 00151 continue; 00152 default: 00153 /* We've lost stdin */ 00154 gui_input_quit(); 00155 } 00156 } 00157 00158 break; 00159 } 00160 00161 return (ch); 00162 }
Here is the call graph for this function:
![]()
Here is the caller graph for this function:
![]() |
1.6.3