diff --git a/README.md b/README.md index cdbb02a..4ee9bb9 100644 --- a/README.md +++ b/README.md @@ -56,6 +56,7 @@ To see all available options type typist --help or just | Binding | Function | |---------|----------| | Ctrl + q; Ctrl + c | Exit | +| Ctrl + r | Restart typing test | ### Tips diff --git a/src/input.c b/src/input.c index 6b89d7a..061f11d 100644 --- a/src/input.c +++ b/src/input.c @@ -79,13 +79,14 @@ void process_keypress() { CLR_SCREEN; CRS_POS_TOP; exit(0); -/* case CTRL_KEY('r'): + case CTRL_KEY('r'): refresh_screen(); parse_text(); print_text(); tt.pos = 0; + tt.print_index = 0; first_key_read = 0; - break;*/ + break; case 127: if (tt.pos == 0 || tt.is_new_page[tt.pos]) { break; diff --git a/typist b/typist index 45d1d8d..332fc08 100755 Binary files a/typist and b/typist differ