Return a real key type for unrecognised CSI sequences; allow accessing them by termkey_interpret_csi()

This commit is contained in:
Paul LeoNerd Evans
2012-11-30 14:35:23 +00:00
parent d241d6216a
commit 7b3dc4be71
7 changed files with 101 additions and 4 deletions

View File

@@ -96,7 +96,10 @@ typedef enum {
TERMKEY_TYPE_FUNCTION,
TERMKEY_TYPE_KEYSYM,
TERMKEY_TYPE_MOUSE,
TERMKEY_TYPE_POSITION
TERMKEY_TYPE_POSITION,
/* add other recognised types here */
TERMKEY_TYPE_UNKNOWN_CSI = -1
} TermKeyType;
typedef enum {
@@ -202,6 +205,8 @@ TermKeyResult termkey_interpret_mouse(TermKey *tk, const TermKeyKey *key, TermKe
TermKeyResult termkey_interpret_position(TermKey *tk, const TermKeyKey *key, int *line, int *col);
TermKeyResult termkey_interpret_csi(TermKey *tk, const TermKeyKey *key, long args[], size_t *nargs, unsigned long *cmd);
typedef enum {
TERMKEY_FORMAT_LONGMOD = 1 << 0, /* Shift-... instead of S-... */
TERMKEY_FORMAT_CARETCTRL = 1 << 1, /* ^X instead of C-X */