aboutsummaryrefslogtreecommitdiff
path: root/termkey.c
diff options
context:
space:
mode:
authorPaul LeoNerd Evans <leonerd@leonerd.org.uk>2009-11-24 01:22:55 +0000
committerPaul LeoNerd Evans <leonerd@leonerd.org.uk>2009-11-24 01:22:55 +0000
commit2ba9849ab536645f621e311f7afa48e5199055d1 (patch)
treea8f9e1e7c75aedf3fb2488b58731002f8fe854c3 /termkey.c
parent513e0ac59bf1b2d381cac2202b45236e7f751c3e (diff)
downloadtermo-2ba9849ab536645f621e311f7afa48e5199055d1.tar.gz
termo-2ba9849ab536645f621e311f7afa48e5199055d1.tar.xz
termo-2ba9849ab536645f621e311f7afa48e5199055d1.zip
Public interface for MOUSE support
Diffstat (limited to 'termkey.c')
-rw-r--r--termkey.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/termkey.c b/termkey.c
index 7a90684..147b82d 100644
--- a/termkey.c
+++ b/termkey.c
@@ -920,6 +920,10 @@ size_t termkey_snprint_key(TermKey *tk, char *buffer, size_t len, TermKeyKey *ke
case TERMKEY_TYPE_FUNCTION:
l = snprintf(buffer + pos, len - pos, "F%d", key->code.number);
break;
+ case TERMKEY_TYPE_MOUSE:
+ l = snprintf(buffer + pos, len - pos, "MOUSE(0x%02x,%d,%d)",
+ key->code.mouse.buttons, key->code.mouse.line, key->code.mouse.col);
+ break;
}
if(l <= 0) return pos;