diff options
| author | Verdant <im@verdant.ee> | 2026-05-17 20:01:53 +0800 |
|---|---|---|
| committer | Verdant <im@verdant.ee> | 2026-05-17 20:01:53 +0800 |
| commit | a290d50b7bd10ed4cb0b9e254f5de430445a3cd7 (patch) | |
| tree | ca901f038b72df9b75edb2dd8091158eb2231d70 | |
| parent | 92005d24b1ef42d7a5d99d7cbd1944f2151043d0 (diff) | |
| download | kl-a290d50b7bd10ed4cb0b9e254f5de430445a3cd7.tar.gz kl-a290d50b7bd10ed4cb0b9e254f5de430445a3cd7.zip | |
modify lock
| -rw-r--r-- | main.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -225,9 +225,9 @@ void enable_term_echo() { void print_pure(struct input_event * ie) { if (repeat_counters[ie -> code] != 1) { - printf("%-15s x%-13d\r", key_names[ie -> code], repeat_counters[ie -> code]); + printf("\r%-15s x%-13d", key_names[ie -> code], repeat_counters[ie -> code]); } else { - printf("\r%s", key_names[ie -> code]); + printf("%s", key_names[ie -> code]); } fflush(stdout); @@ -292,16 +292,16 @@ int main(int argc, char ** argv) { if (ie.type == EV_KEY) { if (ie.value == KEY_PRESS) { - if (line_lock != -1 && line_lock != ie.code && !cfg -> enable_time) printf("\n"); + if (line_lock != -1 && !cfg -> enable_time) printf("\n"); repeat_counters[ie.code] = 1; - line_lock = ie.code; - fp( & ie); + line_lock = ie.code; + fp(&ie); } if (ie.value == KEY_REPEAT) { line_lock = ie.code; repeat_counters[ie.code]++; - fp( & ie); + fp(&ie); } if (ie.value == KEY_RELEASE) { |
