MCPcopy Create free account
hub / github.com/antirez/ds4 / tui_draw_frame

Function tui_draw_frame

ds4_eval.c:1989–1999  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1987 for (ssize_t i = 0; i < n; i++) {
1988 unsigned char c = (unsigned char)buf[i];
1989 if (esc_state == 0) {
1990 if (c == 27) esc_state = 1;
1991 else if (c == 'p' || c == 'P' || c == 'q' || c == 'Q') input_queue_key(c);
1992 else if (c == '\r' || c == '\n') input_queue_key(c);
1993 } else if (esc_state == 1) {
1994 esc_state = (c == '[' || c == 'O') ? 2 : 0;
1995 } else {
1996 if (c == 'A' || c == 'B') input_queue_key(c);
1997 esc_state = 0;
1998 }
1999 }
2000 }
2001 return NULL;
2002}

Callers 1

tui_startFunction · 0.85

Calls 2

tui_draw_titleFunction · 0.85
term_moveFunction · 0.85

Tested by

no test coverage detected