Make sure to implement newer event types in debug function

This commit is contained in:
Paul LeoNerd Evans 2012-12-06 02:09:03 +00:00
parent 58850dbac2
commit 5190963f1b
1 changed files with 17 additions and 0 deletions

View File

@ -141,6 +141,23 @@ static void print_key(TermKey *tk, TermKeyKey *key)
fprintf(stderr, "Mouse ev=%d button=%d pos=(%d,%d)\n", ev, button, line, col);
}
break;
case TERMKEY_TYPE_POSITION:
{
int line, col;
termkey_interpret_position(tk, key, &line, &col);
fprintf(stderr, "Position report pos=(%d,%d)\n", line, col);
}
break;
case TERMKEY_TYPE_MODEREPORT:
{
int initial, mode, value;
termkey_interpret_modereport(tk, key, &initial, &mode, &value);
fprintf(stderr, "Mode report mode=%s %d val=%d\n", initial == '?' ? "DEC" : "ANSI", mode, value);
}
break;
case TERMKEY_TYPE_UNKNOWN_CSI:
fprintf(stderr, "unknown CSI\n");
break;
}
int m = key->modifiers;