summaryrefslogtreecommitdiffstats
path: root/sys/teken/teken.h
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2009-09-27 18:19:41 +0000
committered <ed@FreeBSD.org>2009-09-27 18:19:41 +0000
commit9ed9beeb2c80690441194fd4c3bf678db65c8870 (patch)
tree69bf6ef33b2ac397085096edc293d509c65f85c6 /sys/teken/teken.h
parenta0b7c793b48225f55ff16faf7571e9cb2c6ba513 (diff)
downloadFreeBSD-src-9ed9beeb2c80690441194fd4c3bf678db65c8870.zip
FreeBSD-src-9ed9beeb2c80690441194fd4c3bf678db65c8870.tar.gz
Add support for VT200-style mouse input.
Right now if applications want to use the mouse on the command line, they use sysmouse(4) and install a signal handler in the kernel to deliver signals when mouse events arrive. This conflicts with my plan to change to TERM=xterm, so implement proper VT200-style mouse input. Because mouse input is now streamed through the TTY, it means you can now SSH to another system on the console and use the mouse there as well. The disadvantage of the VT200 mouse protocol, is that it doesn't seem to generate events when moving the cursor. Only when pressing and releasing mouse buttons. There are different protocols as well, but this one seems to be most commonly supported. Reported by: Paul B. Mahol <onemda gmail com> Tested with: vim(1)
Diffstat (limited to 'sys/teken/teken.h')
-rw-r--r--sys/teken/teken.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/teken/teken.h b/sys/teken/teken.h
index aab037f..22b5745 100644
--- a/sys/teken/teken.h
+++ b/sys/teken/teken.h
@@ -97,6 +97,7 @@ typedef void tf_param_t(void *, int, unsigned int);
#define TP_SETBELLPD 6
#define TP_SETBELLPD_PITCH(pd) ((pd) >> 16)
#define TP_SETBELLPD_DURATION(pd) ((pd) & 0xffff)
+#define TP_MOUSE 7
typedef void tf_respond_t(void *, const void *, size_t);
typedef struct {
OpenPOWER on IntegriCloud